зеркало из https://github.com/mozilla/pjs.git
bug 518107 - don't force re-linking on every build pass for PGO builds. r=bsmedberg
--HG-- extra : rebase_source : 4d7240ab80caa53e5843b085a4b3f4c160882b89
This commit is contained in:
Родитель
5054608375
Коммит
a8baaa2135
|
@ -924,19 +924,20 @@ endif # !NO_DIST_INSTALL
|
|||
##############################################
|
||||
|
||||
ifndef NO_PROFILE_GUIDED_OPTIMIZE
|
||||
ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
|
||||
ifdef MOZ_PROFILE_USE
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC)$(INTERNAL_TOOLS), WINNT_)
|
||||
# Force re-linking when building with PGO, since
|
||||
# the MSVC linker does all the work. We force re-link
|
||||
# in both stages so you can do depend builds with PGO.
|
||||
# When building with PGO, we have to make sure to re-link
|
||||
# in the MOZ_PROFILE_USE phase if we linked in the
|
||||
# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink
|
||||
# file in the link rule in the GENERATE phase to indicate
|
||||
# that we need a relink.
|
||||
ifdef SHARED_LIBRARY
|
||||
$(SHARED_LIBRARY): FORCE
|
||||
$(SHARED_LIBRARY): pgo.relink
|
||||
endif
|
||||
ifdef PROGRAM
|
||||
$(PROGRAM): FORCE
|
||||
$(PROGRAM): pgo.relink
|
||||
endif
|
||||
|
||||
ifdef MOZ_PROFILE_USE
|
||||
# In the second pass, we need to merge the pgc files into the pgd file.
|
||||
# The compiler would do this for us automatically if they were in the right
|
||||
# place, but they're in dist/bin.
|
||||
|
@ -950,8 +951,7 @@ ifdef SHARED_LIBRARY
|
|||
$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
|
||||
$(SHARED_LIBRARY_NAME) $(DIST)/bin
|
||||
endif
|
||||
endif
|
||||
endif # MOZ_PROFILE_USE
|
||||
endif # SHARED_LIBRARY || PROGRAM
|
||||
endif # WINNT_
|
||||
endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
|
||||
endif # NO_PROFILE_GUIDED_OPTIMIZE
|
||||
|
@ -1002,7 +1002,12 @@ ifdef MSMANIFEST_TOOL
|
|||
rm -f $@.manifest; \
|
||||
fi
|
||||
endif # MSVC with manifest tool
|
||||
else
|
||||
ifdef MOZ_PROFILE_GENERATE
|
||||
# touch it a few seconds into the future to work around FAT's
|
||||
# 2-second granularity
|
||||
touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
|
||||
endif
|
||||
else # !WINNT || GNU_CC
|
||||
ifeq ($(CPP_PROG_LINK),1)
|
||||
$(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE)
|
||||
else # ! CPP_PROG_LINK
|
||||
|
@ -1293,6 +1298,9 @@ ifdef EMBED_MANIFEST_AT
|
|||
fi
|
||||
endif # EMBED_MANIFEST_AT
|
||||
endif # MSVC with manifest tool
|
||||
ifdef MOZ_PROFILE_GENERATE
|
||||
touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
|
||||
endif
|
||||
endif # WINNT && !GCC
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
@rm -f $(SUB_SHLOBJS)
|
||||
|
|
|
@ -924,19 +924,20 @@ endif # !NO_DIST_INSTALL
|
|||
##############################################
|
||||
|
||||
ifndef NO_PROFILE_GUIDED_OPTIMIZE
|
||||
ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
|
||||
ifdef MOZ_PROFILE_USE
|
||||
ifeq ($(OS_ARCH)_$(GNU_CC)$(INTERNAL_TOOLS), WINNT_)
|
||||
# Force re-linking when building with PGO, since
|
||||
# the MSVC linker does all the work. We force re-link
|
||||
# in both stages so you can do depend builds with PGO.
|
||||
# When building with PGO, we have to make sure to re-link
|
||||
# in the MOZ_PROFILE_USE phase if we linked in the
|
||||
# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink
|
||||
# file in the link rule in the GENERATE phase to indicate
|
||||
# that we need a relink.
|
||||
ifdef SHARED_LIBRARY
|
||||
$(SHARED_LIBRARY): FORCE
|
||||
$(SHARED_LIBRARY): pgo.relink
|
||||
endif
|
||||
ifdef PROGRAM
|
||||
$(PROGRAM): FORCE
|
||||
$(PROGRAM): pgo.relink
|
||||
endif
|
||||
|
||||
ifdef MOZ_PROFILE_USE
|
||||
# In the second pass, we need to merge the pgc files into the pgd file.
|
||||
# The compiler would do this for us automatically if they were in the right
|
||||
# place, but they're in dist/bin.
|
||||
|
@ -950,8 +951,7 @@ ifdef SHARED_LIBRARY
|
|||
$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
|
||||
$(SHARED_LIBRARY_NAME) $(DIST)/bin
|
||||
endif
|
||||
endif
|
||||
endif # MOZ_PROFILE_USE
|
||||
endif # SHARED_LIBRARY || PROGRAM
|
||||
endif # WINNT_
|
||||
endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
|
||||
endif # NO_PROFILE_GUIDED_OPTIMIZE
|
||||
|
@ -1002,7 +1002,12 @@ ifdef MSMANIFEST_TOOL
|
|||
rm -f $@.manifest; \
|
||||
fi
|
||||
endif # MSVC with manifest tool
|
||||
else
|
||||
ifdef MOZ_PROFILE_GENERATE
|
||||
# touch it a few seconds into the future to work around FAT's
|
||||
# 2-second granularity
|
||||
touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
|
||||
endif
|
||||
else # !WINNT || GNU_CC
|
||||
ifeq ($(CPP_PROG_LINK),1)
|
||||
$(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(SOLARIS_JEMALLOC_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(EXE_DEF_FILE)
|
||||
else # ! CPP_PROG_LINK
|
||||
|
@ -1293,6 +1298,9 @@ ifdef EMBED_MANIFEST_AT
|
|||
fi
|
||||
endif # EMBED_MANIFEST_AT
|
||||
endif # MSVC with manifest tool
|
||||
ifdef MOZ_PROFILE_GENERATE
|
||||
touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
|
||||
endif
|
||||
endif # WINNT && !GCC
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
@rm -f $(SUB_SHLOBJS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче