Bug 1300290 - Avoid --enable-dmd and --enable-stylo setting conflicting --enable-jemalloc values; r=glandium
authorGregory Szorc <gps@mozilla.com>
Wed, 30 Nov 2016 22:17:59 -0800
changeset 325101 e907fb6bfcfe40e6c4b28c406f8784c4b919ba2c
parent 325100 1e40fb1d78e33faa55545a4c51429458eeb9678e
child 325102 2a82f16d575ed10d4d4e10cd64ccff3661a93e5b
push id84599
push userkwierso@gmail.com
push dateFri, 02 Dec 2016 21:13:20 +0000
treeherdermozilla-inbound@18109e54e6cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1300290
milestone53.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 1300290 - Avoid --enable-dmd and --enable-stylo setting conflicting --enable-jemalloc values; r=glandium Before, --enable-dmd implied --enable-jemalloc. If --enable-stylo was also set, it tried to imply --enable-jemalloc=moz. Configure barfed due to setting the value twice. The commit refactors the logic for implying the --enable-jemalloc value to set the proper value depending on the state of dmd and stylo. MozReview-Commit-ID: 1wKE9Cs1Umt
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -60,17 +60,17 @@ option('--enable-dmd', env='MOZ_DMD',
 def dmd(value):
     if value:
         return True
 
 set_config('MOZ_DMD', dmd)
 set_define('MOZ_DMD', dmd)
 add_old_configure_assignment('MOZ_DMD', dmd)
 imply_option('--enable-profiling', dmd)
-imply_option('--enable-jemalloc', dmd)
+# --enable-jemalloc is implied below.
 imply_option('--enable-replace-malloc', dmd)
 
 # JACK cubeb backend
 # ==============================================================
 option('--enable-jack', env='MOZ_JACK',
        help='Enable JACK audio backend.')
 
 @depends('--enable-jack')
@@ -566,17 +566,26 @@ option('--enable-stylo', env='STYLO_ENAB
 
 @depends('--enable-stylo')
 def stylo(value):
     if value:
         return True
 
 set_config('MOZ_STYLO', stylo)
 set_define('MOZ_STYLO', stylo)
-imply_option('--enable-jemalloc', depends_if('--enable-stylo')(lambda _: 'moz'))
+
+@depends(stylo, dmd)
+def jemalloc(stylo, dmd):
+    if stylo:
+        return 'moz'
+    elif dmd:
+        return True
+
+imply_option('--enable-jemalloc', jemalloc,
+             reason='--enable-dmd or --enable-stylo')
 
 option('--with-servo', env='SERVO_TARGET_DIR', nargs=1,
        help='Absolute path of the target directory where libgeckoservo can '
             'be found. This is generally servo_src_dir/target/release.')
 
 @depends_if('--with-servo')
 def servo_target_dir(value):
     return value[0]