Only shell out to llvm-config if the configure step found it

This commit is contained in:
Anthony Cowley 2018-01-09 12:37:01 -05:00 committed by Jacob Dufault
parent 71ca687252
commit 0bcf72d0a0

View File

@ -304,9 +304,12 @@ def build(bld):
lib.append('ncurses')
if bld.env['use_system_clang']:
rpath = str(subprocess.check_output(
if bld.env['llvm_config']:
rpath = str(subprocess.check_output(
[bld.env['llvm_config'], '--libdir'],
stderr=subprocess.STDOUT).decode()).strip()
else:
rpath = []
# Use CXX set by --check-cxx-compiler if it is "clang".
# See https://github.com/jacobdufault/cquery/issues/237