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

Use lld as linker and enable --icf=safe on all targets #724

Closed
NobodyXu opened this issue Jan 17, 2023 · 7 comments · Fixed by #805
Closed

Use lld as linker and enable --icf=safe on all targets #724

NobodyXu opened this issue Jan 17, 2023 · 7 comments · Fixed by #805
Labels
Blocked: on hold This is put on hold or may be waiting for other work

Comments

@NobodyXu
Copy link
Member

From #719 (comment)

@NobodyXu
Copy link
Member Author

@passcod BTW, is there anyway to install lld on windows?
On ubuntu there's apt, on macos there seems to have homebrew pre-installed, but on windows ... totally not sure.
I can certainly try installing homebrew, but not sure how well it runs on windows.

And I checked actions/runner-images for installed softwares, it only mentions clang not lld.

Our CI also failed due to ld not found.

@passcod
Copy link
Member

passcod commented Jan 17, 2023

Windows has chocolatey, it might be in there

@NobodyXu
Copy link
Member Author

Windows has chocolatey, it might be in there

Thanks, I just checked the list and chocolatey is supported.

@passcod
Copy link
Member

passcod commented Jan 17, 2023

Here: https://community.chocolatey.org/packages/llvm
Try

choco install llvm

@NobodyXu
Copy link
Member Author

You know what, I would actually do this in #722 since the CI has failed again...

@NobodyXu
Copy link
Member Author

This issue is now blocked on #725 as doing this with cross is just too complicated, but #725 is now blocked on upstream.

@NobodyXu NobodyXu added the Blocked: on hold This is put on hold or may be waiting for other work label Jan 17, 2023
@NobodyXu
Copy link
Member Author

I've found a solution to this:

There's actually a flag called -Zgcc-ld=lld that uses rust-lld bundled with rustup, which will save us the hazard of installing lld and configure it in cross-compilation.

Also, there's ongoing effort to stablise it (and this is in fact how I learn about this flag in the first place): rust-lang/compiler-team#510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked: on hold This is put on hold or may be waiting for other work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants