-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Support LLD linker for Darwin #286
Conversation
I gave this a quick spin, it might need more work for darwin_arm? (With llvm 17.0.6)
|
It might. I did develop this on an M2 Mini, but I tested it only on the simple tests in this repo, without a custom sysroot. The params look like this for me:
|
I found my mistake. At least the repo tests should be passing now. |
I will wait for at least some people to say this change is working for them. This may not make it into the next release. |
@siddharthab I suspect this might be a llvm/lld version difference. Looks like the tests run on 16.x |
On my local machine, I checked with LLVM 17 as well. |
Anecdata, working fine on Bazel 7.1 on an M2 mac with up-to-date rules_rust, rules_go, llvm. |
I think that for @DavidZbarsky-at , it is either the I am thinking of landing this behind a feature flag so people can more easily try it within their projects. Most likely, it might just mean adding a few more flags to the invocation which can be iterated on as more people try. |
Made it optional, and added to the PR description instructions on how to use for a project. |
* 2024.03.12: bazel-contrib/toolchains_llvm#286: Support LLD linker for Darwin
* 2024.03.12: bazel-contrib/toolchains_llvm#286: Support LLD linker for Darwin
Users can use with
--linkopt=-fuse-ld=ld64.lld
flag.Eventually, we should make this the default. But only after we hear from some users that it works for their projects. This PR will make it easy for them to test.