Bug 1444171 - use the order file during re-link with clang-cl; r=glandium
authorNathan Froyd <froydnj@gmail.com>
Mon, 09 Jul 2018 18:36:14 -0400
changeset 425571 1a27b17ba6a63450707973266f7d19581b0f5a86
parent 425570 eb28d28e00717947f59a5db318563fffff80885f
child 425572 97898f7472fb0f9e73f4edfb27b2b25e05fd9611
push id34259
push usertoros@mozilla.com
push dateTue, 10 Jul 2018 09:45:44 +0000
treeherdermozilla-central@a675c5d7eb76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1444171
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1444171 - use the order file during re-link with clang-cl; r=glandium Now that we've generated an order file of the first N functions invoked during startup, let's tell the linker about said functions so it can cluster them appropriately.
Makefile.in
toolkit/library/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -219,17 +219,17 @@ profiledbuild::
 	$(call BUILDSTATUS,TIER_FINISH pgo_package)
 	$(call BUILDSTATUS,TIER_START pgo_profile)
 	MOZ_PGO_INSTRUMENTED=1 JARLOG_FILE=jarlog/en-US.log $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py 10
 	$(call BUILDSTATUS,TIER_FINISH pgo_profile)
 	$(call BUILDSTATUS,TIER_START pgo_clobber)
 	$(MAKE) maybe_clobber_profiledbuild
 	$(call BUILDSTATUS,TIER_FINISH pgo_clobber)
 	$(call BUILDSTATUS,TIER_START pgo_profile_use)
-	$(MAKE) default MOZ_PROFILE_USE=1
+	$(MAKE) default MOZ_PROFILE_USE=1 $(if $(CLANG_CL),MOZ_PROFILE_ORDER_FILE=$(topobjdir)/cygprofile.txt)
 	$(call BUILDSTATUS,TIER_FINISH pgo_profile_use)
 
 # Change default target to PGO build if PGO is enabled.
 ifdef MOZ_PGO
 OVERRIDE_DEFAULT_GOAL := profiledbuild
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -8,8 +8,14 @@ include $(topsrcdir)/config/config.mk
 
 include $(topsrcdir)/config/rules.mk
 
 .PHONY: gtestxul
 gtestxul:
 	$(MAKE) -C $(DEPTH) toolkit/library/gtest/target LINK_GTEST_DURING_COMPILE=1
 
 DUMP_SYMBOLS_FLAGS = --count-ctors
+
+ifdef CLANG_CL
+ifdef MOZ_PROFILE_ORDER_FILE
+PGO_LDFLAGS += -ORDER:@$(MOZ_PROFILE_ORDER_FILE)
+endif
+endif