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

Try lld #5813

Merged
merged 1 commit into from
Aug 19, 2020
Merged

Try lld #5813

merged 1 commit into from
Aug 19, 2020

Conversation

matklad
Copy link
Member

@matklad matklad commented Aug 19, 2020

No description provided.

@matklad matklad force-pushed the ldd branch 2 times, most recently from 76631c2 to 65b3e0d Compare August 19, 2020 13:25
@@ -12,7 +12,7 @@ env:
CARGO_NET_RETRY: 10
CI: 1
RUST_BACKTRACE: short
RUSTFLAGS: -D warnings
RUSTFLAGS: -D warnings -C linker=clang -C link-arg=-fuse-ld=lld
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need to install lld first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda hoped that it is there by default, but no :(

My endg goal is to try lld on windows (as it is the CI bottleneck). I guess I can do this by seetting different RUSTFLAGS per OS, but I can't figure a convenient way to do that

@matklad matklad force-pushed the ldd branch 2 times, most recently from 328ade4 to 375a2b7 Compare August 19, 2020 18:09
@matklad
Copy link
Member Author

matklad commented Aug 19, 2020

Ok, got to work it on windows, but, apparently, it is slower? :-(

@matklad
Copy link
Member Author

matklad commented Aug 19, 2020

Hm, second try seems much faster,

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 19, 2020

@bors bors bot merged commit 5dafd39 into rust-lang:master Aug 19, 2020
@matklad matklad deleted the ldd branch August 19, 2020 20:28
@kjeremy
Copy link
Contributor

kjeremy commented Aug 20, 2020

Is that from the llvm-tools-preview component or whatever it's called? I actually thought those were stubs on windows.

@matklad
Copy link
Member Author

matklad commented Aug 20, 2020

I have no idea, tbh

@mati865
Copy link
Contributor

mati865 commented Aug 24, 2020

Is that from the llvm-tools-preview component or whatever it's called? I actually thought those were stubs on windows.

Rust-lld is always installed, llvm-tools-preview work fine (at least for windows-gnu).

For using system LLD on windows-gnu you use -C link-arg=-fuse-ld=lld and for bundled rust-lld -C linker=rust-lld on windows-msvc.
Using bundled rust-lld with windows-gnu/unix is blocked on rust-lang/rust#71515

@matklad
Copy link
Member Author

matklad commented Aug 24, 2020

For posterity, I don't think this significantly improved overall compile time for windous on CI for us, so either the difference in linking time is small, or linking time is small relative to the rest of compilation. Note, however, that we cache all the dependencies, so linking time should be relatively more important than in the case of from-scratch compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants