Server: Fix skip libstdc++ static linking on macOS

Fixes #48161.

(cherry picked from commit 94dd9c26dd)
This commit is contained in:
Rémi Verschelde 2022-02-03 17:54:52 +01:00
parent e33a73d66e
commit 269c585f08
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 9 additions and 3 deletions

View File

@ -259,6 +259,12 @@ def configure(env):
if env["execinfo"]: if env["execinfo"]:
env.Append(LIBS=["execinfo"]) env.Append(LIBS=["execinfo"])
# Link those statically for portability if platform.system() != "Darwin":
if env["use_static_cpp"]: # Link those statically for portability
env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) if env["use_static_cpp"]:
env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
if env["use_llvm"] and platform.system() != "FreeBSD":
env["LINKCOM"] = env["LINKCOM"] + " -l:libatomic.a"
else:
if env["use_llvm"] and platform.system() != "FreeBSD":
env.Append(LIBS=["atomic"])