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

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.

Differential Revision: https://reviews.llvm.org/D56805


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351515 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed