| ... | @@ -120,6 +120,7 @@ string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_INCLUDE_DIR_ESCAPED "${ZIG_LIBC_ | ... | @@ -120,6 +120,7 @@ string(REGEX REPLACE "\\\\" "\\\\\\\\" ZIG_LIBC_INCLUDE_DIR_ESCAPED "${ZIG_LIBC_ |
| 120 | set(ZIG_TARGET_TRIPLE "native" CACHE STRING "arch-os-abi to output binaries for") | 120 | set(ZIG_TARGET_TRIPLE "native" CACHE STRING "arch-os-abi to output binaries for") |
| 121 | set(ZIG_TARGET_MCPU "native" CACHE STRING "-mcpu parameter to output binaries for") | 121 | set(ZIG_TARGET_MCPU "native" CACHE STRING "-mcpu parameter to output binaries for") |
| 122 | set(ZIG_SINGLE_THREADED off CACHE BOOL "limit the zig compiler to use only 1 thread") | 122 | set(ZIG_SINGLE_THREADED off CACHE BOOL "limit the zig compiler to use only 1 thread") |
| | 123 | set(ZIG_AR_WORKAROUND off CACHE BOOL "append 'ar' subcommand to CMAKE_AR") |
| 123 | | 124 | |
| 124 | if("${ZIG_TARGET_TRIPLE}" STREQUAL "native") | 125 | if("${ZIG_TARGET_TRIPLE}" STREQUAL "native") |
| 125 | set(ZIG_USE_LLVM_CONFIG ON CACHE BOOL "use llvm-config to find LLVM libraries") | 126 | set(ZIG_USE_LLVM_CONFIG ON CACHE BOOL "use llvm-config to find LLVM libraries") |
| ... | @@ -127,6 +128,11 @@ else() | ... | @@ -127,6 +128,11 @@ else() |
| 127 | set(ZIG_USE_LLVM_CONFIG OFF CACHE BOOL "use llvm-config to find LLVM libraries") | 128 | set(ZIG_USE_LLVM_CONFIG OFF CACHE BOOL "use llvm-config to find LLVM libraries") |
| 128 | endif() | 129 | endif() |
| 129 | | 130 | |
| | 131 | if(ZIG_AR_WORKAROUND) |
| | 132 | string(REPLACE "<CMAKE_AR>" "<CMAKE_AR> ar" CMAKE_C_ARCHIVE_CREATE ${CMAKE_C_ARCHIVE_CREATE}) |
| | 133 | string(REPLACE "<CMAKE_AR>" "<CMAKE_AR> ar" CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_CXX_ARCHIVE_CREATE}) |
| | 134 | endif() |
| | 135 | |
| 130 | find_package(llvm 15) | 136 | find_package(llvm 15) |
| 131 | find_package(clang 15) | 137 | find_package(clang 15) |
| 132 | find_package(lld 15) | 138 | find_package(lld 15) |