Bug 1325632 - part 3 - compile rust bindings with -fno-sized-deallocation; r=ted.mielczarek
authorNathan Froyd <froydnj@mozilla.com>
Wed, 15 Nov 2017 14:53:17 -0400
changeset 436493 c7756d08443dfc817b2d8894e7259c6d6d4726b8
parent 436492 7452d18793ab5ad68f76e2074a5d81d4e9582058
child 436494 aeaf5db9a9e276ddb59b512926d95b858c4e1ccf
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersted.mielczarek
bugs1325632
milestone59.0a1
Bug 1325632 - part 3 - compile rust bindings with -fno-sized-deallocation; r=ted.mielczarek This probably doesn't make a huge difference, as we're not generating any code here, but better safe than sorry.
js/rust/build.rs
layout/style/ServoBindings.toml
--- a/js/rust/build.rs
+++ b/js/rust/build.rs
@@ -138,17 +138,18 @@ const UNSAFE_IMPL_SYNC_TYPES: &'static [
     "JSNativeWrapper",
     "JSPropertySpec",
     "JSTypedMethodJitInfo",
 ];
 
 /// Flags passed through bindgen directly to Clang.
 const EXTRA_CLANG_FLAGS: &'static [&'static str] = &[
     "-x", "c++",
-    "-std=c++14",
+    "-std=gnu++14",
+    "-fno-sized-deallocation",
     "-DRUST_BINDGEN",
 ];
 
 /// Types which we want to generate bindings for (and every other type they
 /// transitively use).
 const WHITELIST_TYPES: &'static [&'static str] = &[
     "JS::AutoCheckCannotGC",
     "JS::AutoIdVector",
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -1,11 +1,11 @@
 [build]
 args = [
-    "-x", "c++", "-std=c++14",
+    "-x", "c++", "-std=c++14", "-fno-sized-deallocation",
     "-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
     "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO"
 ]
 "family=unix" = ["-DOS_POSIX=1"]
 "os=solaris" = ["-DOS_SOLARIS=1"]
 "os=dragonfly" = ["-DOS_BSD=1", "-DOS_DRAGONFLY=1"]
 "os=freebsd" = ["-DOS_BSD=1", "-DOS_FREEBSD=1"]
 "os=netbsd" = ["-DOS_BSD=1", "-DOS_NETBSD=1"]