Skip to content

Commit

Permalink
force static link libstdc++?
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangff committed Feb 23, 2024
1 parent 02fbac4 commit f976a33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/CompilerOptions/clang.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
set(LINKER_FLAGS "-g" PARENT_SCOPE)

if (WIN32)
set(DEFAULT_COMPILER_FLAGS "-g;-gcodeview;-fcolor-diagnostics;-Wno-unknown-pragmas;-Wno-unused-parameter;-fms-extensions;-Wignored-attributes" PARENT_SCOPE)
else()
set(DEFAULT_COMPILER_FLAGS "-g;-fcolor-diagnostics;-Wno-unknown-pragmas;-Wno-unused-parameter;-fms-extensions;-Wignored-attributes;-fno-delete-null-pointer-checks" PARENT_SCOPE)
set(LINKER_FLAGS "${LINKER_FLAGS};-static-libgcc;-static-libstdc++" PARENT_SCOPE)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
endif()

set(LINKER_FLAGS "-g" PARENT_SCOPE)
set(DEFAULT_SHARED_LINKER_FLAGS "${LINKER_FLAGS}" PARENT_SCOPE)
set(DEFAULT_EXE_LINKER_FLAGS "${LINKER_FLAGS}" PARENT_SCOPE)

Expand Down

0 comments on commit f976a33

Please sign in to comment.