Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use LLD linker for Darwin #212

Open
garymm opened this issue Sep 12, 2023 · 6 comments
Open

use LLD linker for Darwin #212

garymm opened this issue Sep 12, 2023 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@garymm
Copy link
Contributor

garymm commented Sep 12, 2023

LLD supports Darwin / Mach-O now: https://lld.llvm.org/MachO/index.html

And it's supposedly ~2-3x faster.

Just filing for reference since I saw this and noticed it was false:
https://github.com/grailbio/bazel-toolchain/blob/0f210543780f15e08436b3b6975ac2e11fead00b/toolchain/internal/configure.bzl#L169

@garymm
Copy link
Contributor Author

garymm commented Sep 12, 2023

CC @dzbarsky since your recent PR is what got me looking at this.

@keith
Copy link
Member

keith commented Sep 12, 2023

Note that as of Xcode 15 (released next week) performance isn't as much of a win.

@garymm
Copy link
Contributor Author

garymm commented Sep 13, 2023

Well still seems better for the toolchain to have as few non-hermetic deps as possible

@DavidZbarsky-at
Copy link

+1 to using LLD and avoiding the host dependency. I tried it out but saw issues with clang not recognizing the fuse-ld flag. I'm sure I was holding it wrong somehow, if anyone has a few cycles to play with it, would be a nice win.

@siddharthab
Copy link
Contributor

siddharthab commented Mar 12, 2024

Sent #286 as an attempt. It needs more work for rules_go and rules_foreign_cc, but otherwise seems to be working. Any help here is appreciated. I may not be able to get it to it anytime soon.

@siddharthab siddharthab added enhancement New feature or request help wanted Extra attention is needed labels Mar 12, 2024
@siddharthab
Copy link
Contributor

siddharthab commented Mar 14, 2024

#286 adds support for this but does not make it default. Users are requested to test on their projects and report. If it seems to be working, we can make it the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants