| author | |
| committer | |
| log | 1bfc71d4dab0a7347f76dc6f0afc1346bd3dc3bb |
| tree | 2294f80e70cc941166b72cf12d243ef4548b8ac1 |
| parent | 7733b5dbe603033a1ed9e8d0146ef7432d5ffd5b |
This is needed since LLVM 20, particularly for Windows.2 files changed, 10 insertions(+), 0 deletions(-)
CMakeLists.txt+7| ... | @@ -698,6 +698,13 @@ add_library(zigcpp STATIC ${ZIG_CPP_SOURCES}) | ... | @@ -698,6 +698,13 @@ add_library(zigcpp STATIC ${ZIG_CPP_SOURCES}) |
| 698 | target_compile_features(zigcpp PRIVATE cxx_std_17) | 698 | target_compile_features(zigcpp PRIVATE cxx_std_17) |
| 699 | set_target_properties(zigcpp PROPERTIES POSITION_INDEPENDENT_CODE ${ZIG_PIE}) | 699 | set_target_properties(zigcpp PROPERTIES POSITION_INDEPENDENT_CODE ${ZIG_PIE}) |
| 700 | 700 | ||
| 701 | if(LLVM_LINK_MODE STREQUAL "static") | ||
| 702 | target_compile_definitions(zigcpp PRIVATE | ||
| 703 | LLVM_BUILD_STATIC | ||
| 704 | CLANG_BUILD_STATIC | ||
| 705 | ) | ||
| 706 | endif() | ||
| 707 | |||
| 701 | if(NOT MSVC) | 708 | if(NOT MSVC) |
| 702 | if(MINGW) | 709 | if(MINGW) |
| 703 | target_compile_options(zigcpp PRIVATE -Wno-format) | 710 | target_compile_options(zigcpp PRIVATE -Wno-format) |
build.zig+3| ... | @@ -706,6 +706,9 @@ const exe_cflags = [_][]const u8{ | ... | @@ -706,6 +706,9 @@ const exe_cflags = [_][]const u8{ |
| 706 | "-Wno-type-limits", | 706 | "-Wno-type-limits", |
| 707 | "-Wno-missing-braces", | 707 | "-Wno-missing-braces", |
| 708 | "-Wno-comment", | 708 | "-Wno-comment", |
| 709 | // `exe_cflags` is only used for static linking. | ||
| 710 | "-DLLVM_BUILD_STATIC", | ||
| 711 | "-DCLANG_BUILD_STATIC", | ||
| 709 | }; | 712 | }; |
| 710 | 713 | ||
| 711 | fn addCmakeCfgOptionsToExe( | 714 | fn addCmakeCfgOptionsToExe( |