mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1296530 - Replace include_when with include, and remove include_when. r=chmanchester
--HG-- extra : rebase_source : e2efd38b3875dde3dae996405838e9ca20475c32
This commit is contained in:
parent
5983667dd8
commit
e5ba3fd67a
@ -47,7 +47,7 @@ def compiler_class(compiler):
|
||||
@checking_fn
|
||||
def func(compiler, flags, extra_flags):
|
||||
flags = flags or []
|
||||
flags += extra_flags
|
||||
flags += extra_flags or []
|
||||
flags.append('-c')
|
||||
|
||||
if try_invoke_compiler(
|
||||
|
@ -62,12 +62,6 @@ set_config('HAVE_YASM', have_yasm)
|
||||
# Until the YASM variable is not necessary in old-configure.
|
||||
add_old_configure_assignment('YASM', have_yasm)
|
||||
|
||||
@dependable
|
||||
def extra_toolchain_flags():
|
||||
# This value will be overriden for android builds, where
|
||||
# extra flags are required to do basic checks.
|
||||
return []
|
||||
|
||||
# Android NDK
|
||||
# ==============================================================
|
||||
|
||||
@ -75,7 +69,7 @@ def extra_toolchain_flags():
|
||||
def compiling_android(compile_env, build_project, gonkdir, _):
|
||||
return compile_env and (gonkdir or build_project in ('mobile/android', 'js'))
|
||||
|
||||
include_when('android-ndk.configure', when=compiling_android)
|
||||
include('android-ndk.configure', when=compiling_android)
|
||||
|
||||
# MacOS deployment target version
|
||||
# ==============================================================
|
||||
|
@ -405,13 +405,3 @@ def depends_when(*args, **kwargs):
|
||||
return fn(*args)
|
||||
return wrapper
|
||||
return decorator
|
||||
|
||||
# Includes a file when the given condition evaluates to a truthy value.
|
||||
@template
|
||||
def include_when(filename, when):
|
||||
# Assume, for now, our condition already depends on --help.
|
||||
@depends(when, '--help')
|
||||
def conditional_include(value, _):
|
||||
if value:
|
||||
return filename
|
||||
include(conditional_include)
|
||||
|
@ -235,4 +235,4 @@ add_old_configure_assignment('JS_HAS_CTYPES', js_has_ctypes)
|
||||
def ctypes_and_compile_environment(ctypes, compile_environment, _):
|
||||
return ctypes and compile_environment
|
||||
|
||||
include_when('ffi.configure', when=ctypes_and_compile_environment)
|
||||
include('ffi.configure', when=ctypes_and_compile_environment)
|
||||
|
@ -108,14 +108,14 @@ include('build/moz.configure/pkg.configure')
|
||||
# requiring this file in unit tests.
|
||||
add_old_configure_assignment('PKG_CONFIG', pkg_config)
|
||||
|
||||
include_when('build/moz.configure/toolchain.configure',
|
||||
when='--enable-compile-environment')
|
||||
include_when('build/moz.configure/memory.configure',
|
||||
when='--enable-compile-environment')
|
||||
include_when('build/moz.configure/headers.configure',
|
||||
when='--enable-compile-environment')
|
||||
include_when('build/moz.configure/warnings.configure',
|
||||
when='--enable-compile-environment')
|
||||
include('build/moz.configure/toolchain.configure',
|
||||
when='--enable-compile-environment')
|
||||
include('build/moz.configure/memory.configure',
|
||||
when='--enable-compile-environment')
|
||||
include('build/moz.configure/headers.configure',
|
||||
when='--enable-compile-environment')
|
||||
include('build/moz.configure/warnings.configure',
|
||||
when='--enable-compile-environment')
|
||||
|
||||
include(include_project_configure)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user