Bug 1342301 - Split out an "optimize" key from configure-args. r=arai, a=test-only
authorSteve Fink <sfink@mozilla.com>
Thu, 23 Feb 2017 19:35:49 -0800
changeset 379309 863e3936dbeaa716f238d441537379f4209fd14c
parent 379308 c2a6c623f608de84e0904796e366cc60f83a12ed
child 379310 74020bf0bce0a161a12ec5b0bb35bb06c6896d69
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai, test-only
bugs1342301
milestone53.0
Bug 1342301 - Split out an "optimize" key from configure-args. r=arai, a=test-only
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/asan
js/src/devtools/automation/variants/compacting
js/src/devtools/automation/variants/dtrace
js/src/devtools/automation/variants/msan
js/src/devtools/automation/variants/plain
js/src/devtools/automation/variants/rootanalysis
js/src/devtools/automation/variants/tsan
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -41,16 +41,19 @@ parser.add_argument('--dep', action='sto
 parser.add_argument('--platform', '-p', type=str, metavar='PLATFORM',
                     default='', help='build platform')
 parser.add_argument('--timeout', '-t', type=int, metavar='TIMEOUT',
                     default=10800,
                     help='kill job after TIMEOUT seconds')
 parser.add_argument('--objdir', type=str, metavar='DIR',
                     default=env.get('OBJDIR', 'obj-spider'),
                     help='object directory')
+parser.add_argument('--optimize', type=bool, metavar='OPT',
+                    default=None,
+                    help='whether to generate an optimized build. Overrides variant setting.')
 parser.add_argument('--run-tests', '--tests', type=str, metavar='TESTSUITE',
                     default='',
                     help="comma-separated set of test suites to add to the variant's default set")
 parser.add_argument('--skip-tests', '--skip', type=str, metavar='TESTSUITE',
                     default='',
                     help="comma-separated set of test suites to remove from the variant's default set")
 parser.add_argument('--build-only', '--build',
                     dest='skip_tests', action='store_const', const='all',
@@ -128,18 +131,24 @@ if args.variant == 'nonunified':
                                    os.path.join(dirpath, 'moz.build')])
 
 OBJDIR = os.path.join(DIR.source, args.objdir)
 OUTDIR = os.path.join(OBJDIR, "out")
 POBJDIR = posixpath.join(PDIR.source, args.objdir)
 AUTOMATION = env.get('AUTOMATION', False)
 MAKE = env.get('MAKE', 'make')
 MAKEFLAGS = env.get('MAKEFLAGS', '-j6')
+UNAME_M = subprocess.check_output(['uname', '-m']).strip()
+
 CONFIGURE_ARGS = variant['configure-args']
-UNAME_M = subprocess.check_output(['uname', '-m']).strip()
+opt = args.optimize
+if opt is None:
+    opt = variant.get('optimize')
+if opt is not None:
+    CONFIGURE_ARGS += (" --enable-optimize" if opt else " --disable-optimize")
 
 # Any jobs that wish to produce additional output can save them into the upload
 # directory if there is such a thing, falling back to OBJDIR.
 env.setdefault('MOZ_UPLOAD_DIR', OBJDIR)
 ensure_dir_exists(env['MOZ_UPLOAD_DIR'], clobber=False)
 
 # Some of the variants request a particular word size (eg ARM simulators).
 word_bits = variant.get('bits')
--- a/js/src/devtools/automation/variants/arm-sim
+++ b/js/src/devtools/automation/variants/arm-sim
@@ -1,4 +1,5 @@
 {
-    "configure-args": "--enable-optimize --enable-debug --enable-stdcxx-compat --enable-simulator=arm --target=i686-pc-linux --host=i686-pc-linux",
+    "configure-args": "--enable-debug --enable-stdcxx-compat --enable-simulator=arm --target=i686-pc-linux --host=i686-pc-linux",
+    "optimize": true,
     "bits": 32
 }
--- a/js/src/devtools/automation/variants/arm-sim-osx
+++ b/js/src/devtools/automation/variants/arm-sim-osx
@@ -1,4 +1,5 @@
 {
-    "configure-args": "--enable-optimize --enable-debug --enable-stdcxx-compat --enable-simulator=arm --target=i686-apple-darwin10.0.0 --host=i686-apple-darwin10.0.0",
+    "configure-args": "--enable-debug --enable-stdcxx-compat --enable-simulator=arm --target=i686-apple-darwin10.0.0 --host=i686-apple-darwin10.0.0",
+    "optimize": true,
     "bits": 32
 }
