summaryrefslogtreecommitdiff
path: root/xmake/rules/utils/compiler_runtime/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-18 16:59:35 +0800
committerGitHub <[email protected]>2025-12-18 16:59:35 +0800
commit141e575846c317e2fc41e553f777a1bdab2625e2 (patch)
tree1a3a3769b98b169cbb005db83595ef38f7d333eb /xmake/rules/utils/compiler_runtime/xmake.lua
parent67019f3310fe67e365c24df2a47806bf3fd947e5 (diff)
parent2fd415cbfc9592539011b4c452abf7225bb345da (diff)
Merge pull request #7146 from xmake-io/runtimes
Fix runtimes
Diffstat (limited to 'xmake/rules/utils/compiler_runtime/xmake.lua')
-rw-r--r--xmake/rules/utils/compiler_runtime/xmake.lua33
1 files changed, 2 insertions, 31 deletions
diff --git a/xmake/rules/utils/compiler_runtime/xmake.lua b/xmake/rules/utils/compiler_runtime/xmake.lua
index 756bd55f8..a80e6c875 100644
--- a/xmake/rules/utils/compiler_runtime/xmake.lua
+++ b/xmake/rules/utils/compiler_runtime/xmake.lua
@@ -21,35 +21,6 @@
-- define rule: utils.compiler.runtime
rule("utils.compiler.runtime")
on_config(function (target)
- local runtimes = get_config("runtimes")
- if not runtimes and target:is_plat("windows") then
- runtimes = get_config("vs_runtime")
- if runtimes then
- wprint("--vs_runtime=%s is deprecated, please use --runtimes=%s", runtimes, runtimes)
- end
- end
- if not runtimes and target:is_plat("android") then
- runtimes = get_config("ndk_cxxstl")
- if runtimes then
- wprint("--ndk_cxxstl=%s is deprecated, please use --runtimes=%s", runtimes, runtimes)
- end
- end
- if runtimes and not target:get("runtimes") then
- if type(runtimes) == "string" then
- runtimes = runtimes:split(",", {plain = true})
- end
- target:set("runtimes", runtimes)
- end
-
- -- enable vs runtime as MD by default
- if target:is_plat("windows") and not target:get("runtimes") then
- local vs_runtime_default = target:policy("build.c++.msvc.runtime")
- if vs_runtime_default and target:has_tool("cxx", "cl", "clang", "clangxx", "clang_cl") then
- if is_mode("debug") then
- vs_runtime_default = vs_runtime_default .. "d"
- end
- target:set("runtimes", vs_runtime_default)
- end
- end
+ import("rules.c++.config.runtime", {rootdir = os.programdir(), alias = "config_runtime"})
+ config_runtime(target)
end)
-