summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/package.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/private/action/require/impl/package.lua')
-rw-r--r--xmake/modules/private/action/require/impl/package.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index 9fb765f21..90efb3751 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -546,7 +546,8 @@ function _finish_requireinfo(requireinfo, package)
else
runtimes = {}
end
- if not table.contains(runtimes, "MT", "MD", "MTd", "MDd") then
+ -- we should not set default runtimes if runtimes has been set, e.g. `xmake f --toolchain=clang --runtimes=c++_shared`
+ if #runtimes == 0 then
local vs_runtime_default = project.policy("build.c++.msvc.runtime")
if vs_runtime_default and is_mode("debug") then
vs_runtime_default = vs_runtime_default .. "d"