Skip to content

Commit

Permalink
disable static linking to stdlib to as bug workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
WinteryFox committed Nov 7, 2023
1 parent 13fe63b commit ee9d373
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif ()
# Statically linking to libstd with C++23 causes a linker bug
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110572
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc -static")

if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
Expand Down

0 comments on commit ee9d373

Please sign in to comment.