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

Set lld flavor for MSVC to link.exe #68609

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Set lld flavor for MSVC to link.exe #68609

merged 1 commit into from
Jan 29, 2020

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Jan 28, 2020

This enables linking with LLD on Windows with just -C linker=rust-lld instead of needing -C linker=rust-lld -C linker-flavor=lld-link.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 28, 2020
@Mark-Simulacrum
Copy link
Member

I am definitely not the right reviewer for this. Maybe r? @alexcrichton?

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 29, 2020

📌 Commit 9150b8e has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 29, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 29, 2020
Set lld flavor for MSVC to link.exe

This enables linking with LLD on Windows with just `-C linker=rust-lld` instead of needing `-C linker=rust-lld -C linker-flavor=lld-link`.
bors added a commit that referenced this pull request Jan 29, 2020
Rollup of 7 pull requests

Successful merges:

 - #67722 (Minor: note how Any is an unsafe trait in SAFETY comments)
 - #68586 (Make conflicting_repr_hints a deny-by-default c-future-compat lint)
 - #68598 (Fix null synthetic_implementors error)
 - #68603 (Changelog: Demonstrate final build-override syntax)
 - #68609 (Set lld flavor for MSVC to link.exe)
 - #68611 (Correct ICE caused by macros generating invalid spans.)
 - #68627 (Document that write_all will not call write if given an empty buffer)

Failed merges:

r? @ghost
@ollie27
Copy link
Member

ollie27 commented Jan 29, 2020

Is this going to work properly for i686-pc-windows-msvc and thumbv7a-pc-windows-msvc which both add a few more things to pre_link_args?

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 29, 2020

I adjusted i686-pc-windows-msvc in #68646. thumbv7a-pc-windows-msvc seems to just work around a link.exe bug, so I left that unchanged.

@bors bors merged commit 9150b8e into rust-lang:master Jan 29, 2020
@Zoxc Zoxc deleted the lld-msvc branch January 29, 2020 16:41
@bors
Copy link
Contributor

bors commented Jan 29, 2020

☔ The latest upstream changes (presumably #68635) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 29, 2020
bors added a commit that referenced this pull request Feb 9, 2020
Add an option to use LLD to link the compiler on Windows platforms

Based on #68609.

Using LLD is good way to improve compile times on Windows since `link.exe` is quite slow. The time for `x.py build --stage 1 src/libtest` goes from 0:12:00 to 0:08:29. Compile time for `rustc_driver` goes from 226.34s to 18.5s. `rustc_macros` goes from 28.69s to 7.7s. The size of `rustc_driver` is also reduced from 83.3 MB to 78.7 MB.

r? @Mark-Simulacrum
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.

6 participants