summaryrefslogtreecommitdiffstats
path: root/llvm/test/lit.cfg.py
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-01-18 03:36:04 +0000
committerNico Weber <nicolasweber@gmx.de>2019-01-18 03:36:04 +0000
commit71ac58e31160b4b3a6a7c185288b5cec6399cc2c (patch)
treed16767fa1ac59a63f3f264260e88016ee827bb3f /llvm/test/lit.cfg.py
parent1a5ce5162684fc2e5fc73d39be597c8639cbb910 (diff)
downloadbcm5719-llvm-71ac58e31160b4b3a6a7c185288b5cec6399cc2c.tar.gz
bcm5719-llvm-71ac58e31160b4b3a6a7c185288b5cec6399cc2c.zip
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 llvm-svn: 351515
Diffstat (limited to 'llvm/test/lit.cfg.py')
-rw-r--r--llvm/test/lit.cfg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 3c154c5899e..4200dd57dc4 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -278,7 +278,10 @@ if have_ld_plugin_support():
def have_ld64_plugin_support():
- if not config.llvm_tool_lto_build or config.ld64_executable == '':
+ if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'libLTO' + config.llvm_shlib_ext)):
+ return False
+
+ if config.ld64_executable == '':
return False
ld_cmd = subprocess.Popen(
OpenPOWER on IntegriCloud