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

--HG--
extra : rebase_source : 03acfc386fa9c86ae90e0feb5dae092ea5897179
This commit is contained in:
Gregory Szorc 2016-11-30 22:17:59 -08:00
parent f03404b039
commit b0a535b2cc

View File

@ -65,7 +65,7 @@ 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
@ -571,7 +571,16 @@ def stylo(value):
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 '