summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-29 22:49:14 +0800
committerruki <[email protected]>2024-01-29 22:49:14 +0800
commitbea58211f4c79bd04d9443627ce1840cdf4218b6 (patch)
treea402bf29abb32c01698f564dbb8d4d0dd93b0d67
parent1d4a3e7645143f98ea1089b63153834f7c913d4b (diff)
add more runtimes for clang
-rw-r--r--xmake/toolchains/clang/xmake.lua3
-rw-r--r--xmake/toolchains/llvm/xmake.lua5
2 files changed, 8 insertions, 0 deletions
diff --git a/xmake/toolchains/clang/xmake.lua b/xmake/toolchains/clang/xmake.lua
index 981cac82e..0a792ca40 100644
--- a/xmake/toolchains/clang/xmake.lua
+++ b/xmake/toolchains/clang/xmake.lua
@@ -59,6 +59,9 @@ toolchain("clang" .. suffix)
toolchain:add("ldflags", march)
toolchain:add("shflags", march)
end
+ if toolchain:is_plat("windows") then
+ toolchain:add("runtimes", "MT", "MTd", "MD", "MDd")
+ end
end)
end
toolchain_clang()
diff --git a/xmake/toolchains/llvm/xmake.lua b/xmake/toolchains/llvm/xmake.lua
index ef27a2073..5c6ab2586 100644
--- a/xmake/toolchains/llvm/xmake.lua
+++ b/xmake/toolchains/llvm/xmake.lua
@@ -41,6 +41,11 @@ toolchain("llvm")
on_load(function (toolchain)
+ -- add runtimes
+ if toolchain:is_plat("windows") then
+ toolchain:add("runtimes", "MT", "MTd", "MD", "MDd")
+ end
+
-- add march flags
local march
if toolchain:is_plat("windows") and not is_host("windows") then