summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2021-02-23 15:21:14 +0100
committerGitHub <noreply@github.com>2021-02-23 15:21:14 +0100
commit50d71e7f2a889afd3cbf5673582b7f98d8037bac (patch)
tree0df34815dc9b136e192670c9b455c0ade37b7f08 /platform
parente254715e796f108d6d3fffa24cad9be90d2926e6 (diff)
parent0dc368f9f91364e082f06b349844c42df2ffbfd9 (diff)
Merge pull request #46347 from hpvb/static-link-atomic-clang
Allow static linking with libatomic using clang
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/detect.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index ff521e4e7f..8f1afe0e66 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -127,7 +127,6 @@ def configure(env):
env["CC"] = "clang"
env["CXX"] = "clang++"
env.extra_suffix = ".llvm" + env.extra_suffix
- env.Append(LIBS=["atomic"])
if env["use_lld"]:
if env["use_llvm"]:
@@ -394,3 +393,9 @@ def configure(env):
# That doesn't make any sense but it's likely a Ubuntu bug?
if is64 or env["bits"] == "64":
env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
+ if env["use_llvm"]:
+ env["LINKCOM"] = env["LINKCOM"] + " -l:libatomic.a"
+
+ else:
+ if env["use_llvm"]:
+ env.Append(LIBS=["atomic"])