зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1403346 - Move RTL_FLAGS to computed flags. r=glandium
MozReview-Commit-ID: 9tOuNXjyJQD
This commit is contained in:
Родитель
33845169fa
Коммит
1e2fcc4b06
|
@ -312,8 +312,8 @@ CXXFLAGS += $(WARNINGS_AS_ERRORS)
|
|||
CFLAGS += $(WARNINGS_AS_ERRORS)
|
||||
endif # ALLOW_COMPILER_WARNINGS
|
||||
|
||||
COMPILE_CFLAGS = $(COMPUTED_CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS) $(_DEPEND_CFLAGS) $(CFLAGS) $(MOZBUILD_CFLAGS) $(MK_COMPILE_DEFINES)
|
||||
COMPILE_CXXFLAGS = $(COMPUTED_CXXFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS) $(_DEPEND_CFLAGS) $(CXXFLAGS) $(MOZBUILD_CXXFLAGS) $(MK_COMPILE_DEFINES)
|
||||
COMPILE_CFLAGS = $(COMPUTED_CFLAGS) $(OS_COMPILE_CFLAGS) $(_DEPEND_CFLAGS) $(CFLAGS) $(MOZBUILD_CFLAGS) $(MK_COMPILE_DEFINES)
|
||||
COMPILE_CXXFLAGS = $(COMPUTED_CXXFLAGS) $(OS_COMPILE_CXXFLAGS) $(_DEPEND_CFLAGS) $(CXXFLAGS) $(MOZBUILD_CXXFLAGS) $(MK_COMPILE_DEFINES)
|
||||
COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS) $(MOZBUILD_CMFLAGS)
|
||||
COMPILE_CMMFLAGS = $(OS_COMPILE_CMMFLAGS) $(MOZBUILD_CMMFLAGS)
|
||||
ASFLAGS += $(MOZBUILD_ASFLAGS)
|
||||
|
|
|
@ -76,8 +76,7 @@ class CompileDBBackend(CommonBackend):
|
|||
|
||||
elif isinstance(obj, VariablePassthru):
|
||||
for var in ('MOZBUILD_CFLAGS', 'MOZBUILD_CXXFLAGS',
|
||||
'MOZBUILD_CMFLAGS', 'MOZBUILD_CMMFLAGS',
|
||||
'RTL_FLAGS'):
|
||||
'MOZBUILD_CMFLAGS', 'MOZBUILD_CMMFLAGS'):
|
||||
if var in obj.variables:
|
||||
self._local_flags[obj.objdir][var] = obj.variables[var]
|
||||
if (obj.variables.get('ALLOW_COMPILER_WARNINGS') and
|
||||
|
@ -196,8 +195,6 @@ class CompileDBBackend(CommonBackend):
|
|||
|
||||
db.append('$(COMPUTED_%s)' % self.CFLAGS[canonical_suffix])
|
||||
|
||||
if canonical_suffix in ('.c', '.cpp'):
|
||||
db.append('$(RTL_FLAGS)')
|
||||
append_var('OS_COMPILE_%s' % self.CFLAGS[canonical_suffix])
|
||||
append_var('OS_CPPFLAGS')
|
||||
append_var('OS_%s' % self.CFLAGS[canonical_suffix])
|
||||
|
|
|
@ -323,6 +323,7 @@ class CompileFlags(ContextDerivedValue, dict):
|
|||
('CXXFLAGS', 'CFLAGS')),
|
||||
('DSO_PIC', context.config.substs.get('DSO_PIC_CFLAGS'),
|
||||
('CXXFLAGS', 'CFLAGS')),
|
||||
('RTL', None, ('CXXFLAGS', 'CFLAGS')),
|
||||
)
|
||||
self._known_keys = set(k for k, v, _ in self.flag_variables)
|
||||
|
||||
|
|
|
@ -958,6 +958,8 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
elif dist_install is False:
|
||||
passthru.variables['NO_DIST_INSTALL'] = True
|
||||
|
||||
computed_flags = ComputedFlags(context, context['COMPILE_FLAGS'])
|
||||
|
||||
# Ideally, this should be done in templates, but this is difficult at
|
||||
# the moment because USE_STATIC_LIBS can be set after a template
|
||||
# returns. Eventually, with context-based templates, it will be
|
||||
|
@ -972,6 +974,7 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
rtl_flag += 'd'
|
||||
# Use a list, like MOZBUILD_*FLAGS variables
|
||||
passthru.variables['RTL_FLAGS'] = [rtl_flag]
|
||||
computed_flags.resolve_flags('RTL', [rtl_flag])
|
||||
|
||||
generated_files = set()
|
||||
for obj in self._process_generated_files(context):
|
||||
|
@ -985,8 +988,6 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
generated_files.add(str(sub.relpath))
|
||||
yield sub
|
||||
|
||||
computed_flags = ComputedFlags(context, context['COMPILE_FLAGS'])
|
||||
|
||||
for defines_var, cls in (('DEFINES', Defines),
|
||||
('HOST_DEFINES', HostDefines)):
|
||||
defines = context.get(defines_var)
|
||||
|
|
Загрузка…
Ссылка в новой задаче