From 52c63f7cfd16c79f326ee2af472b65c48d892fd7 Mon Sep 17 00:00:00 2001 From: allkhor Date: Fri, 26 Oct 2018 23:53:44 +0600 Subject: [PATCH] Don't copying libc++_shared.so when module android_stl is disabled --- platform/android/SCsub | 5 +++-- platform/android/detect.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/android/SCsub b/platform/android/SCsub index 210566f0f77..262bdd87253 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -169,5 +169,6 @@ if lib_arch_dir != '': env_android.Command(out_dir + '/libgodot_android.so', '#bin/libgodot' + env['SHLIBSUFFIX'], Move("$TARGET", "$SOURCE")) ndk_version = get_ndk_version(env["ANDROID_NDK_ROOT"]) if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("15.0.4075724"): - stl_lib_path = str(env['ANDROID_NDK_ROOT']) + '/sources/cxx-stl/llvm-libc++/libs/' + lib_arch_dir + '/libc++_shared.so' - env_android.Command(out_dir + '/libc++_shared.so', stl_lib_path, Copy("$TARGET", "$SOURCE")) + if env['android_stl'] == 'yes': + stl_lib_path = str(env['ANDROID_NDK_ROOT']) + '/sources/cxx-stl/llvm-libc++/libs/' + lib_arch_dir + '/libc++_shared.so' + env_android.Command(out_dir + '/libc++_shared.so', stl_lib_path, Copy("$TARGET", "$SOURCE")) diff --git a/platform/android/detect.py b/platform/android/detect.py index efdd2ffc6dc..cc84e472ace 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -178,7 +178,7 @@ def configure(env): common_opts = ['-fno-integrated-as', '-gcc-toolchain', gcc_toolchain_path] - if env['android_stl']: + if env['android_stl'] == 'yes': env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/include"]) env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"]) env.Append(CXXFLAGS=['-frtti',"-std=gnu++14"])