mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
build: Set LLVM_BUILD_STATIC/CLANG_BUILD_STATIC when linking statically.
This is needed since LLVM 20, particularly for Windows.
This commit is contained in:
parent
7733b5dbe6
commit
1bfc71d4da
@ -698,6 +698,13 @@ add_library(zigcpp STATIC ${ZIG_CPP_SOURCES})
|
||||
target_compile_features(zigcpp PRIVATE cxx_std_17)
|
||||
set_target_properties(zigcpp PROPERTIES POSITION_INDEPENDENT_CODE ${ZIG_PIE})
|
||||
|
||||
if(LLVM_LINK_MODE STREQUAL "static")
|
||||
target_compile_definitions(zigcpp PRIVATE
|
||||
LLVM_BUILD_STATIC
|
||||
CLANG_BUILD_STATIC
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
if(MINGW)
|
||||
target_compile_options(zigcpp PRIVATE -Wno-format)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user