diff options
| author | levlam <levlam@telegram.org> | 2023-03-12 22:39:48 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2023-03-12 22:39:48 +0300 |
| commit | 9bf5786bde99b4b2a18fc60d6316fdeaaf7ae6a3 (patch) | |
| tree | 37e7ca9f3ce82a3d344cbd5a60c2a40985dbb02d /CMakeLists.txt | |
| parent | c5b8e34cd31276c9bfa4940c96adfd757542b9ce (diff) | |
Statically link libstdc++ and libgcc when memprof is enabled.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a1928a..bb69849 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,6 +73,9 @@ if (CLANG OR GCC) elseif (APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_pie") endif() + include(AddCXXCompilerFlag) + add_cxx_compiler_flag("-static-libstdc++") + add_cxx_compiler_flag("-static-libgcc") endif() endif() |
