This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Make linker detection take flags into account
ClosedPublic

Authored by smeenai on Apr 9 2018, 3:37 PM.

Details

Summary

LLVM might be compiled using a toolchain file which controls the linker
to use via flags (e.g. -B or -fuse-ld=). Take these flags into
account for linker detection. We can also correct the detection by
manually passing LLVM_USE_LINKER, of course, but it seems more
convenient to have the detection take flags into account.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.Apr 9 2018, 3:37 PM
smeenai updated this revision to Diff 144044.Apr 25 2018, 5:52 PM

Only read CMAKE_EXE_LINKER_FLAGS, to be consistent with CMake under CMP0056

(Gentle ping. This isn't urgent, but it would be nice to have.)

phosek accepted this revision.Apr 25 2018, 9:10 PM

LGTM

This revision is now accepted and ready to land.Apr 25 2018, 9:10 PM
This revision was automatically updated to reflect the committed changes.