Bug 1289617 - Add an opt-out for bindgen in the SpiderMonkey DEBUG checker. r=sfink
authorBobby Holley <bobbyholley@gmail.com>
Tue, 26 Jul 2016 15:35:26 -0700
changeset 346955 94789ca41a8d9fd194744ff3454d9ce58361c2fe
parent 346954 872ec4f743e5e1c8f40089fe5f9b37ba5f4f5c20
child 346956 4d9e30d1dac162a8319e6fd3d63ed47a49709705
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1289617
milestone50.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 1289617 - Add an opt-out for bindgen in the SpiderMonkey DEBUG checker. r=sfink
js/src/js-config.h.in
--- a/js/src/js-config.h.in
+++ b/js/src/js-config.h.in
@@ -10,22 +10,26 @@
 
 /* Definitions set at build time that affect SpiderMonkey's public API.
    This header file is generated by the SpiderMonkey configure script,
    and installed along with jsapi.h.  */
 
 /* Define to 1 if SpiderMonkey is in debug mode. */
 #undef JS_DEBUG
 
+/*
+ * NB: We have a special case for rust-bindgen, which wants to be able to
+ * generate both debug and release bindings on a single objdir.
+ */
 #ifdef JS_DEBUG
-# ifndef DEBUG
+#if !defined(DEBUG) && !defined(RUST_BINDGEN)
 #  error "SpiderMonkey was configured with --enable-debug, so DEBUG must be defined when including this header"
 # endif
 #else
-# ifdef DEBUG
+# if defined(DEBUG) && !defined(RUST_BINDGEN)
 #  error "SpiderMonkey was configured with --disable-debug, so DEBUG must be not defined when including this header"
 # endif
 #endif
 
 /* Define to 1 if SpiderMonkey should not use struct types in debug builds. */
 #undef JS_NO_JSVAL_JSID_STRUCT_TYPES
 
 /* Define to 1 if SpiderMonkey should support multi-threaded clients.  */