[meta] Link with LLD
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox57 wontfix)
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: Sylvestre, Unassigned)
References
(Depends on 2 open bugs)
Details
(Keywords: meta)
Attachments
(2 files)
On an old workstation (8 cpu, 32g of RAM and SSD) linker libxul.so with LD: real 0m22,170s user 0m19,660s sys 0m1,976s with LLD: real 0m3,147s user 0m4,904s sys 0m1,276s I tried also with a more recent system and it is very similar: 0m17,772s / 0m2,745s
Updated•6 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
And we can now link without --disable-elf-hack!
Updated•6 years ago
|
Comment 2•4 years ago
|
||
I didn't know about ldd, until :aceman told me about it today. Instead of 4 minutes, linking takes only 15 seconds on my system.
Is there a reason this isn't enabled automatically on platforms that support it?
![]() |
||
Comment 3•4 years ago
|
||
(In reply to Kai Engert (:kaie:) from comment #2)
I didn't know about ldd, until :aceman told me about it today. Instead of 4 minutes, linking takes only 15 seconds on my system.
Is there a reason this isn't enabled automatically on platforms that support it?
It is supposed to be the default for developer builds, what does your mozconfig look like?
Updated•4 years ago
|
![]() |
||
Comment 5•4 years ago
|
||
What does your $OBJDIR/config.log
and $OBJDIR/config.status
look like?
Comment 6•4 years ago
|
||
Comment 7•4 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #5)
What does your
$OBJDIR/config.log
and$OBJDIR/config.status
look like?
attached
![]() |
||
Comment 8•4 years ago
|
||
Hm, unfortunately the log doesn't contain enough information to debug just by looking at it. What does $HOME/.mozbuild/clang/bin/clang -std=gnu99 -Wl,--version -fuse-ld=lld
say? That is what we should be running when we get here:
https://searchfox.org/mozilla-central/source/build/moz.configure/toolchain.configure#2014-2023
and apparently that check is failing.
Comment 9•4 years ago
|
||
$ $HOME/.mozbuild/clang/bin/clang -std=gnu99 -Wl,--version -fuse-ld=lld
LLD 8.0.0 (compatible with GNU linkers)
Comment 10•4 years ago
|
||
How can I print to the terminal from inside that script?
It seems to be python, but trying to use "print" results in errors.
It seems try_linker('lld') isn't executed.
![]() |
||
Comment 11•4 years ago
|
||
(In reply to Kai Engert (:kaie:) from comment #10)
How can I print to the terminal from inside that script?
It seems to be python, but trying to use "print" results in errors.It seems try_linker('lld') isn't executed.
You should be able to call log.info(...)
to print.
Comment 12•4 years ago
|
||
Thanks.
The reason try_linker('lld') isn't reached: developer_options is false.
![]() |
||
Comment 13•4 years ago
|
||
(In reply to Kai Engert (:kaie:) from comment #12)
Thanks.
The reason try_linker('lld') isn't reached: developer_options is false.
Are you compiling a beta/release version of Thunderbird?
Comment 14•4 years ago
|
||
My local build script, which I've been updating since many years, indeed contains two related symbol definitions:
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
If I remove those, then I get lld...
I don't remember why I had set those flags in the past, it was probably necessary for some local testing.
Reporter | ||
Comment 15•4 years ago
•
|
||
Out of topic but maybe we should show a warning at the end of the build
like
"please note that you are building an official version of Firefox. Options might be different".
Updated•1 year ago
|
Description
•