Ensure we are linking with LLD by default everywhere possible
Categories
(Firefox Build System :: General, task)
Tracking
(firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: glandium)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert)
Attachments
(3 files)
LLD is much faster than other linkers. We should double-check that we are using it by default everywhere we can: local builds, CI, etc.
Some previous bugs that might be relevant: bug 1336978, bug 1473436, bug 1557507.
A summary of the current situation w.r.t. using LLD with Rust code can be found here.
Assignee | ||
Comment 1•4 years ago
|
||
We are. See https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/build/moz.configure/toolchain.configure#1964-1981
It's also passed down to cargo here: https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/config/makefiles/rust.mk#228-256
Comment 2•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #1)
We are. See https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/build/moz.configure/toolchain.configure#1964-1981
It's also passed down to cargo here: https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/config/makefiles/rust.mk#228-256
Should we be using it on non-shippable builds (or perhaps at least debug builds) (and disabling elfhack)?
Assignee | ||
Comment 3•4 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #2)
Should we be using it on non-shippable builds (or perhaps at least debug builds) (and disabling elfhack)?
Let's do this.
Assignee | ||
Comment 4•4 years ago
|
||
Comment 6•4 years ago
|
||
Backed out for linux linker bustages.
backout: https://hg.mozilla.org/integration/autoland/rev/4de801160982dc8de4a164d4973ca9089def75d6
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=311723192&repo=autoland&lineNumber=1019
[task 2020-08-01T08:34:30.685Z] 08:34:30 INFO - checking whether cross compiling... no
[task 2020-08-01T08:34:30.796Z] 08:34:30 ERROR - Traceback (most recent call last):
[task 2020-08-01T08:34:30.796Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/init.py", line 582, in _value_for_option
[task 2020-08-01T08:34:30.797Z] 08:34:30 INFO - value, option_string = self._helper.handle(option)
[task 2020-08-01T08:34:30.797Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/options.py", line 560, in handle
[task 2020-08-01T08:34:30.797Z] 08:34:30 INFO - origin=extra_ret.origin, old_arg=arg, old_origin=ret.origin)
[task 2020-08-01T08:34:30.798Z] 08:34:30 INFO - mozbuild.configure.options.ConflictingOptionError: Cannot add '--enable-linker=gold' to the implied set because it conflicts with --enable-linker=lld from the mozconfig set
[task 2020-08-01T08:34:30.798Z] 08:34:30 INFO - During handling of the above exception, another exception occurred:
[task 2020-08-01T08:34:30.798Z] 08:34:30 ERROR - Traceback (most recent call last):
[task 2020-08-01T08:34:30.798Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/configure.py", line 183, in <module>
[task 2020-08-01T08:34:30.798Z] 08:34:30 INFO - sys.exit(main(sys.argv))
[task 2020-08-01T08:34:30.799Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/configure.py", line 53, in main
[task 2020-08-01T08:34:30.799Z] 08:34:30 INFO - sandbox.run(os.path.join(os.path.dirname(file), 'moz.configure'))
[task 2020-08-01T08:34:30.799Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/init.py", line 456, in run
[task 2020-08-01T08:34:30.799Z] 08:34:30 INFO - self._value_for(option)
[task 2020-08-01T08:34:30.800Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/init.py", line 546, in _value_for
[task 2020-08-01T08:34:30.800Z] 08:34:30 INFO - return self._value_for_option(obj)
[task 2020-08-01T08:34:30.800Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/util.py", line 1018, in method_call
[task 2020-08-01T08:34:30.800Z] 08:34:30 INFO - cache[args] = self.func(instance, *args)
[task 2020-08-01T08:34:30.800Z] 08:34:30 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/configure/init.py", line 590, in _value_for_option
[task 2020-08-01T08:34:30.800Z] 08:34:30 INFO - % (e.arg, reason, e.old_arg, e.old_origin))
[task 2020-08-01T08:34:30.801Z] 08:34:30 INFO - mozbuild.configure.options.InvalidOptionError: '--enable-linker=gold' implied by 'imply_option at /builds/worker/checkouts/gecko/build/moz.configure/toolchain.configure:2003' conflicts with '--enable-linker=lld' from the mozconfig
[task 2020-08-01T08:34:30.868Z] 08:34:30 INFO - *** Fix above errors and then restart with
[task 2020-08-01T08:34:30.868Z] 08:34:30 INFO - "./mach build"
also failing: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=311721797&repo=autoland&lineNumber=908
Assignee | ||
Comment 7•4 years ago
|
||
This allows so use --enable-linker=lld without a conflict (because
--enable-linker=gold overrides that, contrary to --enable-gold, who
creates a conflict via imply_option).
Assignee | ||
Comment 8•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/105b99c57d58
https://hg.mozilla.org/mozilla-central/rev/89be0e5685c1
https://hg.mozilla.org/mozilla-central/rev/c23a92caf5d7
Comment 11•4 years ago
|
||
== Change summary for alert #26674 (as of Fri, 07 Aug 2020 04:12:55 GMT) ==
Improvements:
9% raptor-webaudio-firefox linux64-shippable opt 133.25 -> 121.42
9% raptor-webaudio-firefox linux64-shippable-qr opt webrender 138.17 -> 126.25
7% raptor-webaudio-firefox linux64-shippable-qr opt webrender 136.46 -> 126.50
2% raptor-webaudio-firefox windows10-64-shippable opt 149.33 -> 146.08
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=26674
Updated•4 years ago
|
Description
•