cmake: add option to use llvm-config to find cross-target llvm deps

This commit is contained in:
John Sullivan
2020-09-20 14:55:43 -07:00
committed by Andrew Kelley
parent 52ba2c3a43
commit ab7ea53541
2 changed files with 2 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ if(ZIG_PREFER_CLANG_CPP_DYLIB)
/usr/local/llvm10/lib
/usr/local/llvm100/lib
)
elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
elseif(("${ZIG_TARGET_TRIPLE}" STREQUAL "native") OR ZIG_PREFER_LLVM_CONFIG)
find_program(LLVM_CONFIG_EXE
NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config
PATHS