Bug 1426555 - Make autospider builds use --enable-stdcxx-compat on Linux only. r?sfink draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 21 Dec 2017 09:50:16 +0900
changeset 713851 0ff43265dc14c089c0551419f0986d31979985ce
parent 713844 91c2434a588982d0923b6b0c522ccd8649040801
child 713852 100545bb0a2b50b629825899df30917aea83fb9c
push id93779
push userbmo:mh+mozilla@glandium.org
push dateThu, 21 Dec 2017 03:02:50 +0000
reviewerssfink
bugs1426555
milestone59.0a1
Bug 1426555 - Make autospider builds use --enable-stdcxx-compat on Linux only. r?sfink Some of the variants are multi-platforms, and having --enable-stdcxx-compat in their definition will break when the option is moved over to python configure. While here, prepare for --enable-stdcxx-compat actually doing something (it currently doesn't), by adding an exception for it in check_vanilla_allocations.py.
config/check_vanilla_allocations.py
js/src/devtools/automation/autospider.py
js/src/devtools/automation/variants/arm-sim
js/src/devtools/automation/variants/arm-sim-osx
js/src/devtools/automation/variants/arm64-sim
js/src/devtools/automation/variants/compacting
js/src/devtools/automation/variants/rootanalysis
--- a/config/check_vanilla_allocations.py
+++ b/config/check_vanilla_allocations.py
@@ -124,16 +124,21 @@ def main():
 
     for line in lines:
         m = re.search(alloc_fns_re, line)
         if m is None:
             continue
 
         filename = m.group(1)
 
+        # The stdc++compat library has an implicit call to operator new in
+        # thread::_M_start_thread.
+        if 'stdc++compat' in filename:
+            continue
+
         # The memory allocator code contains calls to memalign. These are ok, so
         # we whitelist them.
         if "_memory_" in filename:
             continue
 
         fn = m.group(2)
         if filename == 'jsutil.o':
             jsutil_cpp.add(fn)
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -270,16 +270,19 @@ if word_bits == 32:
         else:
             sse_flags = '-msse -msse2 -mfpmath=sse'
         env['CCFLAGS'] = '{0} {1}'.format(env.get('CCFLAGS', ''), sse_flags)
         env['CXXFLAGS'] = '{0} {1}'.format(env.get('CXXFLAGS', ''), sse_flags)
 else:
     if platform.system() == 'Windows':
         CONFIGURE_ARGS += ' --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32'
 
+if platform.system() == 'Linux':
+    CONFIGURE_ARGS += ' --enable-stdcxx-compat'
+
 # Timeouts.
 ACTIVE_PROCESSES = set()
 
 
 def killall():
     for proc in ACTIVE_PROCESSES:
         proc.kill()
     ACTIVE_PROCESSES.clear()
--- a/js/src/devtools/automation/variants/arm-sim
+++ b/js/src/devtools/automation/variants/arm-sim
@@ -1,7 +1,7 @@
 {
-    "configure-args": "--enable-stdcxx-compat --enable-simulator=arm --target=i686-pc-linux --host=i686-pc-linux",
+    "configure-args": "--enable-simulator=arm --target=i686-pc-linux --host=i686-pc-linux",
     "optimize": true,
     "debug": true,
     "bits": 32,
     "use_minidump": false
 }
--- a/js/src/devtools/automation/variants/arm-sim-osx
+++ b/js/src/devtools/automation/variants/arm-sim-osx
@@ -1,6 +1,6 @@
 {
-    "configure-args": "--enable-stdcxx-compat --enable-simulator=arm --target=i686-apple-darwin10.0.0 --host=i686-apple-darwin10.0.0",
+    "configure-args": "--enable-simulator=arm --target=i686-apple-darwin10.0.0 --host=i686-apple-darwin10.0.0",
     "optimize": true,
     "debug": true,
     "bits": 32
 }
--- a/js/src/devtools/automation/variants/arm64-sim
+++ b/js/src/devtools/automation/variants/arm64-sim
@@ -1,10 +1,10 @@
 {
-    "configure-args": "--enable-stdcxx-compat --enable-simulator=arm64",
+    "configure-args": "--enable-simulator=arm64",
     "optimize": true,
     "debug": true,
     "env": {
         "JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/arm64-jstests-slow.txt",
         "JITTEST_EXTRA_ARGS": "--jitflags=none --args=--baseline-eager -x ion/ -x asm.js/"
     },
     "bits": 64
 }
--- a/js/src/devtools/automation/variants/compacting
+++ b/js/src/devtools/automation/variants/compacting
@@ -1,10 +1,10 @@
 {
-    "configure-args": "--enable-stdcxx-compat --enable-ctypes",
+    "configure-args": "--enable-ctypes",
     "optimize": true,
     "debug": true,
     "env": {
         "JS_GC_ZEAL": "IncrementalMultipleSlices",
         "JITTEST_EXTRA_ARGS": "--jitflags=debug --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
         "JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt"
     },
     "skip-tests": {
--- a/js/src/devtools/automation/variants/rootanalysis
+++ b/js/src/devtools/automation/variants/rootanalysis
@@ -1,9 +1,9 @@
 {
-    "configure-args": "--enable-stdcxx-compat --enable-ctypes",
+    "configure-args": "--enable-ctypes",
     "optimize": true,
     "debug": true,
     "env": {
         "JS_GC_ZEAL": "GenerationalGC",
         "JSTESTS_EXTRA_ARGS": "--jitflags=debug"
     }
 }