From b8bfde67ab0311254bf07897079da4ffaafdf62b Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 20 Jan 2024 00:38:50 +0800 Subject: fix android ndk r26b #4614 --- xmake/toolchains/ndk/load.lua | 6 +++--- 1 file 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 -- cgit v1.3.1