This is an archive of the discontinued LLVM Phabricator instance.

mac: Correctly disable tools/lto tests when building with LLVM_ENABLE_PIC=OFF
ClosedPublic

Authored by thakis on Jan 16 2019, 1:16 PM.

Details

Summary

llvm/tools sets LLVM_TOOL_LTO_BUILD to Off if LLVM_ENABLE_PIC=OFF, but that's not visible in llvm/test.

r289662 added the llvm_tool_lto_build lit parameter, there the intent was to use it with an explicit -DLLVM_TOOL_LTO_BUILD=OFF, which is visible globally. On the review for that (D27739), a mild preference was expressed for using a lit parameter over checking the existence of libLTO.dylib. Since that works with the LLVM_ENABLE_PIC=OFF case too and since it matches what we do for the gold plugin, switch to that approach.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Jan 16 2019, 1:16 PM

mehdi, is this fine with you?

steven_wu accepted this revision.Jan 17 2019, 3:45 PM

Not sure about gn part and if that has any impact. Otherwise, LGTM.

This revision is now accepted and ready to land.Jan 17 2019, 3:45 PM
This revision was automatically updated to reflect the committed changes.