Bug 1291356 - Ensure building with --with-servo keeps building with mozjemalloc, whatever the default jemalloc is. r?chmanchester
--- a/build/moz.configure/memory.configure
+++ b/build/moz.configure/memory.configure
@@ -4,17 +4,17 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
option(env='MOZ_JEMALLOC4', help='Enable jemalloc 4')
imply_option('--enable-jemalloc', depends_if('MOZ_JEMALLOC4')(lambda x: '4'))
-option('--enable-jemalloc', nargs='?', choices=('4',), env='MOZ_MEMORY',
+option('--enable-jemalloc', nargs='?', choices=('4', 'moz'), env='MOZ_MEMORY',
help='Replace memory allocator with jemalloc')
@depends('--enable-jemalloc', target, build_project, c_compiler)
def jemalloc(value, target, build_project, c_compiler):
if value.origin != 'default':
return bool(value) or None
if build_project == 'js':
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -490,16 +490,18 @@ option('--with-servo', env='SERVO_TARGET
'be found. This is generally servo_src_dir/target/release.'
'Passing this flag enables experimental integration with the '
'servo style system')
@depends_if('--with-servo')
def servo_target_dir(value):
return value[0]
+imply_option('--enable-jemalloc', depends_if('--with-servo')(lambda _: 'moz'))
+
set_define('MOZ_STYLO', depends_if(servo_target_dir)(lambda x: bool(x)))
set_config('SERVO_TARGET_DIR', servo_target_dir)
# Gecko integrated IPC fuzzer
# ==============================================================
option('--enable-ipc-fuzzer', env='MOZ_FAULTY',
help='Enable IPC fuzzer')