This is an archive of the discontinued LLVM Phabricator instance.

cmake: Configure the ThinLTO cache directory when using ELF lld or gold.
ClosedPublic

Authored by pcc on Mar 1 2017, 6:46 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Mar 1 2017, 6:46 PM
mehdi_amini edited edge metadata.Mar 1 2017, 6:55 PM
mehdi_amini added a subscriber: inglorion.

CC Bob, I suspect we should add the support for this option for lld-link on windows as well.

llvm/cmake/modules/HandleLLVMOptions.cmake
724 ↗(On Diff #90269)

Is LLVM_USE_LINKER already normalized into lower case? It seems that STREQUAL is case sensitive.

730 ↗(On Diff #90269)

I'm fine with this for now, but I feel we should provide a clang driver option to abstract away all this logic.

mehdi_amini accepted this revision.Mar 1 2017, 6:57 PM
This revision is now accepted and ready to land.Mar 1 2017, 6:57 PM
pcc added inline comments.Mar 1 2017, 7:12 PM
llvm/cmake/modules/HandleLLVMOptions.cmake
724 ↗(On Diff #90269)

I don't think so, but I wouldn't normally expect something like -DLLVM_USE_LINKER=LLD to work anyway because this will translate into -fuse-ld=LLD which probably wouldn't work on case-sensitive file systems (which ELF targets normally are).

730 ↗(On Diff #90269)

Agreed, I've added a FIXME.

This revision was automatically updated to reflect the committed changes.