authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-12 22:35:06-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-12 22:35:06-07:00
logea45ee54843b10a433bb223caa9706d8253e3222
tree624ae20166f258ea6a3bea54b1be07cba7395a9f
parent9e05f42feeaebe1450d87662f1c7e5e2e392ca9b

cmake: remove all the LLVM 10 workarounds


1 files changed, 0 insertions(+), 16 deletions(-)

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