Closed Bug 1652374 Opened 4 years ago Closed 4 years ago

Ensure we are linking with LLD by default everywhere possible

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
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.

(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)?

(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: nobody → mh+mozilla
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/8a81f6395e4b
Use LLD for non-PGO-profile-use clang builds on automation. r=froydnj

Backed out for linux linker bustages.

backout: https://hg.mozilla.org/integration/autoland/rev/4de801160982dc8de4a164d4973ca9089def75d6

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedTaskRun=Dkow-agoTOC8TMGqkwPl4w.0&searchStr=build&revision=8a81f6395e4be6a207ca12a6d5a15ab2a6f7e928

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

Flags: needinfo?(mh+mozilla)

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).

Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/105b99c57d58
Replace --enable-gold with --enable-linker=gold in in-tree mozconfigs. r=dmajor
https://hg.mozilla.org/integration/autoland/rev/89be0e5685c1
Disable elfhack when explicitly building with --enable-linker=lld. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/c23a92caf5d7
Use LLD for non-PGO-profile-use clang builds on automation. r=froydnj
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

== 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

Keywords: perf-alert
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: