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 linker optimizations #6190

Closed
thestinger opened this issue May 2, 2013 · 5 comments
Closed

use linker optimizations #6190

thestinger opened this issue May 2, 2013 · 5 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@thestinger
Copy link
Contributor

Among other possibilities, GNU's ld (ld.bfd) and ld.gold have an -O switch to perform various optimizations. It makes them spend more time optimizing lookup table performance/size. Rust has long mangled symbol names so these optimizations are going to be important once there are large projects with lots of symbols. We probably also want to use --as-needed and perhaps --gc-sections.

Sadly Apple's ld is pretty crippled and lacks the -O switch, and I'm unsure about how portable these flags are overall. Although this issue would be bypassed by eventually using LLVM's lld linker.

@catamorphism
Copy link
Contributor

(bug triage) Good idea, but seems like just-a-bug to me.

@emberian
Copy link
Member

I'll take a poke at it this week.

@sanxiyn
Copy link
Member

sanxiyn commented Nov 25, 2013

This seems to have landed. What happened to Apple's ld situation?

@thestinger
Copy link
Contributor Author

@sanxiyn: it's only enabled on Linux at the moment, and we could likely flip it on for Windows too since we use MinGW and will be able to pass the same flags to lld

@alexcrichton
Copy link
Member

Closed on linux by #10620, I'm not sure if this exists much more on other platforms, and most of the concerns of this are probably going to get subsumed by #10741. Closing for now (but feel free to reopen if anyone thinks otherwise!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

5 participants