Closed
Bug 1064049
Opened 11 years ago
Closed 6 years ago
The build system is not using the correct PGO flags when building with clang
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alaviss0, Assigned: away)
References
()
Details
Attachments
(1 file)
748 bytes,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0 Nightly/34.0a1
Build ID: 20140830062019
Steps to reproduce:
Build firefox with clang and have PGO enabled
Actual results:
The build system build firefox with -fprofile-use (not supported by clang, only create an warning said that the flag is not supported)
Expected results:
The build system build firefox with -fprofile-instr-generate then do the second build with -fprofile-instr-use
Ref: http://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization
![]() |
||
Comment 1•10 years ago
|
||
Same bug occurs with clang in OSX (Yosemite) with PGO optimization.
I get the following warnings,
clang: warning: optimization flag '-fprofile-use' is not supported
clang: warning: optimization flag '-fprofile-correction' is not supported
clang: warning: optimization flag '-fprofile-use' is not supported
clang: warning: optimization flag '-fprofile-correction' is not supported
I managed to throw a patch that fixes clang being fed with incorrect arguments, still, there two things that I haven't figured out due tu my almost 0 knowledge of the firefox build system.
1) convert all whatever.rawdata generated by the profiling pass to .profdata using llvm-profdata merge
2)the .profdata generated in step1 need to be passed to fprofile-instr-use
Still, don't know where do that.
Looks like, with clang-3.7.0, firefox does not build. And patch clang-pgo.patch does not help.
../../build/unix/gold/ld: error: /mnt/src/user/projects/repo/firefox-developer-hg/src/mozilla-aurora/obj-x86_64-unknown-linux-gnu/toolkit/library/../../media/mtransport/build/transportlayerloopback.i_o: requires dynamic R_X86_64_PC32 reloc against '__llvm_profile_data__ZN7sigslot9has_slotsINS_15single_threadedEE14signal_connectEPNS_22_signal_base_interfaceE' which may overflow at runtime; recompile with -fPIC
../../build/unix/gold/ld: error: /mnt/src/user/projects/repo/firefox-developer-hg/src/mozilla-aurora/obj-x86_64-unknown-linux-gnu/toolkit/library/../../media/mtransport/build/transportlayerprsock.i_o: requires dynamic R_X86_64_PC32 reloc against '__llvm_profile_data__ZN7sigslot9has_slotsINS_15single_threadedEE14signal_connectEPNS_22_signal_base_interfaceE' which may overflow at runtime; recompile with -fPIC
../../build/unix/gold/ld: error: read-only segment has dynamic relocations
... more errors ...
... and many warnings...
Updated•7 years ago
|
Product: Core → Firefox Build System
Comment 4•6 years ago
|
||
We're shipping PGO builds built with clang now.
Assignee: nobody → dmajor
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•