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

Do not require gold plugin when linking with LLD #3105

Merged
merged 1 commit into from
Aug 6, 2019

Conversation

valpackett
Copy link
Contributor

LLD supports plugin-style flags, but the plugin itself might not exist. (getLTOGoldPluginPath might fail)

(on FreeBSD, it exists in an LLVM-version-specific place like /usr/local/llvm80/lib/LLVMgold.so. that should probably be added as well, the plugin is just not required for LLD. LLD is the primary linker here, /usr/bin/ld is LLD on aarch64 and amd64.)

@valpackett
Copy link
Contributor Author

hm, I wonder if lld on macos expects Darwin flags

LLD supports plugin-style flags, but the plugin itself might not exist.
@kinke
Copy link
Member

kinke commented Jul 16, 2019

I guess calling addLTOGoldPluginFlags() makes no sense for LLD in general, i.e., adding the other -plugin-* options.

@valpackett
Copy link
Contributor Author

valpackett commented Jul 16, 2019

I said "LLD supports plugin-style flags" for a reason :)

https://github.com/llvm-mirror/lld/blob/beb1e40a02f8be0cb2c71d551d86f84d495d41e3/ELF/Options.td#L505-L521 ← it's real! (not ignored)

@JohanEngelen
Copy link
Member

LGTM. Can we add a test for this some way, or are we happy with not testing it?

@kinke kinke merged commit 73cf033 into ldc-developers:master Aug 6, 2019
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.

None yet

3 participants