Page MenuHomePhabricator

[cmake] Make linker detection take flags into account

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



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


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


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.