-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Find a way to get rid of src\tools\lld-wrapper
#97352
Comments
Also, an advice from
|
I'd be interested in addressing this myself, but I cannot properly test this on Apple targets with |
That would require copying lld for every variant. As stated in the description of #89288:
|
I don't see why the copy named UPD: The |
I'm not sure whether it's necessary to keep both |
cc @hkratz |
Each variant only works for some platforms. If we only keep ld, we can't link for example for wasm or macOS. While if we keep ld64, we can link for any non-apple OS. |
Sorry, I don't understand. |
|
Ah, I see, that's really unfortunate. |
This
is still an option though. We can also try upstream the change, reliably passing the flavor through a C compiler is a good motivation, IMO. |
There was patch that was abandoned in 2020 which is why I did not pursue that: https://reviews.llvm.org/D80184 |
https://reviews.llvm.org/D17952 [Clang] Accept absolute paths in the -fuse-ld option |
#97375 tries to implement something that almost matches #97352 (comment), except that we are using the |
@tschuett https://reviews.llvm.org/D17952 only affects clang and not gcc. In addition it doesn't help with getting rid of lld-wrapper, just with getting rid of the |
I know that the project is moving from Python to rust. Instead of symlinks, you could have super dooper tiny Python scripts forwarding to rust-lld. |
Python has way too long of a startup time for that. For small programs starting python would likely take longer than linking using lld saves. |
Simplify implementation of `-Z gcc-ld` - The logic is now unified for all targets (wasm targets should also be supported now) - Additional "symlink" files like `ld64` are eliminated - lld-wrapper is used for propagating the correct lld flavor - Cleanup "unwrap or exit" logic in lld-wrapper cc rust-lang#97352 r? `@bjorn3`
Closing this issue, lld-wrapper cannot be removed until
|
Hello, FWIW, not sure if that helps this issue, but LLVM 17.0.0 will support usage of LLD as a library, see https://reviews.llvm.org/D119049 In practice I think that means Overall the merging will improve Rust build execution times on Windows, where launching and starting executables rapidly, like Rust does, is not a good thing, especially on large core count machines. |
#89288 added a new wrapper tool the only purpose of which is to call LLD with the right flavor when
rust-lld
shipped with Rust distribution is used.I strongly suspect that it is not necessary and the whole setup can be simplified.
The LLD executable itself is already a wrapper that does dispatch on its name and passed
-flavor
, we should be able to make it do what is necessary for us.In the worst case we can patch
src\llvm-project\lld\tools\lld\lld.cpp
, sincerust-lld
is built and shipped by us using our fork of LLVM, that would still be better than a separate wrapper tool.The text was updated successfully, but these errors were encountered: