Closed Bug 1475650 Opened 2 years ago Closed 2 years ago

Use llvm-lib as AR when linking with lld-link

Categories

(Firefox Build System :: Toolchains, enhancement)

enhancement
Not set
normal

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: dmajor, Assigned: dmajor)

References

Details

Attachments

(1 file)

Building with ThinLTO requires that we use llvm-lib.exe as $(AR) because Microsoft's lib.exe doesn't understand the file format.

Without LTO, it's entirely possible to mix and match LLVM and MS's programs, but for simplicity let's just say we'll always use lld-link and llvm-lib together.

As a bonus, we can use -llvmlibthin to generate thin libraries, which store pointers to the original obj files rather than copy the data. As long as we don't need to ship or share the libs (which we don't) this can save us some work.
Attached patch llvm-libSplinter Review
Assignee: nobody → dmajor
Attachment #8992010 - Flags: review?(core-build-config-reviews)
Attachment #8992010 - Flags: review?(core-build-config-reviews) → review+
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/79c65f8a1a07
Use llvm-lib when linking with lld-link. r=froydnj
https://hg.mozilla.org/mozilla-central/rev/79c65f8a1a07
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.