forked from mirrors/gecko-dev
Bug 1520395 - Remove the python configure distinction between option and js_option. r=firefox-build-system-reviewers,andi,rstewart
Now that we don't recurse into the js python configure, we don't need to have a special treatment for the options that need to be passed down to that subconfigure, which is what js_option was for. Differential Revision: https://phabricator.services.mozilla.com/D92727
This commit is contained in:
parent
a12805866c
commit
d3519998ac
16 changed files with 274 additions and 299 deletions
|
|
@ -14,12 +14,12 @@ def default_android_ndk_root(mozbuild_state_path, _):
|
|||
return path
|
||||
|
||||
|
||||
js_option('--with-android-ndk', nargs=1,
|
||||
default=default_android_ndk_root,
|
||||
help='location where the Android NDK can be found{|}')
|
||||
option('--with-android-ndk', nargs=1,
|
||||
default=default_android_ndk_root,
|
||||
help='location where the Android NDK can be found{|}')
|
||||
|
||||
js_option('--with-android-toolchain', nargs=1,
|
||||
help='location of the Android toolchain')
|
||||
option('--with-android-toolchain', nargs=1,
|
||||
help='location of the Android toolchain')
|
||||
|
||||
option('--with-android-googlevr-sdk', nargs=1,
|
||||
help='location of the Android GoogleVR SDK')
|
||||
|
|
@ -33,10 +33,10 @@ def min_android_version(target):
|
|||
return '16'
|
||||
|
||||
|
||||
js_option('--with-android-version',
|
||||
nargs=1,
|
||||
help='android platform version{|}',
|
||||
default=min_android_version)
|
||||
option('--with-android-version',
|
||||
nargs=1,
|
||||
help='android platform version{|}',
|
||||
default=min_android_version)
|
||||
|
||||
|
||||
@depends('--with-android-version', min_android_version)
|
||||
|
|
@ -244,9 +244,9 @@ def android_toolchain_prefix_base(target):
|
|||
return target.toolchain
|
||||
|
||||
|
||||
js_option(env='STLPORT_CPPFLAGS',
|
||||
nargs=1,
|
||||
help='Options compiler should pass for standard C++ library')
|
||||
option(env='STLPORT_CPPFLAGS',
|
||||
nargs=1,
|
||||
help='Options compiler should pass for standard C++ library')
|
||||
|
||||
|
||||
@depends('STLPORT_CPPFLAGS', ndk)
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ def arm_option_defaults(os, _):
|
|||
# default is always returned. The lint is fooled by this file being
|
||||
# conditional. If it weren't conditional, the lint wouldn't ask for '{|}' to
|
||||
# be there.
|
||||
js_option('--with-arch', nargs=1,
|
||||
default=arm_option_defaults.arch,
|
||||
help='{Use specific CPU features (-march=type). Resets thumb, fpu, '
|
||||
'float-abi, etc. defaults when set|}')
|
||||
option('--with-arch', nargs=1,
|
||||
default=arm_option_defaults.arch,
|
||||
help='{Use specific CPU features (-march=type). Resets thumb, fpu, '
|
||||
'float-abi, etc. defaults when set|}')
|
||||
|
||||
|
||||
@depends('--with-arch')
|
||||
|
|
@ -40,9 +40,9 @@ def arch_option(value):
|
|||
return []
|
||||
|
||||
|
||||
js_option('--with-thumb', choices=('yes', 'no', 'toolchain-default'),
|
||||
default=arm_option_defaults.thumb,
|
||||
nargs='?', help='{Use Thumb instruction set (-mthumb)|}')
|
||||
option('--with-thumb', choices=('yes', 'no', 'toolchain-default'),
|
||||
default=arm_option_defaults.thumb,
|
||||
nargs='?', help='{Use Thumb instruction set (-mthumb)|}')
|
||||
|
||||
|
||||
def normalize_arm_option(value):
|
||||
|
|
@ -67,9 +67,9 @@ def thumb_option(value):
|
|||
return []
|
||||
|
||||
|
||||
js_option('--with-thumb-interwork', choices=('yes', 'no', 'toolchain-default'),
|
||||
default='toolchain-default',
|
||||
nargs='?', help='Use Thumb/ARM instuctions interwork (-mthumb-interwork)')
|
||||
option('--with-thumb-interwork', choices=('yes', 'no', 'toolchain-default'),
|
||||
default='toolchain-default',
|
||||
nargs='?', help='Use Thumb/ARM instuctions interwork (-mthumb-interwork)')
|
||||
|
||||
|
||||
@depends('--with-thumb-interwork')
|
||||
|
|
@ -82,9 +82,9 @@ def thumb_interwork_option(value):
|
|||
return []
|
||||
|
||||
|
||||
js_option('--with-fpu', nargs=1,
|
||||
default=arm_option_defaults.fpu,
|
||||
help='{Use specific FPU type (-mfpu=type)|}')
|
||||
option('--with-fpu', nargs=1,
|
||||
default=arm_option_defaults.fpu,
|
||||
help='{Use specific FPU type (-mfpu=type)|}')
|
||||
|
||||
|
||||
@depends('--with-fpu')
|
||||
|
|
@ -95,9 +95,9 @@ def fpu_option(value):
|
|||
return []
|
||||
|
||||
|
||||
js_option('--with-float-abi', nargs=1,
|
||||
default=arm_option_defaults.float_abi,
|
||||
help='{Use specific arm float ABI (-mfloat-abi=type)|}')
|
||||
option('--with-float-abi', nargs=1,
|
||||
default=arm_option_defaults.float_abi,
|
||||
help='{Use specific arm float ABI (-mfloat-abi=type)|}')
|
||||
|
||||
|
||||
@depends('--with-float-abi')
|
||||
|
|
@ -108,9 +108,9 @@ def float_abi_option(value):
|
|||
return []
|
||||
|
||||
|
||||
js_option('--with-soft-float', choices=('yes', 'no', 'toolchain-default'),
|
||||
default='toolchain-default',
|
||||
nargs='?', help='Use soft float library (-msoft-float)')
|
||||
option('--with-soft-float', choices=('yes', 'no', 'toolchain-default'),
|
||||
default='toolchain-default',
|
||||
nargs='?', help='Use soft float library (-msoft-float)')
|
||||
|
||||
|
||||
@depends('--with-soft-float')
|
||||
|
|
|
|||
|
|
@ -68,16 +68,16 @@ def cbindgen(cbindgen_override, toolchain_search_path):
|
|||
set_config('CBINDGEN', cbindgen)
|
||||
|
||||
# Bindgen can use rustfmt to format Rust file, but it's not required.
|
||||
js_option(env='RUSTFMT', nargs=1, help='Path to the rustfmt program')
|
||||
option(env='RUSTFMT', nargs=1, help='Path to the rustfmt program')
|
||||
|
||||
rustfmt = check_prog('RUSTFMT', ['rustfmt'], paths=toolchain_search_path,
|
||||
input='RUSTFMT', allow_missing=True)
|
||||
|
||||
|
||||
js_option('--with-libclang-path', nargs=1,
|
||||
help='Absolute path to a directory containing Clang/LLVM libraries for bindgen (version 3.9.x or above)')
|
||||
js_option('--with-clang-path', nargs=1,
|
||||
help='Absolute path to a Clang binary for bindgen (version 3.9.x or above)')
|
||||
option('--with-libclang-path', nargs=1,
|
||||
help='Absolute path to a directory containing Clang/LLVM libraries for bindgen (version 3.9.x or above)')
|
||||
option('--with-clang-path', nargs=1,
|
||||
help='Absolute path to a Clang binary for bindgen (version 3.9.x or above)')
|
||||
|
||||
|
||||
@depends('--with-clang-path', c_compiler, cxx_compiler, toolchain_search_path,
|
||||
|
|
@ -289,9 +289,9 @@ def basic_bindgen_cflags(target, is_unix, compiler_info, android_cflags,
|
|||
return args + (clang_flags or [])
|
||||
|
||||
|
||||
js_option(env='BINDGEN_CFLAGS',
|
||||
nargs=1,
|
||||
help='Options bindgen should pass to the C/C++ parser')
|
||||
option(env='BINDGEN_CFLAGS',
|
||||
nargs=1,
|
||||
help='Options bindgen should pass to the C/C++ parser')
|
||||
|
||||
|
||||
@depends(basic_bindgen_cflags, 'BINDGEN_CFLAGS')
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ def rust_flags(compile_flags, warning_flags):
|
|||
set_config('MOZ_RUST_DEFAULT_FLAGS', rust_flags)
|
||||
|
||||
|
||||
js_option('--disable-new-pass-manager',
|
||||
help='Use the legacy LLVM pass manager in clang builds')
|
||||
option('--disable-new-pass-manager',
|
||||
help='Use the legacy LLVM pass manager in clang builds')
|
||||
|
||||
@depends('--enable-new-pass-manager', c_compiler, host, target, 'MOZ_PGO',
|
||||
lto.enabled, enable_fuzzing, ubsan)
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ check_headers(
|
|||
have_perf_event_h = check_header('linux/perf_event.h',
|
||||
when=building_linux)
|
||||
|
||||
js_option('--with-linux-headers',
|
||||
help='location where the Linux kernel headers can be found',
|
||||
nargs=1)
|
||||
option('--with-linux-headers',
|
||||
help='location where the Linux kernel headers can be found',
|
||||
nargs=1)
|
||||
|
||||
passed_linux_header_flags = depends_if(
|
||||
'--with-linux-headers')(lambda v: ['-I%s' % v[0]])
|
||||
|
|
|
|||
|
|
@ -1106,26 +1106,8 @@ set_define('MOZ_BUILD_APP', build_project)
|
|||
add_old_configure_assignment('MOZ_BUILD_APP', build_project)
|
||||
|
||||
|
||||
# This is temporary until js/src/configure and configure are merged.
|
||||
# Use instead of option() in js/moz.configure and more generally, for
|
||||
# options that are shared between configure and js/src/configure.
|
||||
@dependable
|
||||
def js_configure_args():
|
||||
return []
|
||||
|
||||
@template
|
||||
def js_option(*args, **kwargs):
|
||||
opt = option(*args, **kwargs)
|
||||
|
||||
@depends(js_configure_args, opt.option, build_project, when=kwargs.get('when'))
|
||||
def js_option(js_configure_args, value, build_project):
|
||||
if build_project != 'js':
|
||||
arg = value.format(opt.option)
|
||||
js_configure_args.append(arg)
|
||||
|
||||
|
||||
js_option(env='MOZILLA_OFFICIAL',
|
||||
help='Build an official release')
|
||||
option(env='MOZILLA_OFFICIAL',
|
||||
help='Build an official release')
|
||||
|
||||
|
||||
@depends('MOZILLA_OFFICIAL')
|
||||
|
|
@ -1288,9 +1270,9 @@ set_define('MOZ_UPDATE_CHANNEL', update_channel)
|
|||
add_old_configure_assignment('MOZ_UPDATE_CHANNEL', update_channel)
|
||||
|
||||
|
||||
js_option(env='MOZBUILD_STATE_PATH', nargs=1,
|
||||
help='Path to a persistent state directory for the build system '
|
||||
'and related tools')
|
||||
option(env='MOZBUILD_STATE_PATH', nargs=1,
|
||||
help='Path to a persistent state directory for the build system '
|
||||
'and related tools')
|
||||
|
||||
|
||||
@depends('MOZBUILD_STATE_PATH', '--help')
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ llvm_profdata = check_prog('LLVM_PROFDATA', ['llvm-profdata'],
|
|||
allow_missing=True,
|
||||
paths=toolchain_search_path)
|
||||
|
||||
js_option('--enable-profile-generate',
|
||||
env='MOZ_PROFILE_GENERATE',
|
||||
nargs='?',
|
||||
choices=('cross',),
|
||||
help='Build a PGO instrumented binary')
|
||||
option('--enable-profile-generate',
|
||||
env='MOZ_PROFILE_GENERATE',
|
||||
nargs='?',
|
||||
choices=('cross',),
|
||||
help='Build a PGO instrumented binary')
|
||||
|
||||
imply_option('MOZ_PGO',
|
||||
depends_if('--enable-profile-generate')(lambda _: True))
|
||||
|
|
@ -28,15 +28,15 @@ set_define('MOZ_PROFILE_GENERATE',
|
|||
add_old_configure_assignment('MOZ_PROFILE_GENERATE', 1,
|
||||
when='--enable-profile-generate')
|
||||
|
||||
js_option('--enable-profile-use',
|
||||
env='MOZ_PROFILE_USE',
|
||||
nargs='?',
|
||||
choices=('cross',),
|
||||
help='Use a generated profile during the build')
|
||||
option('--enable-profile-use',
|
||||
env='MOZ_PROFILE_USE',
|
||||
nargs='?',
|
||||
choices=('cross',),
|
||||
help='Use a generated profile during the build')
|
||||
|
||||
js_option('--with-pgo-profile-path',
|
||||
help='Path to the directory with unmerged profile data to use during the build',
|
||||
nargs=1)
|
||||
option('--with-pgo-profile-path',
|
||||
help='Path to the directory with unmerged profile data to use during the build',
|
||||
nargs=1)
|
||||
|
||||
imply_option('MOZ_PGO',
|
||||
depends_if('--enable-profile-use')(lambda _: True))
|
||||
|
|
@ -148,15 +148,15 @@ set_config('MOZ_PGO_RUST', moz_pgo_rust)
|
|||
# LTO
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-lto',
|
||||
env='MOZ_LTO',
|
||||
nargs='?',
|
||||
choices=('full', 'thin', 'cross'),
|
||||
help='Enable LTO')
|
||||
option('--enable-lto',
|
||||
env='MOZ_LTO',
|
||||
nargs='?',
|
||||
choices=('full', 'thin', 'cross'),
|
||||
help='Enable LTO')
|
||||
|
||||
js_option(env='MOZ_LD64_KNOWN_GOOD',
|
||||
nargs=1,
|
||||
help='Indicate that ld64 is free of symbol aliasing bugs.')
|
||||
option(env='MOZ_LD64_KNOWN_GOOD',
|
||||
nargs=1,
|
||||
help='Indicate that ld64 is free of symbol aliasing bugs.')
|
||||
|
||||
imply_option('MOZ_LD64_KNOWN_GOOD', depends_if('MOZ_AUTOMATION')(lambda _: True))
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ def jemalloc_default(target):
|
|||
return target.kernel in ('Darwin', 'Linux', 'WINNT')
|
||||
|
||||
|
||||
js_option('--enable-jemalloc', env='MOZ_MEMORY', default=jemalloc_default,
|
||||
help='{Replace|Do not replace} memory allocator with jemalloc')
|
||||
option('--enable-jemalloc', env='MOZ_MEMORY', default=jemalloc_default,
|
||||
help='{Replace|Do not replace} memory allocator with jemalloc')
|
||||
|
||||
|
||||
set_config('MOZ_MEMORY', True, when='--enable-jemalloc')
|
||||
|
|
@ -27,9 +27,9 @@ def replace_malloc_default(milestone, build_project):
|
|||
return True
|
||||
|
||||
|
||||
js_option('--enable-replace-malloc', default=replace_malloc_default,
|
||||
when='--enable-jemalloc',
|
||||
help='{Enable|Disable} ability to dynamically replace the malloc implementation')
|
||||
option('--enable-replace-malloc', default=replace_malloc_default,
|
||||
when='--enable-jemalloc',
|
||||
help='{Enable|Disable} ability to dynamically replace the malloc implementation')
|
||||
|
||||
|
||||
set_config('MOZ_REPLACE_MALLOC', True, when='--enable-replace-malloc')
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
# Top-level configure defaults to building NSPR from source. Standalone JS
|
||||
# doesn't.
|
||||
js_option('--enable-nspr-build', when=js_standalone,
|
||||
help='{Build|Do not build} NSPR from source tree')
|
||||
option('--enable-nspr-build', when=js_standalone,
|
||||
help='{Build|Do not build} NSPR from source tree')
|
||||
|
||||
@depends('--enable-nspr-build', when=js_standalone)
|
||||
def enable_nspr_build(enable):
|
||||
if enable:
|
||||
return enable
|
||||
|
||||
js_option('--with-system-nspr', help='Use system NSPR')
|
||||
option('--with-system-nspr', help='Use system NSPR')
|
||||
|
||||
@depends(enable_nspr_build, '--with-system-nspr', js_standalone)
|
||||
def build_nspr(nspr_build, system_nspr, js_standalone):
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
# Rust is required by `rust_compiler` below. We allow_missing here
|
||||
# to propagate failures to the better error message there.
|
||||
js_option(env='RUSTC', nargs=1, help='Path to the rust compiler')
|
||||
js_option(env='CARGO', nargs=1, help='Path to the Cargo package manager')
|
||||
option(env='RUSTC', nargs=1, help='Path to the rust compiler')
|
||||
option(env='CARGO', nargs=1, help='Path to the Cargo package manager')
|
||||
|
||||
rustc = check_prog('_RUSTC', ['rustc'], what='rustc',
|
||||
paths=toolchain_search_path, input='RUSTC',
|
||||
|
|
@ -435,7 +435,7 @@ set_config('RUST_HOST_TARGET', rust_host_triple)
|
|||
set_config('RUSTC_COMMIT', depends(rustc_info)(lambda i: i.commit))
|
||||
|
||||
# Rustdoc is required by Rust tests below.
|
||||
js_option(env='RUSTDOC', nargs=1, help='Path to the rustdoc program')
|
||||
option(env='RUSTDOC', nargs=1, help='Path to the rustdoc program')
|
||||
|
||||
rustdoc = check_prog('RUSTDOC', ['rustdoc'], paths=toolchain_search_path,
|
||||
input='RUSTDOC', allow_missing=True)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
imply_option('--enable-release', mozilla_official)
|
||||
imply_option('--enable-release', depends_if('MOZ_AUTOMATION')(lambda x: True))
|
||||
|
||||
js_option('--enable-release',
|
||||
default=milestone.is_release_or_beta,
|
||||
help='{Build|Do not build} with more conservative, release '
|
||||
'engineering-oriented options.{ This may slow down builds.|}')
|
||||
option('--enable-release',
|
||||
default=milestone.is_release_or_beta,
|
||||
help='{Build|Do not build} with more conservative, release '
|
||||
'engineering-oriented options.{ This may slow down builds.|}')
|
||||
|
||||
|
||||
@depends('--enable-release')
|
||||
|
|
@ -25,9 +25,9 @@ set_config('DEVELOPER_OPTIONS', developer_options)
|
|||
# Code optimization
|
||||
# ==============================================================
|
||||
|
||||
js_option('--disable-optimize',
|
||||
nargs='?',
|
||||
help='Disable optimizations via compiler flags')
|
||||
option('--disable-optimize',
|
||||
nargs='?',
|
||||
help='Disable optimizations via compiler flags')
|
||||
|
||||
|
||||
@depends('--enable-optimize', '--help')
|
||||
|
|
@ -133,7 +133,7 @@ def host_is_osx(host):
|
|||
with only_when(host_is_osx | target_is_osx):
|
||||
# MacOS SDK
|
||||
# =========
|
||||
js_option('--with-macos-sdk', env='MACOS_SDK_DIR', nargs=1,
|
||||
option('--with-macos-sdk', env='MACOS_SDK_DIR', nargs=1,
|
||||
help='Location of platform SDK to use')
|
||||
|
||||
@depends('--with-macos-sdk', host)
|
||||
|
|
@ -204,15 +204,11 @@ with only_when(target_is_osx):
|
|||
|
||||
# Compiler wrappers
|
||||
# ==============================================================
|
||||
# Normally, we'd use js_option and automatically have those variables
|
||||
# propagated to js/src, but things are complicated by possible additional
|
||||
# wrappers in CC/CXX, and by other subconfigures that do not handle those
|
||||
# options and do need CC/CXX altered.
|
||||
option('--with-compiler-wrapper', env='COMPILER_WRAPPER', nargs=1,
|
||||
help='Enable compiling with wrappers such as distcc and ccache')
|
||||
|
||||
js_option('--with-ccache', env='CCACHE', nargs='?',
|
||||
help='Enable compiling with ccache')
|
||||
option('--with-ccache', env='CCACHE', nargs='?',
|
||||
help='Enable compiling with ccache')
|
||||
|
||||
|
||||
@depends_if('--with-ccache')
|
||||
|
|
@ -226,9 +222,9 @@ def ccache(value):
|
|||
|
||||
ccache = check_prog('CCACHE', progs=(), input=ccache)
|
||||
|
||||
js_option(env='CCACHE_PREFIX',
|
||||
nargs=1,
|
||||
help='Compiler prefix to use when using ccache')
|
||||
option(env='CCACHE_PREFIX',
|
||||
nargs=1,
|
||||
help='Compiler prefix to use when using ccache')
|
||||
|
||||
ccache_prefix = depends_if('CCACHE_PREFIX')(lambda prefix: prefix[0])
|
||||
set_config('CCACHE_PREFIX', ccache_prefix)
|
||||
|
|
@ -250,8 +246,8 @@ def using_ccache(ccache, ccache_is_sccache):
|
|||
def using_sccache(ccache, ccache_is_sccache):
|
||||
return ccache and ccache_is_sccache
|
||||
|
||||
js_option(env='RUSTC_WRAPPER', nargs=1,
|
||||
help='Wrap rust compilation with given tool')
|
||||
option(env='RUSTC_WRAPPER', nargs=1,
|
||||
help='Wrap rust compilation with given tool')
|
||||
|
||||
@depends(ccache, ccache_is_sccache, 'RUSTC_WRAPPER')
|
||||
@imports(_from='textwrap', _import='dedent')
|
||||
|
|
@ -338,8 +334,8 @@ set_config('MOZ_HAZARD', hazard_analysis)
|
|||
|
||||
# Cross-compilation related things.
|
||||
# ==============================================================
|
||||
js_option('--with-toolchain-prefix', env='TOOLCHAIN_PREFIX', nargs=1,
|
||||
help='Prefix for the target toolchain')
|
||||
option('--with-toolchain-prefix', env='TOOLCHAIN_PREFIX', nargs=1,
|
||||
help='Prefix for the target toolchain')
|
||||
|
||||
|
||||
@depends('--with-toolchain-prefix', target, cross_compiling)
|
||||
|
|
@ -615,9 +611,9 @@ def host_is_windows(host):
|
|||
return True
|
||||
|
||||
|
||||
js_option('--with-visual-studio-version', nargs=1,
|
||||
choices=('2017',), when=host_is_windows,
|
||||
help='Select a specific Visual Studio version to use')
|
||||
option('--with-visual-studio-version', nargs=1,
|
||||
choices=('2017',), when=host_is_windows,
|
||||
help='Select a specific Visual Studio version to use')
|
||||
|
||||
|
||||
@depends('--with-visual-studio-version', when=host_is_windows)
|
||||
|
|
@ -626,8 +622,8 @@ def vs_major_version(value):
|
|||
return {'2017': 15}[value[0]]
|
||||
|
||||
|
||||
js_option(env='VC_PATH', nargs=1, when=host_is_windows,
|
||||
help='Path to the Microsoft Visual C/C++ compiler')
|
||||
option(env='VC_PATH', nargs=1, when=host_is_windows,
|
||||
help='Path to the Microsoft Visual C/C++ compiler')
|
||||
|
||||
|
||||
@depends(host, vs_major_version, check_build_environment, 'VC_PATH',
|
||||
|
|
@ -1298,9 +1294,9 @@ option(env='MOZ_DEBUG_FLAGS',
|
|||
imply_option('--enable-debug-symbols',
|
||||
depends_if('--enable-debug')(lambda v: v))
|
||||
|
||||
js_option('--disable-debug-symbols',
|
||||
nargs='?',
|
||||
help='Disable debug symbols using the given compiler flags')
|
||||
option('--disable-debug-symbols',
|
||||
nargs='?',
|
||||
help='Disable debug symbols using the given compiler flags')
|
||||
|
||||
set_config('MOZ_DEBUG_SYMBOLS',
|
||||
depends_if('--enable-debug-symbols')(lambda _: True))
|
||||
|
|
@ -1498,7 +1494,7 @@ set_config('PPC_VSX3_FLAGS',
|
|||
# ASAN
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-address-sanitizer', help='Enable Address Sanitizer')
|
||||
option('--enable-address-sanitizer', help='Enable Address Sanitizer')
|
||||
|
||||
|
||||
@depends(when='--enable-address-sanitizer')
|
||||
|
|
@ -1511,7 +1507,7 @@ add_old_configure_assignment('MOZ_ASAN', asan)
|
|||
# MSAN
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-memory-sanitizer', help='Enable Memory Sanitizer')
|
||||
option('--enable-memory-sanitizer', help='Enable Memory Sanitizer')
|
||||
|
||||
|
||||
@depends(when='--enable-memory-sanitizer')
|
||||
|
|
@ -1524,7 +1520,7 @@ add_old_configure_assignment('MOZ_MSAN', msan)
|
|||
# TSAN
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-thread-sanitizer', help='Enable Thread Sanitizer')
|
||||
option('--enable-thread-sanitizer', help='Enable Thread Sanitizer')
|
||||
|
||||
|
||||
@depends(when='--enable-thread-sanitizer')
|
||||
|
|
@ -1537,9 +1533,9 @@ add_old_configure_assignment('MOZ_TSAN', tsan)
|
|||
# UBSAN
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-undefined-sanitizer',
|
||||
nargs='*',
|
||||
help='Enable UndefinedBehavior Sanitizer')
|
||||
option('--enable-undefined-sanitizer',
|
||||
nargs='*',
|
||||
help='Enable UndefinedBehavior Sanitizer')
|
||||
|
||||
@depends_if('--enable-undefined-sanitizer')
|
||||
def ubsan(options):
|
||||
|
|
@ -1561,8 +1557,8 @@ def ubsan(options):
|
|||
add_old_configure_assignment('MOZ_UBSAN_CHECKS', ubsan)
|
||||
|
||||
|
||||
js_option('--enable-signed-overflow-sanitizer',
|
||||
help='Enable UndefinedBehavior Sanitizer (Signed Integer Overflow Parts)')
|
||||
option('--enable-signed-overflow-sanitizer',
|
||||
help='Enable UndefinedBehavior Sanitizer (Signed Integer Overflow Parts)')
|
||||
|
||||
|
||||
@depends(when='--enable-signed-overflow-sanitizer')
|
||||
|
|
@ -1573,8 +1569,8 @@ def ub_signed_overflow_san():
|
|||
add_old_configure_assignment('MOZ_SIGNED_OVERFLOW_SANITIZE', ub_signed_overflow_san)
|
||||
|
||||
|
||||
js_option('--enable-unsigned-overflow-sanitizer',
|
||||
help='Enable UndefinedBehavior Sanitizer (Unsigned Integer Overflow Parts)')
|
||||
option('--enable-unsigned-overflow-sanitizer',
|
||||
help='Enable UndefinedBehavior Sanitizer (Unsigned Integer Overflow Parts)')
|
||||
|
||||
|
||||
@depends(when='--enable-unsigned-overflow-sanitizer')
|
||||
|
|
@ -1724,8 +1720,8 @@ def frame_pointer_default(optimize, debug, target, msan, asan, ubsan):
|
|||
(target.os == 'WINNT' and target.cpu in ('x86', 'aarch64')))
|
||||
|
||||
|
||||
js_option('--enable-frame-pointers', default=frame_pointer_default,
|
||||
help='{Enable|Disable} frame pointers')
|
||||
option('--enable-frame-pointers', default=frame_pointer_default,
|
||||
help='{Enable|Disable} frame pointers')
|
||||
|
||||
|
||||
@depends('--enable-frame-pointers', frame_pointer_flags)
|
||||
|
|
@ -1811,8 +1807,8 @@ add_old_configure_assignment('YASM', have_yasm)
|
|||
# Code Coverage
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-coverage', env='MOZ_CODE_COVERAGE',
|
||||
help='Enable code coverage')
|
||||
option('--enable-coverage', env='MOZ_CODE_COVERAGE',
|
||||
help='Enable code coverage')
|
||||
|
||||
|
||||
@depends('--enable-coverage')
|
||||
|
|
@ -1869,9 +1865,9 @@ set_config('RUSTFLAGS', depends('RUSTFLAGS')(lambda flags: flags))
|
|||
# Rust compiler flags
|
||||
# ==============================================================
|
||||
|
||||
js_option(env='RUSTC_OPT_LEVEL',
|
||||
nargs=1,
|
||||
help='Rust compiler optimization level (-C opt-level=%s)')
|
||||
option(env='RUSTC_OPT_LEVEL',
|
||||
nargs=1,
|
||||
help='Rust compiler optimization level (-C opt-level=%s)')
|
||||
|
||||
# --enable-release kicks in full optimizations.
|
||||
imply_option('RUSTC_OPT_LEVEL', '2', when='--enable-release')
|
||||
|
|
@ -1933,8 +1929,8 @@ def rust_compile_flags(opt_level, debug_rust, debug_symbols, frame_pointers):
|
|||
# ==============================================================
|
||||
|
||||
|
||||
js_option('--disable-cargo-incremental',
|
||||
help='Disable incremental rust compilation.')
|
||||
option('--disable-cargo-incremental',
|
||||
help='Disable incremental rust compilation.')
|
||||
|
||||
@depends(rustc_opt_level, debug_rust, 'MOZ_AUTOMATION', code_coverage,
|
||||
'--disable-cargo-incremental', using_sccache, 'RUSTC_WRAPPER')
|
||||
|
|
@ -2025,10 +2021,10 @@ def enable_linker_default(target, developer_options):
|
|||
return 'lld' if developer_options else 'bfd'
|
||||
|
||||
|
||||
js_option('--enable-linker', nargs=1,
|
||||
help='Select the linker {bfd, gold, ld64, lld, lld-*}{|}',
|
||||
default=enable_linker_default,
|
||||
when=is_linker_option_enabled)
|
||||
option('--enable-linker', nargs=1,
|
||||
help='Select the linker {bfd, gold, ld64, lld, lld-*}{|}',
|
||||
default=enable_linker_default,
|
||||
when=is_linker_option_enabled)
|
||||
|
||||
|
||||
# No-op to enable depending on --enable-linker from default_elfhack in
|
||||
|
|
@ -2178,7 +2174,7 @@ add_old_configure_assignment('GCC_USE_GNU_LD', gcc_use_gnu_ld)
|
|||
# Assembler detection
|
||||
# ==============================================================
|
||||
|
||||
js_option(env='AS', nargs=1, help='Path to the assembler')
|
||||
option(env='AS', nargs=1, help='Path to the assembler')
|
||||
|
||||
@depends(target, c_compiler)
|
||||
def as_info(target, c_compiler):
|
||||
|
|
@ -2280,8 +2276,8 @@ set_config('ASOUTOPTION', as_outoption)
|
|||
# clang plugin handling
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-clang-plugin', env='ENABLE_CLANG_PLUGIN',
|
||||
help="Enable building with the Clang plugin (gecko specific static analyzers)")
|
||||
option('--enable-clang-plugin', env='ENABLE_CLANG_PLUGIN',
|
||||
help="Enable building with the Clang plugin (gecko specific static analyzers)")
|
||||
|
||||
add_old_configure_assignment('ENABLE_CLANG_PLUGIN',
|
||||
depends_if('--enable-clang-plugin')(lambda _: True))
|
||||
|
|
@ -2314,8 +2310,8 @@ llvm_config = check_prog('LLVM_CONFIG', llvm_config, what='llvm-config',
|
|||
add_old_configure_assignment('LLVM_CONFIG', llvm_config)
|
||||
|
||||
|
||||
js_option('--enable-clang-plugin-alpha', env='ENABLE_CLANG_PLUGIN_ALPHA',
|
||||
help='Enable static analysis with clang-plugin alpha checks.')
|
||||
option('--enable-clang-plugin-alpha', env='ENABLE_CLANG_PLUGIN_ALPHA',
|
||||
help='Enable static analysis with clang-plugin alpha checks.')
|
||||
|
||||
@depends('--enable-clang-plugin', '--enable-clang-plugin-alpha')
|
||||
def check_clang_plugin_alpha(enable_clang_plugin, enable_clang_plugin_alpha):
|
||||
|
|
@ -2327,8 +2323,8 @@ def check_clang_plugin_alpha(enable_clang_plugin, enable_clang_plugin_alpha):
|
|||
add_old_configure_assignment('ENABLE_CLANG_PLUGIN_ALPHA', check_clang_plugin_alpha)
|
||||
set_define('MOZ_CLANG_PLUGIN_ALPHA', check_clang_plugin_alpha)
|
||||
|
||||
js_option('--enable-mozsearch-plugin', env='ENABLE_MOZSEARCH_PLUGIN',
|
||||
help="Enable building with the mozsearch indexer plugin")
|
||||
option('--enable-mozsearch-plugin', env='ENABLE_MOZSEARCH_PLUGIN',
|
||||
help="Enable building with the mozsearch indexer plugin")
|
||||
|
||||
add_old_configure_assignment('ENABLE_MOZSEARCH_PLUGIN',
|
||||
depends_if('--enable-mozsearch-plugin')(lambda _: True))
|
||||
|
|
@ -2336,8 +2332,8 @@ add_old_configure_assignment('ENABLE_MOZSEARCH_PLUGIN',
|
|||
# Libstdc++ compatibility hacks
|
||||
# ==============================================================
|
||||
#
|
||||
js_option('--enable-stdcxx-compat', env='MOZ_STDCXX_COMPAT',
|
||||
help='Enable compatibility with older libstdc++')
|
||||
option('--enable-stdcxx-compat', env='MOZ_STDCXX_COMPAT',
|
||||
help='Enable compatibility with older libstdc++')
|
||||
|
||||
|
||||
@template
|
||||
|
|
@ -2374,7 +2370,7 @@ add_gcc_flag(
|
|||
|
||||
# Support various fuzzing options
|
||||
# ==============================================================
|
||||
js_option('--enable-fuzzing', help='Enable fuzzing support')
|
||||
option('--enable-fuzzing', help='Enable fuzzing support')
|
||||
|
||||
@depends('--enable-fuzzing')
|
||||
def enable_fuzzing(value):
|
||||
|
|
@ -2538,6 +2534,6 @@ add_old_configure_assignment('AR', ar)
|
|||
set_config('AR_FLAGS', ar_config.flags)
|
||||
|
||||
|
||||
js_option('--enable-cpp-rtti', help='Enable C++ RTTI')
|
||||
option('--enable-cpp-rtti', help='Enable C++ RTTI')
|
||||
|
||||
add_old_configure_assignment('_MOZ_USE_RTTI', '1', when='--enable-cpp-rtti')
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
# 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/.
|
||||
|
||||
js_option('--enable-warnings-as-errors', env='MOZ_ENABLE_WARNINGS_AS_ERRORS',
|
||||
default=depends('MOZ_AUTOMATION')(lambda x: bool(x)),
|
||||
help='{Enable|Disable} treating warnings as errors')
|
||||
option('--enable-warnings-as-errors', env='MOZ_ENABLE_WARNINGS_AS_ERRORS',
|
||||
default=depends('MOZ_AUTOMATION')(lambda x: bool(x)),
|
||||
help='{Enable|Disable} treating warnings as errors')
|
||||
|
||||
|
||||
@depends('--enable-warnings-as-errors')
|
||||
|
|
|
|||
|
|
@ -457,12 +457,12 @@ def sdk_bin_path(valid_windows_sdk_dir, valid_ucrt_sdk_dir, host):
|
|||
return result
|
||||
|
||||
|
||||
js_option(env='LINKER', nargs=1, when=target_is_windows, help='Path to the linker')
|
||||
option(env='LINKER', nargs=1, when=target_is_windows, help='Path to the linker')
|
||||
|
||||
link = check_prog('LINKER', ('lld-link',), input='LINKER',
|
||||
when=target_is_windows, paths=toolchain_search_path)
|
||||
|
||||
js_option(env='HOST_LINKER', nargs=1, when=host_is_windows, help='Path to the host linker')
|
||||
option(env='HOST_LINKER', nargs=1, when=host_is_windows, help='Path to the host linker')
|
||||
|
||||
host_link = check_prog('HOST_LINKER', ('lld-link',), input='HOST_LINKER',
|
||||
when=host_is_windows, paths=host_toolchain_search_path)
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ def force_system_ffi(target):
|
|||
|
||||
imply_option('--with-system-ffi', force_system_ffi, "target")
|
||||
|
||||
js_option('--with-system-ffi',
|
||||
help='Use system libffi (located with pkgconfig)')
|
||||
option('--with-system-ffi',
|
||||
help='Use system libffi (located with pkgconfig)')
|
||||
|
||||
use_system_ffi = depends_if('--with-system-ffi')(lambda _: True)
|
||||
|
||||
|
|
|
|||
209
js/moz.configure
209
js/moz.configure
|
|
@ -4,9 +4,6 @@
|
|||
# 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/.
|
||||
|
||||
# /!\ Use js_option() instead of option() in this file. /!\
|
||||
# =========================================================
|
||||
|
||||
@depends(build_project)
|
||||
def js_standalone(build_project):
|
||||
if build_project == 'js':
|
||||
|
|
@ -14,9 +11,9 @@ def js_standalone(build_project):
|
|||
|
||||
# Branding
|
||||
# ==============================================================
|
||||
js_option('--with-app-name', env='MOZ_APP_NAME', nargs=1,
|
||||
help='Used for e.g. the binary program file name. If not set, '
|
||||
'defaults to a lowercase form of MOZ_APP_BASENAME.')
|
||||
option('--with-app-name', env='MOZ_APP_NAME', nargs=1,
|
||||
help='Used for e.g. the binary program file name. If not set, '
|
||||
'defaults to a lowercase form of MOZ_APP_BASENAME.')
|
||||
|
||||
@depends('--with-app-name', js_standalone, moz_app_basename)
|
||||
def moz_app_name(value, js_standalone, moz_app_basename):
|
||||
|
|
@ -32,8 +29,8 @@ set_config('MOZ_APP_NAME', moz_app_name)
|
|||
# ==================================================
|
||||
|
||||
# Define here in order to use the option from bindgen.configure.
|
||||
js_option('--enable-smoosh', default=False,
|
||||
help='Enable SmooshMonkey (new JS engine frontend)')
|
||||
option('--enable-smoosh', default=False,
|
||||
help='Enable SmooshMonkey (new JS engine frontend)')
|
||||
|
||||
@depends('--enable-smoosh')
|
||||
def enable_smoosh(value):
|
||||
|
|
@ -53,8 +50,8 @@ include('../build/moz.configure/bindgen.configure',
|
|||
set_config('JS_STANDALONE', js_standalone)
|
||||
set_define('JS_STANDALONE', js_standalone)
|
||||
add_old_configure_assignment('JS_STANDALONE', js_standalone)
|
||||
js_option('--enable-js-shell', default=js_standalone,
|
||||
help='{Build|Do not build} the JS shell')
|
||||
option('--enable-js-shell', default=js_standalone,
|
||||
help='{Build|Do not build} the JS shell')
|
||||
|
||||
@depends('--enable-js-shell')
|
||||
def js_disable_shell(value):
|
||||
|
|
@ -71,11 +68,11 @@ set_define('JS_NUNBOX32', depends(target)(lambda t: t.bitness == 32 or None))
|
|||
|
||||
# SpiderMonkey as a shared library, and how its symbols are exported
|
||||
# ==================================================================
|
||||
js_option('--disable-shared-js', when=js_standalone,
|
||||
help='{Create|Do not create} a shared library')
|
||||
option('--disable-shared-js', when=js_standalone,
|
||||
help='{Create|Do not create} a shared library')
|
||||
|
||||
js_option('--disable-export-js', when=js_standalone,
|
||||
help='{Mark|Do not mark} JS symbols as DLL exported/visible')
|
||||
option('--disable-export-js', when=js_standalone,
|
||||
help='{Mark|Do not mark} JS symbols as DLL exported/visible')
|
||||
|
||||
@depends('--disable-shared-js', '--disable-export-js', when=js_standalone)
|
||||
def shared_js(shared_js, export_js):
|
||||
|
|
@ -109,8 +106,8 @@ def static_js(value):
|
|||
set_define('MOZ_STATIC_JS', static_js)
|
||||
|
||||
|
||||
js_option(env='NO_RUST_PANIC_HOOK', when=js_standalone,
|
||||
help='Disable rust panic hook')
|
||||
option(env='NO_RUST_PANIC_HOOK', when=js_standalone,
|
||||
help='Disable rust panic hook')
|
||||
|
||||
set_define('NO_RUST_PANIC_HOOK', True, when='NO_RUST_PANIC_HOOK')
|
||||
|
||||
|
|
@ -123,9 +120,9 @@ def jit_default(target):
|
|||
return True
|
||||
return False
|
||||
|
||||
js_option('--enable-jit',
|
||||
default=jit_default,
|
||||
help='{Enable|Disable} use of the JITs')
|
||||
option('--enable-jit',
|
||||
default=jit_default,
|
||||
help='{Enable|Disable} use of the JITs')
|
||||
|
||||
@deprecated_option('--enable-ion')
|
||||
def report_deprecated(value):
|
||||
|
|
@ -136,9 +133,9 @@ def report_deprecated(value):
|
|||
|
||||
# JIT code simulator for cross compiles
|
||||
# =======================================================
|
||||
js_option('--enable-simulator', choices=('arm', 'arm64', 'mips32', 'mips64'),
|
||||
nargs=1,
|
||||
help='Enable a JIT code simulator for the specified architecture')
|
||||
option('--enable-simulator', choices=('arm', 'arm64', 'mips32', 'mips64'),
|
||||
nargs=1,
|
||||
help='Enable a JIT code simulator for the specified architecture')
|
||||
|
||||
@depends('--enable-jit', '--enable-simulator', target, '--help')
|
||||
def simulator(jit_enabled, simulator_enabled, target, _):
|
||||
|
|
@ -200,8 +197,8 @@ set_define('JS_CODEGEN_X64', jit_codegen.x64)
|
|||
|
||||
# Profiling
|
||||
# =======================================================
|
||||
js_option('--enable-instruments', env='MOZ_INSTRUMENTS',
|
||||
help='Enable instruments remote profiling')
|
||||
option('--enable-instruments', env='MOZ_INSTRUMENTS',
|
||||
help='Enable instruments remote profiling')
|
||||
|
||||
@depends('--enable-instruments', target)
|
||||
def instruments(value, target):
|
||||
|
|
@ -216,8 +213,8 @@ set_define('MOZ_INSTRUMENTS', instruments)
|
|||
add_old_configure_assignment('MOZ_INSTRUMENTS', instruments)
|
||||
imply_option('--enable-profiling', instruments, reason='--enable-instruments')
|
||||
|
||||
js_option('--enable-callgrind', env='MOZ_CALLGRIND',
|
||||
help='Enable callgrind profiling')
|
||||
option('--enable-callgrind', env='MOZ_CALLGRIND',
|
||||
help='Enable callgrind profiling')
|
||||
|
||||
@depends('--enable-callgrind')
|
||||
def callgrind(value):
|
||||
|
|
@ -231,9 +228,9 @@ imply_option('--enable-profiling', callgrind)
|
|||
def enable_profiling(milestone):
|
||||
return milestone.is_nightly
|
||||
|
||||
js_option('--enable-profiling', env='MOZ_PROFILING', default=enable_profiling,
|
||||
help='{Set|Do not set} compile flags necessary for using sampling '
|
||||
'profilers (e.g. shark, perf)')
|
||||
option('--enable-profiling', env='MOZ_PROFILING', default=enable_profiling,
|
||||
help='{Set|Do not set} compile flags necessary for using sampling '
|
||||
'profilers (e.g. shark, perf)')
|
||||
|
||||
@depends('--enable-profiling')
|
||||
def profiling(value):
|
||||
|
|
@ -260,7 +257,7 @@ set_define('MOZ_PROFILING', profiling)
|
|||
imply_option('--enable-vtune', imply_vtune, reason='--enable-profiling')
|
||||
|
||||
|
||||
js_option('--enable-vtune', env='MOZ_VTUNE', help='Enable VTune profiling')
|
||||
option('--enable-vtune', env='MOZ_VTUNE', help='Enable VTune profiling')
|
||||
|
||||
@depends('--enable-vtune')
|
||||
def vtune(value):
|
||||
|
|
@ -271,8 +268,8 @@ set_config('MOZ_VTUNE', vtune)
|
|||
set_define('MOZ_VTUNE', vtune)
|
||||
|
||||
|
||||
js_option('--enable-gc-probes', env='JS_GC_PROBES',
|
||||
help='Turn on probes for allocation and finalization')
|
||||
option('--enable-gc-probes', env='JS_GC_PROBES',
|
||||
help='Turn on probes for allocation and finalization')
|
||||
|
||||
@depends('--enable-gc-probes')
|
||||
def gc_probes(value):
|
||||
|
|
@ -282,9 +279,9 @@ def gc_probes(value):
|
|||
set_define('JS_GC_PROBES', gc_probes)
|
||||
|
||||
|
||||
js_option('--enable-gczeal',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} zealous GCing')
|
||||
option('--enable-gczeal',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} zealous GCing')
|
||||
|
||||
set_define('JS_GC_ZEAL',
|
||||
depends_if('--enable-gczeal')(lambda _: True))
|
||||
|
|
@ -294,8 +291,8 @@ set_define('JS_GC_ZEAL',
|
|||
# ========================================================
|
||||
# Use large (1MB) chunks by default. This option can be used to give
|
||||
# smaller (currently 256K) chunks.
|
||||
js_option('--enable-small-chunk-size',
|
||||
help='Allocate memory for JS GC things in smaller chunks')
|
||||
option('--enable-small-chunk-size',
|
||||
help='Allocate memory for JS GC things in smaller chunks')
|
||||
|
||||
set_define('JS_GC_SMALL_CHUNK_SIZE',
|
||||
depends(when='--enable-small-chunk-size')(lambda: True))
|
||||
|
|
@ -308,9 +305,9 @@ def default_trace_logging(milestone):
|
|||
return milestone.is_nightly
|
||||
|
||||
|
||||
js_option('--enable-trace-logging',
|
||||
default=default_trace_logging,
|
||||
help='{Enable|Disable} trace logging')
|
||||
option('--enable-trace-logging',
|
||||
default=default_trace_logging,
|
||||
help='{Enable|Disable} trace logging')
|
||||
|
||||
set_config('ENABLE_TRACE_LOGGING',
|
||||
depends_if('--enable-trace-logging')(lambda x: True))
|
||||
|
|
@ -320,15 +317,15 @@ set_define('JS_TRACE_LOGGING',
|
|||
|
||||
# Enable breakpoint for artificial OOMs
|
||||
# =======================================================
|
||||
js_option('--enable-oom-breakpoint',
|
||||
help='Enable a breakpoint function for artificial OOMs')
|
||||
option('--enable-oom-breakpoint',
|
||||
help='Enable a breakpoint function for artificial OOMs')
|
||||
|
||||
set_define('JS_OOM_BREAKPOINT',
|
||||
depends_if('--enable-oom-breakpoint')(lambda _: True))
|
||||
|
||||
|
||||
js_option('--enable-perf', env='JS_ION_PERF',
|
||||
help='Enable Linux perf integration')
|
||||
option('--enable-perf', env='JS_ION_PERF',
|
||||
help='Enable Linux perf integration')
|
||||
|
||||
@depends('--enable-perf')
|
||||
def ion_perf(value):
|
||||
|
|
@ -338,10 +335,10 @@ def ion_perf(value):
|
|||
set_define('JS_ION_PERF', ion_perf)
|
||||
|
||||
|
||||
js_option('--enable-jitspew',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} the Jit spew and IONFLAGS environment '
|
||||
'variable')
|
||||
option('--enable-jitspew',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} the Jit spew and IONFLAGS environment '
|
||||
'variable')
|
||||
|
||||
set_define('JS_JITSPEW',
|
||||
depends_if('--enable-jitspew')(lambda _: True))
|
||||
|
|
@ -388,17 +385,17 @@ set_define('JS_DISASM_ARM64', jit_disasm_arm64)
|
|||
# assertions in the generated code. This option is worth disabling when you
|
||||
# have to track mutated values through the generated code, to avoid constantly
|
||||
# dumping registers on and off the stack.
|
||||
js_option('--enable-masm-verbose',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} MacroAssembler verbosity of generated code.')
|
||||
option('--enable-masm-verbose',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} MacroAssembler verbosity of generated code.')
|
||||
set_define('JS_MASM_VERBOSE',
|
||||
depends_if('--enable-masm-verbose')(lambda _: True))
|
||||
set_config('JS_MASM_VERBOSE',
|
||||
depends_if('--enable-masm-verbose')(lambda _: True))
|
||||
|
||||
|
||||
js_option('--enable-more-deterministic', env='JS_MORE_DETERMINISTIC',
|
||||
help='Enable changes that make the shell more deterministic')
|
||||
option('--enable-more-deterministic', env='JS_MORE_DETERMINISTIC',
|
||||
help='Enable changes that make the shell more deterministic')
|
||||
|
||||
@depends('--enable-more-deterministic')
|
||||
def more_deterministic(value):
|
||||
|
|
@ -414,9 +411,9 @@ set_define('JS_MORE_DETERMINISTIC', more_deterministic)
|
|||
def ctypes_default(js_standalone):
|
||||
return not js_standalone
|
||||
|
||||
js_option('--enable-ctypes',
|
||||
default=ctypes_default,
|
||||
help='{Enable|Disable} js-ctypes')
|
||||
option('--enable-ctypes',
|
||||
default=ctypes_default,
|
||||
help='{Enable|Disable} js-ctypes')
|
||||
|
||||
build_ctypes = depends_if('--enable-ctypes')(lambda _: True)
|
||||
|
||||
|
|
@ -435,7 +432,7 @@ include('ffi.configure', when=ctypes_and_compile_environment)
|
|||
|
||||
# Enable pipeline operator
|
||||
# ===================================================
|
||||
js_option('--enable-pipeline-operator', default=False, help='Enable pipeline operator')
|
||||
option('--enable-pipeline-operator', default=False, help='Enable pipeline operator')
|
||||
|
||||
@depends('--enable-pipeline-operator')
|
||||
def enable_pipeline_operator(value):
|
||||
|
|
@ -449,8 +446,8 @@ set_define('ENABLE_PIPELINE_OPERATOR', enable_pipeline_operator)
|
|||
# SIMD acceleration for encoding_rs
|
||||
# ==============================================================
|
||||
|
||||
js_option('--enable-rust-simd', env='MOZ_RUST_SIMD',
|
||||
help='Enable explicit SIMD in Rust code.')
|
||||
option('--enable-rust-simd', env='MOZ_RUST_SIMD',
|
||||
help='Enable explicit SIMD in Rust code.')
|
||||
|
||||
@depends('--enable-rust-simd', target)
|
||||
def rust_simd(value, target):
|
||||
|
|
@ -471,9 +468,9 @@ def cranelift_default(is_nightly, target):
|
|||
if is_nightly and (target.cpu == 'aarch64' or target.cpu == 'x86_64'):
|
||||
return True
|
||||
|
||||
js_option('--enable-cranelift',
|
||||
default=cranelift_default,
|
||||
help='{Enable|Disable} Cranelift code generator for wasm')
|
||||
option('--enable-cranelift',
|
||||
default=cranelift_default,
|
||||
help='{Enable|Disable} Cranelift code generator for wasm')
|
||||
|
||||
set_config('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: True))
|
||||
set_define('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: True))
|
||||
|
|
@ -481,18 +478,18 @@ set_define('ENABLE_WASM_CRANELIFT', depends_if('--enable-cranelift')(lambda x: T
|
|||
# Telemetry to measure compile time and generated-code runtime
|
||||
# ============================================================
|
||||
|
||||
js_option('--enable-spidermonkey-telemetry',
|
||||
default=milestone.is_nightly,
|
||||
help='{Enable|Disable} performance telemetry for SpiderMonkey (e.g. compile and run times)')
|
||||
option('--enable-spidermonkey-telemetry',
|
||||
default=milestone.is_nightly,
|
||||
help='{Enable|Disable} performance telemetry for SpiderMonkey (e.g. compile and run times)')
|
||||
|
||||
set_define('ENABLE_SPIDERMONKEY_TELEMETRY', depends_if('--enable-spidermonkey-telemetry')(lambda x: True))
|
||||
|
||||
# Support for debugging code generated by wasm backends
|
||||
# =====================================================
|
||||
|
||||
js_option('--enable-wasm-codegen-debug',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} debugging for wasm codegen')
|
||||
option('--enable-wasm-codegen-debug',
|
||||
default=depends(when=moz_debug)(lambda: True),
|
||||
help='{Enable|Disable} debugging for wasm codegen')
|
||||
|
||||
set_config('WASM_CODEGEN_DEBUG', depends_if('--enable-wasm-codegen-debug')(lambda x: True))
|
||||
set_define('WASM_CODEGEN_DEBUG', depends_if('--enable-wasm-codegen-debug')(lambda x: True))
|
||||
|
|
@ -505,9 +502,9 @@ set_define('WASM_CODEGEN_DEBUG', depends_if('--enable-wasm-codegen-debug')(lambd
|
|||
def default_typed_objects(is_nightly):
|
||||
return is_nightly
|
||||
|
||||
js_option('--enable-typed-objects',
|
||||
default=default_typed_objects,
|
||||
help='{Enable|Disable} typed objects')
|
||||
option('--enable-typed-objects',
|
||||
default=default_typed_objects,
|
||||
help='{Enable|Disable} typed objects')
|
||||
|
||||
set_config('JS_HAS_TYPED_OBJECTS', depends_if('--enable-typed-objects')(lambda x: True))
|
||||
set_define('JS_HAS_TYPED_OBJECTS', depends_if('--enable-typed-objects')(lambda x: True))
|
||||
|
|
@ -516,8 +513,8 @@ set_define('JS_HAS_TYPED_OBJECTS', depends_if('--enable-typed-objects')(lambda x
|
|||
# Support for WebAssembly reference types.
|
||||
# =====================================================
|
||||
|
||||
js_option('--disable-wasm-reftypes',
|
||||
help='Disable WebAssembly reference types')
|
||||
option('--disable-wasm-reftypes',
|
||||
help='Disable WebAssembly reference types')
|
||||
|
||||
@depends('--disable-wasm-reftypes')
|
||||
def enable_wasm_reftypes(value):
|
||||
|
|
@ -535,9 +532,9 @@ def default_wasm_function_references(is_nightly, reftypes):
|
|||
if is_nightly and reftypes:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-function-references',
|
||||
default=default_wasm_function_references,
|
||||
help='{Enable|Disable} WebAssembly function-references')
|
||||
option('--enable-wasm-function-references',
|
||||
default=default_wasm_function_references,
|
||||
help='{Enable|Disable} WebAssembly function-references')
|
||||
|
||||
@depends('--enable-wasm-function-references', '--disable-wasm-reftypes')
|
||||
def wasm_function_references(value, reftypes):
|
||||
|
|
@ -560,9 +557,9 @@ def default_wasm_gc(is_nightly, function_references, typed_objects):
|
|||
if is_nightly and function_references and typed_objects:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-gc',
|
||||
default=default_wasm_gc,
|
||||
help='{Enable|Disable} WebAssembly GC')
|
||||
option('--enable-wasm-gc',
|
||||
default=default_wasm_gc,
|
||||
help='{Enable|Disable} WebAssembly GC')
|
||||
|
||||
@depends('--enable-wasm-gc', '--enable-wasm-function-references', '--enable-typed-objects')
|
||||
def wasm_gc(value, function_references, typed_objects):
|
||||
|
|
@ -588,9 +585,9 @@ def default_wasm_private_reftypes(is_nightly, gc):
|
|||
if gc and is_nightly:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-private-reftypes',
|
||||
default=default_wasm_private_reftypes,
|
||||
help='{Enable|Disable} WebAssembly private reference types')
|
||||
option('--enable-wasm-private-reftypes',
|
||||
default=default_wasm_private_reftypes,
|
||||
help='{Enable|Disable} WebAssembly private reference types')
|
||||
|
||||
set_config('WASM_PRIVATE_REFTYPES', depends_if('--enable-wasm-private-reftypes')(lambda x: True))
|
||||
set_define('WASM_PRIVATE_REFTYPES', depends_if('--enable-wasm-private-reftypes')(lambda x: True))
|
||||
|
|
@ -600,8 +597,8 @@ set_define('WASM_PRIVATE_REFTYPES', depends_if('--enable-wasm-private-reftypes')
|
|||
# Do not remove until Cranelift supports multi-value.
|
||||
# =====================================================
|
||||
|
||||
js_option('--disable-wasm-multi-value',
|
||||
help='Disable WebAssembly multi-value blocks and function calls')
|
||||
option('--disable-wasm-multi-value',
|
||||
help='Disable WebAssembly multi-value blocks and function calls')
|
||||
|
||||
@depends('--disable-wasm-multi-value')
|
||||
def enable_wasm_multi_value(value):
|
||||
|
|
@ -619,7 +616,7 @@ set_define('ENABLE_WASM_MULTI_VALUE', enable_wasm_multi_value)
|
|||
# and atomics it can go away.
|
||||
# =====================================================
|
||||
|
||||
js_option('--disable-shared-memory', help='Disable JS/WebAssembly shared memory and atomics')
|
||||
option('--disable-shared-memory', help='Disable JS/WebAssembly shared memory and atomics')
|
||||
|
||||
@depends('--disable-shared-memory')
|
||||
def enable_shared_memory(value):
|
||||
|
|
@ -645,9 +642,9 @@ def default_wasm_simd(jit_enabled, simulator, target):
|
|||
if target.cpu in ('x86_64', 'x86'):
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-simd',
|
||||
default=default_wasm_simd,
|
||||
help='{Enable|Disable} WebAssembly SIMD')
|
||||
option('--enable-wasm-simd',
|
||||
default=default_wasm_simd,
|
||||
help='{Enable|Disable} WebAssembly SIMD')
|
||||
|
||||
@depends('--enable-wasm-simd', '--enable-jit', '--enable-simulator', target)
|
||||
def wasm_simd(value, jit_enabled, simulator, target):
|
||||
|
|
@ -673,9 +670,9 @@ def default_wasm_simd_experimental(is_nightly, wasm_simd):
|
|||
if is_nightly and wasm_simd:
|
||||
return True
|
||||
|
||||
js_option('--enable-wasm-simd-experimental',
|
||||
default=default_wasm_simd_experimental,
|
||||
help='{Enable|Disable} WebAssembly SIMD experimental opcodes')
|
||||
option('--enable-wasm-simd-experimental',
|
||||
default=default_wasm_simd_experimental,
|
||||
help='{Enable|Disable} WebAssembly SIMD experimental opcodes')
|
||||
|
||||
@depends('--enable-wasm-simd-experimental', '--enable-wasm-simd')
|
||||
def wasm_simd_experimental(value, wasm_simd):
|
||||
|
|
@ -692,17 +689,17 @@ set_define('ENABLE_WASM_SIMD_EXPERIMENTAL', wasm_simd_experimental)
|
|||
|
||||
# Options for generating the shell as a script
|
||||
# ============================================
|
||||
js_option('--with-qemu-exe', nargs=1, help='Use path as an arm emulator on host platforms')
|
||||
option('--with-qemu-exe', nargs=1, help='Use path as an arm emulator on host platforms')
|
||||
set_config('QEMU_EXE', depends_if('--with-qemu-exe')(lambda x: x))
|
||||
|
||||
js_option('--with-cross-lib', nargs=1, default=depends(target.alias)(lambda x: '/usr/%s' % x),
|
||||
help='Use dir as the location for arm libraries')
|
||||
option('--with-cross-lib', nargs=1, default=depends(target.alias)(lambda x: '/usr/%s' % x),
|
||||
help='Use dir as the location for arm libraries')
|
||||
set_config('CROSS_LIB', depends_if('--with-cross-lib')(lambda x: x))
|
||||
|
||||
# Enable static checking using sixgill
|
||||
# ====================================
|
||||
|
||||
js_option('--with-sixgill', nargs=1, help='Enable static checking of code using sixgill')
|
||||
option('--with-sixgill', nargs=1, help='Enable static checking of code using sixgill')
|
||||
|
||||
@depends_if('--with-sixgill')
|
||||
@imports('os')
|
||||
|
|
@ -721,8 +718,8 @@ set_config('SIXGILL_PATH', sixgill)
|
|||
def editline(js_shell, is_windows, compile_environment):
|
||||
return js_shell and not is_windows and compile_environment
|
||||
|
||||
js_option('--enable-readline', help='Link js shell to system readline library',
|
||||
when=editline)
|
||||
option('--enable-readline', help='Link js shell to system readline library',
|
||||
when=editline)
|
||||
|
||||
has_readline = check_symbol('readline', flags=['-lreadline'], when='--enable-readline',
|
||||
onerror=lambda: die('No system readline library found'))
|
||||
|
|
@ -741,10 +738,10 @@ set_define('EDITLINE', True, when=editline)
|
|||
# JIT observers
|
||||
# =============
|
||||
|
||||
js_option('--with-jitreport-granularity', default='3', choices=('0', '1', '2', '3'),
|
||||
help='Default granularity at which to report JIT code to external tools '
|
||||
'(0 - no info, 1 - code ranges for while functions only, '
|
||||
'2 - per-line information, 3 - per-op information)')
|
||||
option('--with-jitreport-granularity', default='3', choices=('0', '1', '2', '3'),
|
||||
help='Default granularity at which to report JIT code to external tools '
|
||||
'(0 - no info, 1 - code ranges for while functions only, '
|
||||
'2 - per-line information, 3 - per-op information)')
|
||||
|
||||
set_define('JS_DEFAULT_JITREPORT_GRANULARITY',
|
||||
depends_if('--with-jitreport-granularity')(lambda value: value[0]))
|
||||
|
|
@ -752,14 +749,14 @@ set_define('JS_DEFAULT_JITREPORT_GRANULARITY',
|
|||
|
||||
# ECMAScript Internationalization API Support (uses ICU)
|
||||
# ======================================================
|
||||
js_option('--with-system-icu', help='Use system ICU')
|
||||
option('--with-system-icu', help='Use system ICU')
|
||||
|
||||
system_icu = pkg_check_modules('MOZ_ICU', 'icu-i18n >= 67.1', when='--with-system-icu')
|
||||
|
||||
set_config('MOZ_SYSTEM_ICU', True, when=system_icu)
|
||||
set_define('MOZ_SYSTEM_ICU', True, when=system_icu)
|
||||
|
||||
js_option('--without-intl-api', help='Disable ECMAScript Internationalization API')
|
||||
option('--without-intl-api', help='Disable ECMAScript Internationalization API')
|
||||
|
||||
@depends('--with-intl-api', js_standalone)
|
||||
def check_intl_api(enabled, js_standalone):
|
||||
|
|
@ -810,9 +807,9 @@ def can_build_data_file(yasm, gnu_as, target, compile_environment):
|
|||
def default_wasm_type_reflections(is_nightly):
|
||||
return is_nightly
|
||||
|
||||
js_option('--enable-wasm-type-reflections',
|
||||
default=default_wasm_type_reflections,
|
||||
help='{Enable|Disable} type reflection in WASM JS-API')
|
||||
option('--enable-wasm-type-reflections',
|
||||
default=default_wasm_type_reflections,
|
||||
help='{Enable|Disable} type reflection in WASM JS-API')
|
||||
|
||||
set_config('ENABLE_WASM_TYPE_REFLECTIONS', depends_if('--enable-wasm-type-reflections')(lambda x: True))
|
||||
set_define('ENABLE_WASM_TYPE_REFLECTIONS', depends_if('--enable-wasm-type-reflections')(lambda x: True))
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ def compile_environment(compile_env):
|
|||
set_config('COMPILE_ENVIRONMENT', compile_environment)
|
||||
add_old_configure_assignment('COMPILE_ENVIRONMENT', compile_environment)
|
||||
|
||||
js_option('--disable-tests',
|
||||
help='Do not build test libraries & programs')
|
||||
option('--disable-tests',
|
||||
help='Do not build test libraries & programs')
|
||||
|
||||
@depends('--disable-tests')
|
||||
def enable_tests(value):
|
||||
|
|
@ -100,10 +100,10 @@ set_define('GTEST_USE_OWN_TR1_TUPLE',
|
|||
set_define('GTEST_HAS_CLONE',
|
||||
linux_gtest_defines.has_clone)
|
||||
|
||||
js_option('--enable-debug',
|
||||
nargs='?',
|
||||
help='Enable building with developer debug info '
|
||||
'(using the given compiler flags).')
|
||||
option('--enable-debug',
|
||||
nargs='?',
|
||||
help='Enable building with developer debug info '
|
||||
'(using the given compiler flags).')
|
||||
|
||||
@depends('--enable-debug')
|
||||
def moz_debug(debug):
|
||||
|
|
@ -117,8 +117,8 @@ set_define('MOZ_DEBUG', moz_debug)
|
|||
add_old_configure_assignment('MOZ_DEBUG',
|
||||
depends('--enable-debug')(lambda x: bool(x)))
|
||||
|
||||
js_option('--with-debug-label', nargs='+',
|
||||
help='Debug DEBUG_<value> for each comma-separated value given')
|
||||
option('--with-debug-label', nargs='+',
|
||||
help='Debug DEBUG_<value> for each comma-separated value given')
|
||||
|
||||
@depends(moz_debug, '--with-debug-label')
|
||||
def debug_defines(debug, labels):
|
||||
|
|
@ -128,10 +128,10 @@ def debug_defines(debug, labels):
|
|||
|
||||
set_config('MOZ_DEBUG_DEFINES', debug_defines)
|
||||
|
||||
js_option('--enable-rust-debug',
|
||||
default=depends(when='--enable-debug')(lambda: True),
|
||||
help='{Build|Do not build} Rust code with debug assertions turned '
|
||||
'on.')
|
||||
option('--enable-rust-debug',
|
||||
default=depends(when='--enable-debug')(lambda: True),
|
||||
help='{Build|Do not build} Rust code with debug assertions turned '
|
||||
'on.')
|
||||
|
||||
@depends(when='--enable-rust-debug')
|
||||
def debug_rust():
|
||||
|
|
@ -140,7 +140,7 @@ def debug_rust():
|
|||
set_config('MOZ_DEBUG_RUST', debug_rust)
|
||||
set_define('MOZ_DEBUG_RUST', debug_rust)
|
||||
|
||||
js_option(env='MOZ_PGO', help='Build with profile guided optimizations')
|
||||
option(env='MOZ_PGO', help='Build with profile guided optimizations')
|
||||
|
||||
set_config('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
|
||||
|
||||
|
|
@ -172,8 +172,8 @@ include('build/moz.configure/flags.configure',
|
|||
when='--enable-compile-environment')
|
||||
# rust.configure is included by js/moz.configure.
|
||||
|
||||
js_option('--enable-valgrind',
|
||||
help='Enable Valgrind integration hooks')
|
||||
option('--enable-valgrind',
|
||||
help='Enable Valgrind integration hooks')
|
||||
|
||||
valgrind_h = check_header('valgrind/valgrind.h', when='--enable-valgrind')
|
||||
|
||||
|
|
@ -656,7 +656,7 @@ llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
|
|||
add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
|
||||
|
||||
|
||||
js_option('--enable-dtrace', help='Build with dtrace support')
|
||||
option('--enable-dtrace', help='Build with dtrace support')
|
||||
|
||||
dtrace = check_header('sys/sdt.h', when='--enable-dtrace',
|
||||
onerror=lambda: die('dtrace enabled but sys/sdt.h not found'))
|
||||
|
|
@ -666,14 +666,14 @@ set_define('INCLUDE_MOZILLA_DTRACE', True, when=dtrace)
|
|||
add_old_configure_assignment('enable_dtrace', 'yes', when=dtrace)
|
||||
|
||||
|
||||
js_option('--disable-icf', help='Disable Identical Code Folding')
|
||||
option('--disable-icf', help='Disable Identical Code Folding')
|
||||
|
||||
add_old_configure_assignment(
|
||||
'MOZ_DISABLE_ICF', '1', when=depends('--enable-icf')(lambda x: not x))
|
||||
|
||||
|
||||
js_option('--enable-strip', when=compile_environment,
|
||||
help='Enable stripping of libs & executables')
|
||||
option('--enable-strip', when=compile_environment,
|
||||
help='Enable stripping of libs & executables')
|
||||
|
||||
# This should be handled as a `when` once bug 1617793 is fixed.
|
||||
@depends('--enable-strip', c_compiler, when=compile_environment)
|
||||
|
|
@ -683,8 +683,8 @@ def enable_strip(strip, c_compiler):
|
|||
|
||||
set_config('ENABLE_STRIP', enable_strip)
|
||||
|
||||
js_option('--disable-install-strip', when=compile_environment,
|
||||
help='Enable stripping of libs & executables when packaging')
|
||||
option('--disable-install-strip', when=compile_environment,
|
||||
help='Enable stripping of libs & executables when packaging')
|
||||
|
||||
# This should be handled as a `when` once bug 1617793 is fixed.
|
||||
@depends('--enable-install-strip', c_compiler, when=compile_environment)
|
||||
|
|
@ -699,7 +699,7 @@ set_config('PKG_STRIP', enable_install_strip)
|
|||
def strip(strip, install_strip):
|
||||
return strip or install_strip
|
||||
|
||||
js_option(env='STRIP_FLAGS', nargs=1, when=strip, help='Flags for the strip command')
|
||||
option(env='STRIP_FLAGS', nargs=1, when=strip, help='Flags for the strip command')
|
||||
|
||||
@depends('STRIP_FLAGS', target, when=strip)
|
||||
def strip_flags(flags, target):
|
||||
|
|
@ -717,8 +717,8 @@ set_config('STRIP_FLAGS', strip_flags)
|
|||
def system_zlib_default(js_standalone, target):
|
||||
return js_standalone and target.kernel != 'WINNT'
|
||||
|
||||
js_option('--with-system-zlib', nargs='?', default=system_zlib_default,
|
||||
help='{Use|Do not use} system libz')
|
||||
option('--with-system-zlib', nargs='?', default=system_zlib_default,
|
||||
help='{Use|Do not use} system libz')
|
||||
|
||||
@depends('--with-system-zlib')
|
||||
def deprecated_system_zlib_path(value):
|
||||
|
|
|
|||
Loading…
Reference in a new issue