summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-20 00:38:50 +0800
committerruki <[email protected]>2024-01-20 00:38:50 +0800
commitb8bfde67ab0311254bf07897079da4ffaafdf62b (patch)
tree2fe111a1fec443b1fef5991da39ea721c587d925
parent8545a9301139aa8a778c4b61a1a3b6eaf40385e5 (diff)
fix android ndk r26b #4614
-rw-r--r--xmake/toolchains/ndk/load.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/toolchains/ndk/load.lua b/xmake/toolchains/ndk/load.lua
index 6f386178b..dac6388ca 100644
--- a/xmake/toolchains/ndk/load.lua
+++ b/xmake/toolchains/ndk/load.lua
@@ -304,16 +304,16 @@ function main(toolchain)
toolchain:add("ldflags", "-nostdlib++")
toolchain:add("shflags", "-nostdlib++")
end
- else
+ elseif ndkver and ndkver >= 26 then
-- The NDK's libc++ now comes directly from our LLVM toolchain above 26b
-- https://github.com/xmake-io/xmake/issues/4614
if ndk_cxxstl == "c++_static" then
- toolchain:add("syslinks", "c++_static")
+ toolchain:add("ldflags", "-static-libstdc++")
+ toolchain:add("shflags", "-static-libstdc++")
if arm32 then
toolchain:add("syslinks", "unwind", "atomic")
end
elseif ndk_cxxstl == "c++_shared" then
- toolchain:add("syslinks", "c++_shared")
if arm32 then
toolchain:add("syslinks", "unwind", "atomic")
end