Automatically use llvm-ar, llvm-ranlib and llvm-nm when building with llvm-based LTO
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox86 fixed)
| Tracking | Status | |
|---|---|---|
| firefox86 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(4 files)
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Updated•7 years ago
|
Comment 4•5 years ago
|
||
What exactly must be added to the mozconfig to work around this?
| Assignee | ||
Comment 5•5 years ago
|
||
AR=llvm-ar
RANLIB=llvm-ranlib
NM=llvm-nm
You may need the full paths, and you may need to export the variables.
| Assignee | ||
Comment 6•4 years ago
|
||
The linker is always lld-link, as we don't support MSVC anymore, so the
fallback to "lib" is never used.
Updated•4 years ago
|
| Assignee | ||
Comment 7•4 years ago
|
||
And stop setting AR to llvm-ar in mozconfigs.
| Assignee | ||
Comment 8•4 years ago
|
||
It hasn't been used since bug 569597 and bug 1295937.
| Assignee | ||
Comment 9•4 years ago
|
||
There is only one place where it's used:
config/check_vanilla_allocations.py, which is only executed from
js/src/build/Makefile.in on the condition that the build is targeting
Linux and not LTO. But the LTO test is actually outdated, because we
don't build with -flto, but -flto=thin, so the exclusion doesn't
work anymore.
There is however no AC_CHECK_PROG, and we currently rely on NM to be
given, or fall back to "nm", which works in most cases, except LTO with
clang. It works on CI because in LTO builds we explicitly set NM to
llvm-nm (which can output symbols from LLVM bitcode objects), but we
could also do that automatically.
So we add a full detection of nm/llvm-nm to python configure, and limit
it to Linux, since we only ever use it there.
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/feeb84104920
https://hg.mozilla.org/mozilla-central/rev/3f9924127a79
https://hg.mozilla.org/mozilla-central/rev/300c5c7f61b7
https://hg.mozilla.org/mozilla-central/rev/061ad2d4f4e3
Description
•