summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-22 22:43:29 +0800
committerruki <[email protected]>2024-01-25 12:09:58 +0800
commita74bb4c14a8eda9c70062c1c6f592f2474672b71 (patch)
tree6ee4ec8ba24c424ad63538d296ee1779dace8998
parentecd32a1463825b40a6dc69695bbb0276b7236ae7 (diff)
improve android runtimes
-rw-r--r--xmake/modules/core/tools/clang.lua5
-rw-r--r--xmake/rules/utils/compiler_runtime/xmake.lua6
2 files changed, 8 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/clang.lua b/xmake/modules/core/tools/clang.lua
index 7e1f37b8d..673500599 100644
--- a/xmake/modules/core/tools/clang.lua
+++ b/xmake/modules/core/tools/clang.lua
@@ -206,8 +206,7 @@ function nf_runtime(self, runtime)
}
end
return maps and maps[runtime]
- else
- --[[
+ elseif not self:is_plat("android") then -- we will set runtimes in android ndk toolchain
local maps
if kind == "cxx" then
maps = {
@@ -223,7 +222,7 @@ function nf_runtime(self, runtime)
["stdc++_static"] = {"-stdlib=libstdc++", "-static-libstdc++"},
["stdc++_shared"] = "-stdlib=libstdc++",
}
- end]]
+ end
return maps and maps[runtime]
end
end
diff --git a/xmake/rules/utils/compiler_runtime/xmake.lua b/xmake/rules/utils/compiler_runtime/xmake.lua
index 61681b235..1a50fddef 100644
--- a/xmake/rules/utils/compiler_runtime/xmake.lua
+++ b/xmake/rules/utils/compiler_runtime/xmake.lua
@@ -24,9 +24,15 @@ rule("utils.compiler.runtime")
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