mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1025918 - Add support for the .cxx extension to mozbuild. r=ted
This commit is contained in:
parent
de07b6927f
commit
f2dcba3d01
@ -1024,6 +1024,10 @@ $(filter %.s,$(CPPSRCS:%.cc=%.s)): %.s: %.cc $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(REPORT_BUILD)
|
||||
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
|
||||
|
||||
$(filter %.s,$(CPPSRCS:%.cxx=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(REPORT_BUILD)
|
||||
$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
|
||||
|
||||
$(filter %.s,$(CSRCS:%.c=%.s)): %.s: %.c $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(REPORT_BUILD)
|
||||
$(CC) -S $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
|
||||
@ -1039,6 +1043,7 @@ ifneq (,$(filter %.i,$(MAKECMDGOALS)))
|
||||
_group_srcs = $(sort $(patsubst %.$1,%.i,$(filter %.$1,$2 $(notdir $2))))
|
||||
_PREPROCESSED_CPP_FILES := $(call _group_srcs,cpp,$(CPPSRCS))
|
||||
_PREPROCESSED_CC_FILES := $(call _group_srcs,cc,$(CPPSRCS))
|
||||
_PREPROCESSED_CXX_FILES := $(call _group_srcs,cxx,$(CPPSRCS))
|
||||
_PREPROCESSED_C_FILES := $(call _group_srcs,c,$(CSRCS))
|
||||
_PREPROCESSED_CMM_FILES := $(call _group_srcs,mm,$(CMMSRCS))
|
||||
|
||||
@ -1048,7 +1053,7 @@ VPATH += $(addprefix $(srcdir)/,$(sort $(dir $(CPPSRCS) $(CSRCS) $(CMMSRCS))))
|
||||
|
||||
# Make preprocessed files PHONY so they are always executed, since they are
|
||||
# manual targets and we don't necessarily write to $@.
|
||||
.PHONY: $(_PREPROCESSED_CPP_FILES) $(_PREPROCESSED_CC_FILES) $(_PREPROCESSED_C_FILES) $(_PREPROCESSED_CMM_FILES)
|
||||
.PHONY: $(_PREPROCESSED_CPP_FILES) $(_PREPROCESSED_CC_FILES) $(_PREPROCESSED_CXX_FILES) $(_PREPROCESSED_C_FILES) $(_PREPROCESSED_CMM_FILES)
|
||||
|
||||
$(_PREPROCESSED_CPP_FILES): %.i: %.cpp $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(REPORT_BUILD)
|
||||
@ -1060,6 +1065,11 @@ $(_PREPROCESSED_CC_FILES): %.i: %.cc $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
|
||||
$(CCC) -C $(PREPROCESS_OPTION)$@ $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
|
||||
|
||||
$(_PREPROCESSED_CXX_FILES): %.i: %.cxx $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(REPORT_BUILD)
|
||||
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
|
||||
$(CCC) -C $(PREPROCESS_OPTION)$@ $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)
|
||||
|
||||
$(_PREPROCESSED_C_FILES): %.i: %.c $(call mkdir_deps,$(MDDEPDIR))
|
||||
$(REPORT_BUILD)
|
||||
$(addprefix $(MKDIR) -p ,$(filter-out .,$(@D)))
|
||||
@ -1078,7 +1088,7 @@ PP_UNIFIED ?= 1
|
||||
# infinite loop if the filename doesn't exist in the unified source files.
|
||||
ifndef PP_REINVOKE
|
||||
|
||||
MATCH_cpp = \(cpp\|cc\)
|
||||
MATCH_cpp = \(cpp\|cc|cxx\)
|
||||
UPPER_c = C
|
||||
UPPER_cpp = CPP
|
||||
UPPER_mm = CMM
|
||||
|
@ -276,6 +276,7 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
'.mm': 'CMMSRCS',
|
||||
'.cc': 'CPPSRCS',
|
||||
'.cpp': 'CPPSRCS',
|
||||
'.cxx': 'CPPSRCS',
|
||||
'.S': 'SSRCS',
|
||||
},
|
||||
HOST_SOURCES={
|
||||
@ -283,12 +284,14 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
'.mm': 'HOST_CMMSRCS',
|
||||
'.cc': 'HOST_CPPSRCS',
|
||||
'.cpp': 'HOST_CPPSRCS',
|
||||
'.cxx': 'HOST_CPPSRCS',
|
||||
},
|
||||
UNIFIED_SOURCES={
|
||||
'.c': 'UNIFIED_CSRCS',
|
||||
'.mm': 'UNIFIED_CMMSRCS',
|
||||
'.cc': 'UNIFIED_CPPSRCS',
|
||||
'.cpp': 'UNIFIED_CPPSRCS',
|
||||
'.cxx': 'UNIFIED_CPPSRCS',
|
||||
}
|
||||
)
|
||||
varmap.update(dict(('GENERATED_%s' % k, v) for k, v in varmap.items()
|
||||
|
Loading…
Reference in New Issue
Block a user