--- a/js/src/devtools/automation/variants/arm64-sim
+++ b/js/src/devtools/automation/variants/arm64-sim
@@ -1,8 +1,9 @@
 {
-    "configure-args": "--enable-optimize --enable-debug --enable-stdcxx-compat --enable-simulator=arm64",
+    "configure-args": "--enable-debug --enable-stdcxx-compat --enable-simulator=arm64",
+    "optimize": 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/asan
+++ b/js/src/devtools/automation/variants/asan
@@ -1,7 +1,8 @@
 {
-    "configure-args": "--disable-debug --enable-optimize --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-address-sanitizer",
+    "configure-args": "--disable-debug --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-address-sanitizer",
+    "optimize": true,
     "compiler": "clang",
     "env": {
         "LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer"
     }
 }
--- a/js/src/devtools/automation/variants/compacting
+++ b/js/src/devtools/automation/variants/compacting
@@ -1,10 +1,11 @@
 {
-    "configure-args": "--enable-optimize --enable-debug --enable-stdcxx-compat --enable-ctypes",
+    "configure-args": "--enable-debug --enable-stdcxx-compat --enable-ctypes",
+    "optimize": true,
     "env": {
         "JS_GC_ZEAL": "Compact",
         "JITTEST_EXTRA_ARGS": "--jitflags=debug --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
         "JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt"
     },
     "skip-tests": {
         "win32": ["jstests"],
         "win64": ["jstests"]
--- a/js/src/devtools/automation/variants/dtrace
+++ b/js/src/devtools/automation/variants/dtrace
@@ -1,3 +1,4 @@
 {
-    "configure-args": "--enable-optimize --enable-debug --enable-dtrace --enable-debug-symbols"
+    "configure-args": "--enable-debug --enable-dtrace --enable-debug-symbols",
+    "optimize": true
 }
--- a/js/src/devtools/automation/variants/msan
+++ b/js/src/devtools/automation/variants/msan
@@ -1,10 +1,11 @@
 {
-    "configure-args": "--disable-debug --enable-optimize --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-memory-sanitizer",
+    "configure-args": "--disable-debug --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-memory-sanitizer",
+    "optimize": true,
     "compiler": "clang",
     "env": {
         "JITTEST_EXTRA_ARGS": "--jitflags=interp --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
         "JSTESTS_EXTRA_ARGS": "--jitflags=interp --exclude-file={DIR}/cgc-jstests-slow.txt",
         "MSAN_OPTIONS": "external_symbolizer_path={TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer:log_path={OUTDIR}/sanitize_log"
     },
     "ignore-test-failures": "true",
     "max-errors": 2
--- a/js/src/devtools/automation/variants/plain
+++ b/js/src/devtools/automation/variants/plain
@@ -1,6 +1,7 @@
 {
-    "configure-args": "--enable-optimize",
+    "configure-args": "",
+    "optimize": true,
     "env": {
         "JSTESTS_EXTRA_ARGS": "--jitflags=all"
     }
 }
--- a/js/src/devtools/automation/variants/rootanalysis
+++ b/js/src/devtools/automation/variants/rootanalysis
@@ -1,7 +1,8 @@
 {
-    "configure-args": "--enable-optimize --enable-debug --enable-stdcxx-compat --enable-ctypes",
+    "configure-args": "--enable-debug --enable-stdcxx-compat --enable-ctypes",
+    "optimize": true,
     "env": {
         "JS_GC_ZEAL": "GenerationalGC",
         "JSTESTS_EXTRA_ARGS": "--jitflags=debug"
     }
 }
--- a/js/src/devtools/automation/variants/tsan
+++ b/js/src/devtools/automation/variants/tsan
@@ -1,10 +1,11 @@
 {
-    "configure-args": "--disable-debug --enable-optimize --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-thread-sanitizer",
+    "configure-args": "--disable-debug --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-thread-sanitizer",
+    "optimize": true,
     "compiler": "clang",
     "env": {
         "LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer",
         "JITTEST_EXTRA_ARGS": "--jitflags=debug --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
         "JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt",
         "TSAN_OPTIONS": "log_path={OUTDIR}/sanitize_log"
     },
     "max-errors": 14