summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-09-10 13:48:53 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-09-10 13:48:53 -0500
commitdf0a88b128cb24c1e0e445d5e859c4cffc4f50d2 (patch)
treee57f0e419f28af87df762590a4f341257c721ce3 /platform
parent97ef3c837263099faf02d8ebafd6c77c94d2aaba (diff)
downloadredot-engine-df0a88b128cb24c1e0e445d5e859c4cffc4f50d2.tar.gz
SCons: Fix `clang-cl` link/ar flags
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/detect.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 684a7c34a0..f5de6c637d 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -620,18 +620,16 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
print("ThinLTO is only compatible with LLVM, use `use_llvm=yes` or `lto=full`.")
sys.exit(255)
- env.Append(CCFLAGS=["-flto=thin"])
- env.Append(LINKFLAGS=["-flto=thin"])
+ env.AppendUnique(CCFLAGS=["-flto=thin"])
elif env["use_llvm"]:
- env.Append(CCFLAGS=["-flto"])
- env.Append(LINKFLAGS=["-flto"])
+ env.AppendUnique(CCFLAGS=["-flto"])
else:
env.AppendUnique(CCFLAGS=["/GL"])
- env.AppendUnique(ARFLAGS=["/LTCG"])
- if env["progress"]:
- env.AppendUnique(LINKFLAGS=["/LTCG:STATUS"])
- else:
- env.AppendUnique(LINKFLAGS=["/LTCG"])
+ if env["progress"]:
+ env.AppendUnique(LINKFLAGS=["/LTCG:STATUS"])
+ else:
+ env.AppendUnique(LINKFLAGS=["/LTCG"])
+ env.AppendUnique(ARFLAGS=["/LTCG"])
if vcvars_msvc_config:
env.Prepend(CPPPATH=[p for p in str(os.getenv("INCLUDE")).split(";")])