foundationdb: do not statically link libcxx/libstdc++/libgcc

FDB defaults to statically linking libcxx, libstdc++, and libgcc. This leads
to non-obvious problems when the dependencies bring in their own copies. Do
not do that as we're not trying to build and package portable binaries.

Fixes #319537.
Fixes #378888.
This commit is contained in:
Kornelijus Survila
2025-12-10 01:07:48 -07:00
parent c2645bc8a1
commit 7d831bec51
+6
View File
@@ -107,6 +107,12 @@ stdenv.mkDerivation rec {
"-DBUILD_DOCUMENTATION=FALSE"
# Disable the default static linking to libc++, libstdc++ and libgcc.
#
# This leads to various, non-obvious problems as our dependencies bring in
# their own copies of these libraries.
"-DSTATIC_LINK_LIBCXX=FALSE"
# LTO brings up overall build time, but results in much smaller
# binaries for all users and the cache.
"-DUSE_LTO=ON"