| ... | ... | @@ -55,10 +55,7 @@ message("Configuring zig version ${ZIG_VERSION}") |
| 55 | 55 | set(ZIG_STATIC off CACHE BOOL "Attempt to build a static zig executable (not compatible with glibc)") |
| 56 | 56 | set(ZIG_STATIC_LLVM off CACHE BOOL "Prefer linking against static LLVM libraries") |
| 57 | 57 | set(ZIG_PREFER_CLANG_CPP_DYLIB off CACHE BOOL "Try to link against -lclang-cpp") |
| 58 | | set(ZIG_WORKAROUND_4799 off CACHE BOOL "workaround for https://github.com/ziglang/zig/issues/4799") |
| 59 | | set(ZIG_WORKAROUND_POLLY_SO off CACHE STRING "workaround for https://github.com/ziglang/zig/issues/4799") |
| 60 | 58 | set(ZIG_USE_CCACHE off CACHE BOOL "Use ccache if available") |
| 61 | | set(ZIG_WORKAROUND_6087 off CACHE BOOL "workaround for https://github.com/ziglang/zig/issues/6087") |
| 62 | 59 | |
| 63 | 60 | if(CCACHE_PROGRAM AND ZIG_USE_CCACHE) |
| 64 | 61 | SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") |
| ... | ... | @@ -92,16 +89,6 @@ if(APPLE AND ZIG_STATIC) |
| 92 | 89 | list(APPEND LLVM_LIBRARIES "${ZLIB}") |
| 93 | 90 | endif() |
| 94 | 91 | |
| 95 | | if(APPLE AND ZIG_WORKAROUND_6087) |
| 96 | | list(REMOVE_ITEM LLVM_LIBRARIES "-llibxml2.tbd") |
| 97 | | list(APPEND LLVM_LIBRARIES "-lxml2") |
| 98 | | endif() |
| 99 | | |
| 100 | | if(APPLE AND ZIG_WORKAROUND_4799) |
| 101 | | # eg: ${CMAKE_PREFIX_PATH} could be /usr/local/opt/llvm/ |
| 102 | | list(APPEND LLVM_LIBRARIES "-Wl,${CMAKE_PREFIX_PATH}/lib/libPolly.a" "-Wl,${CMAKE_PREFIX_PATH}/lib/libPollyPPCG.a" "-Wl,${CMAKE_PREFIX_PATH}/lib/libPollyISL.a") |
| 103 | | endif() |
| 104 | | |
| 105 | 92 | set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zigcpp") |
| 106 | 93 | |
| 107 | 94 | # Handle multi-config builds and place each into a common lib. The VS generator |
| ... | ... | @@ -415,9 +402,6 @@ target_link_libraries(zigcpp LINK_PUBLIC |
| 415 | 402 | ${LLVM_LIBRARIES} |
| 416 | 403 | ${CMAKE_THREAD_LIBS_INIT} |
| 417 | 404 | ) |
| 418 | | if(ZIG_WORKAROUND_POLLY_SO) |
| 419 | | target_link_libraries(zigcpp LINK_PUBLIC "-Wl,${ZIG_WORKAROUND_POLLY_SO}") |
| 420 | | endif() |
| 421 | 405 | |
| 422 | 406 | add_library(opt_c_util STATIC ${OPTIMIZED_C_SOURCES}) |
| 423 | 407 | set_target_properties(opt_c_util PROPERTIES |