Bug 1604160 - Update cbindgen to do proper copy assignment on tagged enums. r=boris
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 16 Dec 2019 13:31:24 +0000
changeset 507102 aa02e93402e01025296051964250b2dcc0486312
parent 507101 ea17496f741b04193f15b7e14bcddbe5ae64dae9
child 507103 8c1790e4a72707e7813405a2d78f1d6622e3aee9
push id36922
push userncsoregi@mozilla.com
push dateMon, 16 Dec 2019 17:21:47 +0000
treeherdermozilla-central@27d0d6cc2131 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1604160
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1604160 - Update cbindgen to do proper copy assignment on tagged enums. r=boris This is needed to support min() / max() / clamp(), as LengthPercentage will have a potential heap allocation and the current copy-assignment operators just do bitwise copies. Differential Revision: https://phabricator.services.mozilla.com/D57300
build/moz.configure/bindgen.configure
servo/ports/geckolib/cbindgen.toml
taskcluster/ci/fetch/toolchains.yml
taskcluster/ci/toolchain/cbindgen.yml
--- a/build/moz.configure/bindgen.configure
+++ b/build/moz.configure/bindgen.configure
@@ -10,17 +10,17 @@ cbindgen_is_needed = depends(build_proje
 option(env='CBINDGEN', nargs=1, when=cbindgen_is_needed,
        help='Path to cbindgen')
 
 
 @imports(_from='textwrap', _import='dedent')
 def check_cbindgen_version(cbindgen, fatal=False):
     log.debug("trying cbindgen: %s" % cbindgen)
 
-    cbindgen_min_version = Version('0.11.1')
+    cbindgen_min_version = Version('0.12.0')
 
     # cbindgen x.y.z
     version = Version(check_cmd_output(cbindgen, '--version').strip().split(" ")[1])
     log.debug("%s has version %s" % (cbindgen, version))
     if version >= cbindgen_min_version:
         return True
     if not fatal:
         return False
--- a/servo/ports/geckolib/cbindgen.toml
+++ b/servo/ports/geckolib/cbindgen.toml
@@ -50,16 +50,17 @@ derive_neq = true
 [macro_expansion]
 bitflags = true
 
 [enum]
 derive_helper_methods = true
 derive_const_casts = true
 derive_tagged_enum_destructor = true
 derive_tagged_enum_copy_constructor = true
+derive_tagged_enum_copy_assignment = true
 private_default_tagged_enum_constructor = true
 cast_assert_name = "MOZ_ASSERT"
 
 [export]
 prefix = "Style"
 exclude = [
   "NS_LogCtor",
   "NS_LogDtor",
--- a/taskcluster/ci/fetch/toolchains.yml
+++ b/taskcluster/ci/fetch/toolchains.yml
@@ -259,22 +259,22 @@ wine-3.0.3:
         type: static-url
         url: http://dl.winehq.org/wine/source/3.0/wine-3.0.3.tar.xz
         sha256: eb645999ea6f6455a5275bf267e19a32497c8f5aac818ea40afe7c8c396a4da1
         size: 19735412
         gpg-signature:
             sig-url: "{url}.sign"
             key-path: build/unix/build-gcc/DA23579A74D4AD9AF9D3F945CEFAC8EAAF17519D.key
 
-cbindgen-0.11.1:
+cbindgen-0.12.0:
     description: cbindgen source code
     fetch:
         type: git
         repo: https://github.com/eqrion/cbindgen
-        revision: e050442d057e0d0a4f309672ec2863d51f1ec0b0
+        revision: 38fda6b7785a09721d45ed723b14b118b46ae711
 
 cctools-port:
     description: cctools-port source code
     fetch:
         type: git
         repo: https://github.com/tpoechtrager/cctools-port
         revision: 3f979bbcd7ee29d79fb93f829edf3d1d16441147
 
--- a/taskcluster/ci/toolchain/cbindgen.yml
+++ b/taskcluster/ci/toolchain/cbindgen.yml
@@ -9,17 +9,17 @@ job-defaults:
         max-run-time: 3600
     run:
         script: build-cbindgen.sh
         toolchain-artifact: public/build/cbindgen.tar.xz
     fetches:
         fetch:
             # If you update this, make sure to update the minimum version in
             # build/moz.configure/bindgen.configure as well.
-            - cbindgen-0.11.1
+            - cbindgen-0.12.0
 
 linux64-cbindgen:
     treeherder:
         symbol: TL(cbindgen)
     worker:
         max-run-time: 1800
     run:
         arguments: ['x86_64-unknown-linux-gnu']