Bug 1483779 - Enable PGO on clang-cl 32-bits builds. r=dmajor
☠☠ backed out by 8adbf514581c ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 16 Aug 2018 16:44:36 +0900
changeset 432049 5fcbe08fb321a5076f56c380b554c63068efbb00
parent 432048 dccd5299c5ad9e4258eb7b08201f2f39164a2a54
child 432050 3f0e23762df5816b8a28819865679e960c2dbfac
push id106620
push usermh@glandium.org
push dateFri, 17 Aug 2018 01:20:17 +0000
treeherdermozilla-inbound@5fcbe08fb321 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1483779
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 1483779 - Enable PGO on clang-cl 32-bits builds. r=dmajor
Makefile.in
build/moz.configure/toolchain.configure
--- a/Makefile.in
+++ b/Makefile.in
@@ -306,21 +306,18 @@ package-generated-sources:
 # PGO support, but we can't do this test in client.mk
 # No point in clobbering if PGO has been explicitly disabled.
 ifdef NO_PROFILE_GUIDED_OPTIMIZE
 maybe_clobber_profiledbuild:
 else
 ifneq ($(CC_TYPE),msvc)
 maybe_clobber_profiledbuild: clean
 ifneq (,$(findstring clang,$(CC_TYPE)))
-# 32-bit Windows PGO is currently blocked by bug 1479800
-ifneq ($(CC_TYPE)_$(CPU_ARCH),clang-cl_x86)
 	$(LLVM_PROFDATA) merge -o $(DEPTH)/merged.profdata $(DEPTH)/*.profraw
 endif
-endif
 else
 maybe_clobber_profiledbuild:
 	$(RM) $(DIST)/bin/*.pgc
 	find $(DIST)/$(MOZ_APP_NAME) -name '*.pgc' -exec mv {} $(DIST)/bin \;
 endif # msvc
 endif # NO_PROFILE_GUIDED_OPTIMIZE
 
 .PHONY: maybe_clobber_profiledbuild
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1257,19 +1257,20 @@ def pgo_flags(compiler, build_env, targe
             use_cflags=['-fprofile-use', '-fprofile-correction',
                         '-Wcoverage-mismatch'],
             use_ldflags=['-fprofile-use'],
         )
 
     if compiler.type in ('clang-cl', 'clang'):
         profdata = os.path.join(topobjdir, 'merged.profdata')
         if compiler.type == 'clang-cl':
-            # 32-bit PGO is currently blocked by bug 1479800
             if target.cpu == 'x86_64':
                 gen_ldflags = ['clang_rt.profile-x86_64.lib']
+            elif target.cpu == 'x86':
+                gen_ldflags = ['clang_rt.profile-i386.lib']
             else:
                 gen_ldflags = None
         else:
             gen_ldflags = ['-fprofile-instr-generate']
 
         if gen_ldflags:
             return namespace(
                 gen_cflags=['-fprofile-instr-generate'],