diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-23 12:27:59 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-23 12:27:59 +0200 |
commit | 648b21b9ba3f174291813ca710206522b515140c (patch) | |
tree | 08dcd67d3c8e97246b893735d71991cce3f4dae0 /platform | |
parent | dd71bc2d3b613d3c63f75e671f36427f838f7396 (diff) | |
parent | df0a88b128cb24c1e0e445d5e859c4cffc4f50d2 (diff) | |
download | redot-engine-648b21b9ba3f174291813ca710206522b515140c.tar.gz |
Merge pull request #96813 from Repiteo/scons/fix-clang-cl-flags
SCons: Fix `clang-cl` link/ar flags
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/detect.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index db4c743595..9adab7284c 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(";")]) |