diff options
| author | ruki <[email protected]> | 2018-11-14 22:54:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-14 11:26:39 +0800 |
| commit | ea8a9de0070f8fc2e1fb682ddd4726f3fe5e441f (patch) | |
| tree | eb1c36190584ac2a5714b0f8f53854134c6a60a2 | |
| parent | 7721931851ea6b215e7a0482189dfb99d28bd4f3 (diff) | |
fix stl links for android ndk
| -rw-r--r-- | xmake/platforms/android/load.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/platforms/android/load.lua b/xmake/platforms/android/load.lua index 12e0ff372..6ed977f2f 100644 --- a/xmake/platforms/android/load.lua +++ b/xmake/platforms/android/load.lua @@ -131,8 +131,13 @@ function main(platform) platform:add("cxxflags", format("-I%s/libs/%s/include", cxxstl_sdkdir, toolchains_archs[arch])) platform:add("ldflags", format("-L%s/libs/%s", cxxstl_sdkdir, toolchains_archs[arch])) platform:add("shflags", format("-L%s/libs/%s", cxxstl_sdkdir, toolchains_archs[arch])) - platform:add("ldflags", "-lgnustl_static") - platform:add("shflags", "-lgnustl_static") + if cxxstl_sdkdir:find("llvm-libc++", 1, true) then + platform:add("ldflags", "-lc++") + platform:add("shflags", "-lc++") + else + platform:add("ldflags", "-lgnustl_static") + platform:add("shflags", "-lgnustl_static") + end end end end |
