зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1390524 - correctly pass extra_toolchain_flags only to the target; r=glandium
We define extra_toolchain_flags for passing extra flags to the target compiler during configure. But the way things are currently set up, we pass those flags to the host compiler during configure as well. This behavior is incorrect, and we should only be passing the flags from extra_toolchain_flags if we're compiling for the target.
This commit is contained in:
Родитель
cfd7f1c957
Коммит
cd71d2de73
|
@ -7,7 +7,9 @@
|
|||
@template
|
||||
@imports('textwrap')
|
||||
@imports(_from='mozbuild.configure', _import='SandboxDependsFunction')
|
||||
def compiler_class(compiler):
|
||||
def compiler_class(compiler, host_or_target):
|
||||
is_target = host_or_target is target
|
||||
|
||||
class Compiler(SandboxDependsFunction):
|
||||
# Generates a test program and attempts to compile it. In case of
|
||||
# failure, the resulting check will return None. If the test program
|
||||
|
@ -47,7 +49,8 @@ def compiler_class(compiler):
|
|||
@checking_fn
|
||||
def func(compiler, flags, extra_flags):
|
||||
flags = flags or []
|
||||
flags += extra_flags or []
|
||||
if is_target:
|
||||
flags += extra_flags or []
|
||||
flags.append('-c')
|
||||
|
||||
if try_invoke_compiler(
|
||||
|
|
|
@ -809,7 +809,7 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
|
|||
add_old_configure_assignment(
|
||||
'%s_VERSION' % var, valid_compiler.version)
|
||||
|
||||
valid_compiler = compiler_class(valid_compiler)
|
||||
valid_compiler = compiler_class(valid_compiler, host_or_target)
|
||||
|
||||
def compiler_error():
|
||||
raise FatalCheckError('Failed compiling a simple %s source with %s'
|
||||
|
|
Загрузка…
Ссылка в новой задаче