зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1669633 - Remove the JS_STANDALONE option. r=firefox-build-system-reviewers,rstewart
It was only meant to be used internally, when the top-level python configure invoked the js python subconfigure. Now that this doesn't happen, we can remove the option, and consolidate js_standalone and building_js, which are now roughly synonyms. Differential Revision: https://phabricator.services.mozilla.com/D92726
This commit is contained in:
Родитель
9ebbe2c5bc
Коммит
a12805866c
|
@ -6,17 +6,17 @@
|
|||
|
||||
# Top-level configure defaults to building NSPR from source. Standalone JS
|
||||
# doesn't.
|
||||
js_option('--enable-nspr-build', when=building_js,
|
||||
js_option('--enable-nspr-build', when=js_standalone,
|
||||
help='{Build|Do not build} NSPR from source tree')
|
||||
|
||||
@depends('--enable-nspr-build', when=building_js)
|
||||
@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')
|
||||
|
||||
@depends(enable_nspr_build, '--with-system-nspr', 'JS_STANDALONE')
|
||||
@depends(enable_nspr_build, '--with-system-nspr', js_standalone)
|
||||
def build_nspr(nspr_build, system_nspr, js_standalone):
|
||||
if nspr_build is not None and nspr_build.origin != 'default':
|
||||
if nspr_build and system_nspr:
|
||||
|
@ -28,17 +28,17 @@ def build_nspr(nspr_build, system_nspr, js_standalone):
|
|||
set_config('MOZ_BUILD_NSPR', True, when=build_nspr)
|
||||
set_config('MOZ_SYSTEM_NSPR', True, when='--with-system-nspr')
|
||||
|
||||
@depends(build_nspr, '--with-system-nspr', building_js)
|
||||
def js_without_nspr(build_nspr, system_nspr, building_js):
|
||||
if building_js:
|
||||
@depends(build_nspr, '--with-system-nspr', js_standalone)
|
||||
def js_without_nspr(build_nspr, system_nspr, js_standalone):
|
||||
if js_standalone:
|
||||
return not build_nspr and not system_nspr
|
||||
|
||||
set_config('JS_WITHOUT_NSPR', True, when=js_without_nspr)
|
||||
set_define('JS_WITHOUT_NSPR', True, when=js_without_nspr)
|
||||
|
||||
@depends(building_js)
|
||||
def nspr_minver(building_js):
|
||||
if building_js:
|
||||
@depends(js_standalone)
|
||||
def nspr_minver(js_standalone):
|
||||
if js_standalone:
|
||||
return 'nspr >= 4.10'
|
||||
return 'nspr >= 4.26'
|
||||
|
||||
|
|
|
@ -8,15 +8,9 @@
|
|||
# =========================================================
|
||||
|
||||
@depends(build_project)
|
||||
def building_js(build_project):
|
||||
return build_project == 'js'
|
||||
|
||||
# Exception to the rule above: JS_STANDALONE is a special option that doesn't
|
||||
# want the js_option treatment. When we're done merging js/src/configure and
|
||||
# top-level configure, it can go away, although the JS_STANDALONE config
|
||||
# will still need to be set depending on building_js above.
|
||||
option(env='JS_STANDALONE', default=building_js,
|
||||
help='Reserved for internal use')
|
||||
def js_standalone(build_project):
|
||||
if build_project == 'js':
|
||||
return True
|
||||
|
||||
# Branding
|
||||
# ==============================================================
|
||||
|
@ -24,7 +18,7 @@ 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.')
|
||||
|
||||
@depends('--with-app-name', 'JS_STANDALONE', moz_app_basename)
|
||||
@depends('--with-app-name', js_standalone, moz_app_basename)
|
||||
def moz_app_name(value, js_standalone, moz_app_basename):
|
||||
if value:
|
||||
return value[0]
|
||||
|
@ -56,17 +50,13 @@ include('../build/moz.configure/rust.configure',
|
|||
include('../build/moz.configure/bindgen.configure',
|
||||
when='--enable-compile-environment')
|
||||
|
||||
@depends('JS_STANDALONE')
|
||||
def js_standalone(value):
|
||||
if value:
|
||||
return True
|
||||
set_config('JS_STANDALONE', js_standalone)
|
||||
set_define('JS_STANDALONE', js_standalone)
|
||||
add_old_configure_assignment('JS_STANDALONE', js_standalone)
|
||||
js_option('--disable-js-shell', default=building_js,
|
||||
js_option('--enable-js-shell', default=js_standalone,
|
||||
help='{Build|Do not build} the JS shell')
|
||||
|
||||
@depends('--disable-js-shell')
|
||||
@depends('--enable-js-shell')
|
||||
def js_disable_shell(value):
|
||||
if not value:
|
||||
return True
|
||||
|
@ -420,9 +410,9 @@ set_define('JS_MORE_DETERMINISTIC', more_deterministic)
|
|||
|
||||
# CTypes
|
||||
# =======================================================
|
||||
@depends(building_js)
|
||||
def ctypes_default(building_js):
|
||||
return not building_js
|
||||
@depends(js_standalone)
|
||||
def ctypes_default(js_standalone):
|
||||
return not js_standalone
|
||||
|
||||
js_option('--enable-ctypes',
|
||||
default=ctypes_default,
|
||||
|
@ -771,9 +761,9 @@ set_define('MOZ_SYSTEM_ICU', True, when=system_icu)
|
|||
|
||||
js_option('--without-intl-api', help='Disable ECMAScript Internationalization API')
|
||||
|
||||
@depends('--with-intl-api', building_js)
|
||||
def check_intl_api(enabled, building_js):
|
||||
if not enabled and not building_js:
|
||||
@depends('--with-intl-api', js_standalone)
|
||||
def check_intl_api(enabled, js_standalone):
|
||||
if not enabled and not js_standalone:
|
||||
die('--without-intl-api is not supported')
|
||||
|
||||
set_config('JS_HAS_INTL_API', True, when='--with-intl-api')
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
|
||||
# Spoof a stub of `js/moz.configure` for the included scripts.
|
||||
@dependable
|
||||
def building_js():
|
||||
def js_standalone():
|
||||
return False
|
||||
|
||||
|
||||
option(env='JS_STANDALONE', default=building_js,
|
||||
help='Reserved for internal use')
|
||||
|
||||
|
||||
@depends(target)
|
||||
def fold_libs(target):
|
||||
return target.os in ('WINNT', 'OSX', 'Android')
|
||||
|
|
Загрузка…
Ссылка в новой задаче