This is an archive of the discontinued LLVM Phabricator instance.

[MinGW] Allow using LTO when lld is used as linker
ClosedPublic

Authored by mstorsjo on Oct 12 2018, 6:16 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Oct 12 2018, 6:16 AM
mstorsjo updated this revision to Diff 169387.Oct 12 2018, 6:31 AM

Added a minimal testcase.

rnk accepted this revision.Oct 12 2018, 11:33 AM

lgtm

lib/Driver/ToolChains/MinGW.cpp
383 ↗(On Diff #169387)

I thought we supported putting paths in this option, but I see we already use this pattern almost everywhere throughout the driver, so I guess checking for the symbolic name is fine.

This revision is now accepted and ready to land.Oct 12 2018, 11:33 AM
mstorsjo added inline comments.Oct 12 2018, 11:41 AM
lib/Driver/ToolChains/MinGW.cpp
383 ↗(On Diff #169387)

Well, in ToolChain::GetLinkerPath(), we do support both an absolute path and a symbolic name, but yes, there are other checks for symbolic names as well. Not sure if we should try to guess the kind of linker from an absolute pathname though...

This revision was automatically updated to reflect the committed changes.