Bug 1594851 - Run clang-plugin on SM(p) builds on linux r=sfink
☠☠ backed out by 3a95f5e058f4 ☠ ☠
authorMatthew Gaudet <mgaudet@mozilla.com>
Wed, 29 Jan 2020 05:25:26 +0000
changeset 512043 8984a7d5601f782b5b006eeca8429b22adc39b9d
parent 512042 388a4d04e91159527a69fa1e3d2a91e7155247aa
child 512044 3a95f5e058f43b18d53697a8c2ca1ee4f875585d
push id37068
push usernerli@mozilla.com
push dateWed, 29 Jan 2020 15:51:04 +0000
treeherdermozilla-central@019ae805259f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1594851
milestone74.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 1594851 - Run clang-plugin on SM(p) builds on linux r=sfink Also changes SM(p) to use Clang. Differential Revision: https://phabricator.services.mozilla.com/D60897
js/src/devtools/automation/autospider.py
js/src/devtools/automation/variants/plain
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -219,16 +219,29 @@ if 'compiler' in variant:
     compiler = variant['compiler']
 elif platform.system() == 'Darwin':
     compiler = 'clang'
 elif platform.system() == 'Windows':
     compiler = 'cl'
 else:
     compiler = 'gcc'
 
+# Need a platform name to use as a key in variant files.
+if args.platform:
+    variant_platform = args.platform.split("-")[0]
+elif platform.system() == 'Windows':
+    variant_platform = 'win64' if word_bits == 64 else 'win32'
+elif platform.system() == 'Linux':
+    variant_platform = 'linux64' if word_bits == 64 else 'linux'
+elif platform.system() == 'Darwin':
+    variant_platform = 'macosx64'
+else:
+    variant_platform = 'other'
+
+
 info("using compiler '{}'".format(compiler))
 
 cxx = {'clang': 'clang++', 'gcc': 'g++', 'cl': 'cl'}.get(compiler)
 
 compiler_dir = env.get('GCCDIR', os.path.join(DIR.fetches, compiler))
 info("looking for compiler under {}/".format(compiler_dir))
 compiler_libdir = None
 if os.path.exists(os.path.join(compiler_dir, 'bin', compiler)):
@@ -289,16 +302,22 @@ if word_bits == 32:
         env['CXXFLAGS'] = '{0} {1}'.format(env.get('CXXFLAGS', ''), sse_flags)
 else:
     if platform.system() == 'Windows':
         CONFIGURE_ARGS += ' --target=x86_64-pc-mingw32'
 
 if platform.system() == 'Linux' and AUTOMATION:
     CONFIGURE_ARGS = '--enable-stdcxx-compat --disable-gold ' + CONFIGURE_ARGS
 
+# Override environment variant settings conditionally.
+CONFIGURE_ARGS = "{} {}".format(
+    variant.get('conditional-configure-args', {}).get(variant_platform, ''),
+    CONFIGURE_ARGS
+)
+
 # Timeouts.
 ACTIVE_PROCESSES = set()
 
 
 def killall():
     for proc in ACTIVE_PROCESSES:
         proc.kill()
     ACTIVE_PROCESSES.clear()
@@ -443,28 +462,16 @@ test_suites = set(default_test_suites)
 
 
 def normalize_tests(tests):
     if 'all' in tests:
         return default_test_suites
     return tests
 
 
-# Need a platform name to use as a key in variant files.
-if args.platform:
-    variant_platform = args.platform.split("-")[0]
-elif platform.system() == 'Windows':
-    variant_platform = 'win64' if word_bits == 64 else 'win32'
-elif platform.system() == 'Linux':
-    variant_platform = 'linux64' if word_bits == 64 else 'linux'
-elif platform.system() == 'Darwin':
-    variant_platform = 'macosx64'
-else:
-    variant_platform = 'other'
-
 # Override environment variant settings conditionally.
 for k, v in variant.get('conditional-env', {}).get(variant_platform, {}).items():
     env[k] = v.format(**REPLACEMENTS)
 
 # Skip any tests that are not run on this platform (or the 'all' platform).
 test_suites -= set(normalize_tests(variant.get('skip-tests', {}).get(variant_platform, [])))
 test_suites -= set(normalize_tests(variant.get('skip-tests', {}).get('all', [])))
 
--- a/js/src/devtools/automation/variants/plain
+++ b/js/src/devtools/automation/variants/plain
@@ -1,12 +1,16 @@
 {
     "configure-args": "--enable-rust-simd",
     "optimize": true,
+    "compiler": "clang",
     "env": {
         "JSTESTS_EXTRA_ARGS": "--jitflags=jstests"
     },
     "conditional-env": {
         "linux64": {
             "JITTEST_EXTRA_ARGS": "--run-binast"
         }
+    },
+    "conditional-configure-args": {
+        "linux64": "--enable-clang-plugin"
     }
 }