summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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