Skip to content

Commit 8009302

Browse files
authored
Statically link to libstdc++ (#2134)
so that we don't have to ship libstdc++ with Core
1 parent 02a5393 commit 8009302

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmake/platform_linux_desktop.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ function(setup_litecore_build)
7676
${target} PRIVATE
7777
"$<$<COMPILE_LANGUAGE:CXX>:-Wno-psabi;-Wno-odr>"
7878
)
79+
80+
# Enough is enough, we keep bumping the compiler to get newer C++ stuff
81+
# and then suffering the consequences of that stuff not being available
82+
# everywhere that we need. Just build it into the product directly
83+
target_link_options(
84+
${target} PRIVATE
85+
"-static-libstdc++"
86+
"-static-libgcc"
87+
)
7988
endforeach()
8089

8190
foreach(liteCoreVariant LiteCoreObjects LiteCoreUnitTesting)

0 commit comments

Comments
 (0)