diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-13 14:30:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-13 14:30:56 -0700 |
| commit | 4e9894cfc4c8e2e1d3e01aa2e3400b295b0ee2df (patch) | |
| tree | efc59febac4df5fb139b180ac4e8347b00f8fbe7 /cmake | |
| parent | cc650abf09d98ff241cc28b50b2519a9c4919dd0 (diff) | |
| download | zig-4e9894cfc4c8e2e1d3e01aa2e3400b295b0ee2df.tar.gz zig-4e9894cfc4c8e2e1d3e01aa2e3400b295b0ee2df.zip | |
cmake build: allow overriding whether to use llvm-config
Previously, there was an option ZIG_PREFER_LLVM_CONFIG which would
override the default of not using llvm-config when cross compiling.
That option is now removed in favor of the more powerful
ZIG_USE_LLVM_CONFIG which defaults to OFF for cross compiling and ON for
native compilation. The option overrides the default.
This will be used in zig-bootstrap to improve support for native builds.
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/Findllvm.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake index 02f22037b8..4984723ec2 100644 --- a/cmake/Findllvm.cmake +++ b/cmake/Findllvm.cmake @@ -63,7 +63,7 @@ if(ZIG_PREFER_CLANG_CPP_DYLIB) if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 12) message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}") endif() -elseif(("${ZIG_TARGET_TRIPLE}" STREQUAL "native") OR ZIG_PREFER_LLVM_CONFIG) +elseif(ZIG_USE_LLVM_CONFIG) find_program(LLVM_CONFIG_EXE NAMES llvm-config-11 llvm-config-11.0 llvm-config110 llvm-config11 llvm-config PATHS |
