mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 05:30:29 +00:00
Bug 1380547 - Add a variable other than DEFINES for defines that are set from Makefiles. r=mshal
As we move our compile command lines into mozbuild we want to stop using DEFINES directly. This patch adds a variable that can be set from Makefiles to contribute defines to a compile command line to help the transition. MozReview-Commit-ID: 5xLB06pzpJY --HG-- extra : rebase_source : 7ca0b9d8f5a77ec55eb751f75f58a69e64efb21d
This commit is contained in:
parent
489d8a2762
commit
13ea176769
@ -328,8 +328,8 @@ CXXFLAGS += $(WARNINGS_AS_ERRORS)
|
||||
CFLAGS += $(WARNINGS_AS_ERRORS)
|
||||
endif # ALLOW_COMPILER_WARNINGS
|
||||
|
||||
COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(OS_INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS) $(_DEPEND_CFLAGS) $(CFLAGS) $(MOZBUILD_CFLAGS)
|
||||
COMPILE_CXXFLAGS = $(if $(DISABLE_STL_WRAPPING),,$(STL_FLAGS)) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(OS_INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS) $(_DEPEND_CFLAGS) $(CXXFLAGS) $(MOZBUILD_CXXFLAGS)
|
||||
COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(OS_INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS) $(_DEPEND_CFLAGS) $(CFLAGS) $(MOZBUILD_CFLAGS) $(MK_COMPILE_DEFINES)
|
||||
COMPILE_CXXFLAGS = $(if $(DISABLE_STL_WRAPPING),,$(STL_FLAGS)) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(OS_INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(RTL_FLAGS) $(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)
|
||||
|
@ -12,10 +12,10 @@ include $(topsrcdir)/config/rules.mk
|
||||
MOZ_BUILDID := $(shell awk '{print $$3}' $(DEPTH)/buildid.h)
|
||||
$(call errorIfEmpty,GRE_MILESTONE MOZ_BUILDID)
|
||||
|
||||
MK_COMPILE_DEFINES = -DMOZ_BUILDID=$(MOZ_BUILDID)
|
||||
|
||||
# Note these dependencies are broken because the target is *not* the cpp file.
|
||||
# BUT, actually fixing it would make libxul rebuilt on every single incremental
|
||||
# build because of the automatic buildid change. This is why we can't actually
|
||||
# include buildid.h there, because it would add the dependency.
|
||||
$(srcdir)/nsAppRunner.cpp: $(DEPTH)/buildid.h $(milestone_txt)
|
||||
|
||||
nsAppRunner.$(OBJ_SUFFIX): DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user