diff options
| author | ruki <[email protected]> | 2024-09-16 18:46:53 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-09-16 18:46:53 +0800 |
| commit | 971318d9d33ab5190745cb4a86b4c75e916e72e4 (patch) | |
| tree | 5c236046b908a898de0c51acb84aa97b218c491f /xmake/modules | |
| parent | ea1ed3818378496488e693bd264a520d84cdacea (diff) | |
| parent | 3223ff3972ae01d8325f993107ed925acebd016c (diff) | |
Merge pull request #5626 from xmake-io/runtimes
Switch the default vs runtime as MD when 3.0
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 48339fef3..307d1620a 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -597,7 +597,11 @@ function _finish_requireinfo(requireinfo, package) runtimes = {} end if not table.contains(runtimes, "MT", "MD", "MTd", "MDd") then - table.insert(runtimes, "MT") + 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" + end + table.insert(runtimes, vs_runtime_default or "MT") end requireinfo.configs.runtimes = table.concat(runtimes, ",") end |
