diff --git a/moz.configure b/moz.configure index bdd059d18a83..5e5c8ddcb1ba 100755 --- a/moz.configure +++ b/moz.configure @@ -634,20 +634,6 @@ llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump', add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump) -# Fork server -option('--enable-forkserver', env='MOZ_ENABLE_FORKSERVER', help='Enable fork server') - -@depends('--enable-forkserver', target) -def forkserver_flag(value, target): - if target.os == 'Android' or \ - (target.os == 'GNU' and target.kernel == 'Linux') or \ - target.os == 'FreeBSD': - return bool(value) - pass - -set_config('MOZ_ENABLE_FORKSERVER', forkserver_flag) -set_define('MOZ_ENABLE_FORKSERVER', forkserver_flag, forkserver_flag) - # Please do not add configure checks from here on. diff --git a/toolkit/moz.configure b/toolkit/moz.configure index a6390b73b0e8..8240b8d544ff 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -1972,3 +1972,24 @@ def dump_syms(dump_syms_override, toolchain_search_path): ''')) set_config('DUMP_SYMS', dump_syms) + +# Fork server +@depends(target, build_project) +def forkserver_default(target, build_project): + return build_project == 'browser' and \ + ((target.os == 'GNU' and target.kernel == 'Linux') or \ + target.os == 'FreeBSD') + +option('--enable-forkserver', default=forkserver_default, + env='MOZ_ENABLE_FORKSERVER', help='Enable fork server') + +@depends('--enable-forkserver', target) +def forkserver_flag(value, target): + if target.os == 'Android' or \ + (target.os == 'GNU' and target.kernel == 'Linux') or \ + target.os == 'FreeBSD': + return bool(value) + pass + +set_config('MOZ_ENABLE_FORKSERVER', forkserver_flag) +set_define('MOZ_ENABLE_FORKSERVER', forkserver_flag, forkserver_flag)