This is an archive of the discontinued LLVM Phabricator instance.

ELF: Ignore argument after --plugin.
ClosedPublic

Authored by pcc on Jun 1 2018, 2:43 PM.

Details

Summary

Clang passes --plugin /path/to/LLVMgold.so to the linker when -flto is
passed. After r333607 we only ignore --plugin as a joined argument,
which means that the following argument (/path/to/LLVMgold.so) is
interpreted as an input file. This means that either every LTO'd
program ends up being linked with the gold plugin or we error out
if the plugin does not exist. The fix is to use Eq to ignore both
--plugin=foo and --plugin foo as before.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

pcc created this revision.Jun 1 2018, 2:43 PM
ruiu added a comment.Jun 1 2018, 2:45 PM

Could you add a test?

pcc updated this revision to Diff 149559.Jun 1 2018, 2:49 PM
  • Add test
ruiu accepted this revision.Jun 1 2018, 2:50 PM

LGTM

This revision is now accepted and ready to land.Jun 1 2018, 2:50 PM
This revision was automatically updated to reflect the committed changes.