Bug 1249167 - Fix dependencies involving stdc++compat and clang-plugin. r=mshal

This commit is contained in:
Mike Hommey 2016-02-18 09:03:01 +09:00
parent 798482b96e
commit bed0e35451
3 changed files with 16 additions and 4 deletions

View File

@ -90,11 +90,17 @@ def HostStdCppCompat():
@template
def HostProgram(name):
def HostProgram(name, c_only=False):
'''Template for build tools executables.'''
HOST_PROGRAM = name
HostStdCppCompat()
# With context-based templates, this won't be needed anymore, and will
# work better than relying on the caller setting it, but at the moment,
# this is the best we have. And it doesn't matter /that/ much, so there's
# really only one place using this, where it does matter to avoid the
# extra dependency (because it creates a circular one).
if not c_only:
HostStdCppCompat()
@template

View File

@ -24,7 +24,10 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
'nsinstall.c',
'pathsub.c',
]
HostProgram('nsinstall_real')
# stdc++compat depends on config/export, so avoid a circular
# dependency added by HostProgram depending on stdc++compat,
# while the program here is in C.
HostProgram('nsinstall_real', c_only=True)
if CONFIG['MOZ_SHARED_ICU']:
DEFINES['MOZ_SHARED_ICU'] = True

View File

@ -152,7 +152,7 @@ widget/android/bindings/export: build/annotationProcessors/export
mobile/android/tests/browser/robocop/roboextender/tools: mobile/android/tests/javaaddons/tools
ifdef ENABLE_CLANG_PLUGIN
$(filter-out build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target
$(filter-out config/host build/unix/stdc++compat/% build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target
build/clang-plugin/tests/target: build/clang-plugin/target
endif
@ -176,3 +176,6 @@ endif
# happen at the same time (bug #1146738)
js/src/target: js/src/host
endif
# Most things are built during compile (target/host), but some things happen during export
# Those need to depend on config/export for system wrappers.
$(addprefix build/unix/stdc++compat/,target host) build/clang-plugin/target: config/export