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

Switch x64 windows msvc target to use lld by default. #79448

Closed
wants to merge 1 commit into from

Conversation

crlf0710
Copy link
Member

cc #71520 .

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 26, 2020
@est31
Copy link
Member

est31 commented Nov 26, 2020

Should this be added to 1.50? I believe due to the many stabilizations it will be a base MSRV for a long time. Maybe LLD causes regressions/bugs so maybe it will be switched back in a future release. If 1.50.0 included lld though one would have to deal with it for a long time.

@est31
Copy link
Member

est31 commented Nov 26, 2020

As an alternative, one could add it, but make it conditional on the nightly channel. The stable and beta releases would still use the default setting.

@crlf0710
Copy link
Member Author

r? @Mark-Simulacrum

@bombless
Copy link
Contributor

Is it still x86_64_pc_windows_msvc or should it be x86_64_pc_windows_none or something?

@mati865
Copy link
Contributor

mati865 commented Nov 28, 2020

You still need MSVC toolchain for it to build, target vendor shouldn't be changed here.

@est31
Copy link
Member

est31 commented Nov 28, 2020

There is a proposal for a pure rust target in the todo list in #58713

@Mark-Simulacrum
Copy link
Member

r? @petrochenkov

@petrochenkov
Copy link
Contributor

petrochenkov commented Nov 29, 2020

@crlf0710
Have you tested this?
In the target spec you need to change base.linker_flavor at least + rust-lld is not found in PATH for some reason if it's taken from the target spec, so you may have to adjust some PATH setting or linker search code in link.rs (or perhaps rust-lld is just not shipped for MSVC targets).

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 29, 2020
@crlf0710
Copy link
Member Author

crlf0710 commented Dec 1, 2020

Thanks for the review! Unfortunately this seems to need a larger change than i thought, and i'm not very confident on getting the cross-compilation stuff correct... I'll just close this PR before i sort it out. Everybody is welcome to pick this up.

Related zulip stream: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/unblocked.3A.20using.20lld.20by.20default.20for.20x64.20msvc.20windows

@crlf0710 crlf0710 closed this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants