Statically link libstdc++ and libgcc when memprof is enabled.

This commit is contained in:
levlam 2023-03-12 22:39:48 +03:00
parent c5b8e34cd3
commit 9bf5786bde

View File

@ -73,6 +73,9 @@ if (CLANG OR GCC)
elseif (APPLE) elseif (APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_pie") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_pie")
endif() endif()
include(AddCXXCompilerFlag)
add_cxx_compiler_flag("-static-libstdc++")
add_cxx_compiler_flag("-static-libgcc")
endif() endif()
endif() endif()