| author | |
| committer | |
| log | ab7ea5354101ffaf5c9708ca6398ff7b765b781f |
| tree | 70ec72cf93617477b95b5f1140d7e531dacd4271 |
| parent | 52ba2c3a43a88a4db30cff47f2f3eff8c3d5be19 |
2 files changed, 2 insertions(+), 1 deletions(-)
CMakeLists.txt+1| ... | ... | @@ -74,6 +74,7 @@ option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF) |
| 74 | 74 | set(ZIG_TARGET_TRIPLE "native" CACHE STRING "arch-os-abi to output binaries for") |
| 75 | 75 | set(ZIG_TARGET_MCPU "baseline" CACHE STRING "-mcpu parameter to output binaries for") |
| 76 | 76 | set(ZIG_EXECUTABLE "" CACHE STRING "(when cross compiling) path to already-built zig binary") |
| 77 | set(ZIG_PREFER_LLVM_CONFIG off CACHE BOOL "(when cross compiling) use llvm-config to find target llvm dependencies if needed") | |
| 77 | 78 | |
| 78 | 79 | find_package(llvm) |
| 79 | 80 | find_package(clang) |
cmake/Findllvm.cmake+1-1| ... | ... | @@ -32,7 +32,7 @@ if(ZIG_PREFER_CLANG_CPP_DYLIB) |
| 32 | 32 | /usr/local/llvm10/lib |
| 33 | 33 | /usr/local/llvm100/lib |
| 34 | 34 | ) |
| 35 | elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native") | |
| 35 | elseif(("${ZIG_TARGET_TRIPLE}" STREQUAL "native") OR ZIG_PREFER_LLVM_CONFIG) | |
| 36 | 36 | find_program(LLVM_CONFIG_EXE |
| 37 | 37 | NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config |
| 38 | 38 | PATHS |