Bug 1594851 - Run clang-plugin on SM(p) builds on linux r=sfink
authorMatthew Gaudet <mgaudet@mozilla.com>
Wed, 29 Jan 2020 10:22:16 +0000
changeset 512059 f3e901d775ebea46e8671b187d6207f43b4a0881
parent 512058 22bcd089e7abb94be14e4800eacbc10fc69e8d59
child 512060 bdad1c3a97a018e9264017d6dbe8e7d02bfd55d0
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/plaindebug
--- 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/plaindebug
+++ b/js/src/devtools/automation/variants/plaindebug
@@ -1,12 +1,16 @@
 {
     "configure-args": "--enable-rust-simd",
     "debug": true,
+    "compiler": "clang",
     "env": {
         "JSTESTS_EXTRA_ARGS": "--jitflags=debug"
     },
     "conditional-env": {
         "linux64": {
             "JITTEST_EXTRA_ARGS": "--run-binast"
         }
+    },
+    "conditional-configure-args": {
+        "linux64": "--enable-clang-plugin"
     }
 }