Skip to content

Commit

Permalink
Server: Fix skip libstdc++ static linking on macOS
Browse files Browse the repository at this point in the history
Fixes #48161.
  • Loading branch information
akien-mga committed Feb 3, 2022
1 parent 8cae6fd commit 94dd9c2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions platform/server/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ def configure(env):
if env["execinfo"]:
env.Append(LIBS=["execinfo"])

# Link those statically for portability
if env["use_static_cpp"]:
env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
if platform.system() != "Darwin":
# Link those statically for portability
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"])

0 comments on commit 94dd9c2

Please sign in to comment.