summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-01-12 12:07:55 +0100
committerMax Kellermann <max@musicpd.org>2020-01-12 12:11:09 +0100
commit8c31370534a7c76aea243fb2ef4935f418f079cf (patch)
tree45b21c438903c1966768217e09f9daefcf7f5e3f /android
parent2306b0d78c2b025b0cf3d6771937bb71aef142e2 (diff)
android/build.py: drop --sysroot, -isystem, -L, ...
These appear to be no longer necessary (tested with NDK r20b). Closes https://github.com/android/ndk/issues/951
Diffstat (limited to 'android')
-rwxr-xr-xandroid/build.py25
1 files changed, 6 insertions, 19 deletions
diff --git a/android/build.py b/android/build.py
index cfa3c461b..bea1dd051 100755
--- a/android/build.py
+++ b/android/build.py
@@ -75,20 +75,14 @@ class AndroidNdkToolchain:
ndk_arch = abi_info['ndk_arch']
android_api_level = '21'
- ndk_platform = 'android-' + android_api_level
# select the NDK compiler
gcc_version = '4.9'
- ndk_platform_path = os.path.join(ndk_path, 'platforms', ndk_platform)
- sysroot = os.path.join(ndk_path, 'sysroot')
- target_root = os.path.join(ndk_platform_path, 'arch-' + ndk_arch)
-
install_prefix = os.path.join(arch_path, 'root')
self.arch = arch
self.install_prefix = install_prefix
- self.sysroot = sysroot
toolchain_path = os.path.join(ndk_path, 'toolchains', abi_info['toolchain_arch'] + '-' + gcc_version, 'prebuilt', build_arch)
llvm_path = os.path.join(ndk_path, 'toolchains', 'llvm', 'prebuilt', build_arch)
@@ -113,14 +107,10 @@ class AndroidNdkToolchain:
self.cflags = common_flags
self.cxxflags = common_flags
- self.cppflags = '--sysroot=' + sysroot + \
- ' -isystem ' + os.path.join(install_prefix, 'include') + \
- ' -isystem ' + os.path.join(sysroot, 'usr', 'include', arch)
- self.ldflags = '--sysroot=' + sysroot + \
- ' -L' + os.path.join(install_prefix, 'lib') + \
- ' -L' + os.path.join(target_root, 'usr', 'lib') + \
- ' -B' + os.path.join(target_root, 'usr', 'lib') + \
+ self.cppflags = ' -isystem ' + os.path.join(install_prefix, 'include')
+ self.ldflags = ' -L' + os.path.join(install_prefix, 'lib') + \
' ' + common_flags
+ self.ldflags = common_flags
self.libs = ''
self.is_arm = ndk_arch == 'arm'
@@ -128,13 +118,10 @@ class AndroidNdkToolchain:
self.is_aarch64 = ndk_arch == 'arm64'
self.is_windows = False
- libcxx_path = os.path.join(ndk_path, 'sources/cxx-stl/llvm-libc++')
- libcxx_libs_path = os.path.join(libcxx_path, 'libs', android_abi)
-
libstdcxx_flags = ''
- libstdcxx_cxxflags = libstdcxx_flags + ' -isystem ' + os.path.join(libcxx_path, 'include') + ' -isystem ' + os.path.join(ndk_path, 'sources/android/support/include')
- libstdcxx_ldflags = libstdcxx_flags + ' -L' + libcxx_libs_path
- libstdcxx_libs = '-lc++_static -lc++abi'
+ libstdcxx_cxxflags = ''
+ libstdcxx_ldflags = ''
+ libstdcxx_libs = '-static-libstdc++'
if self.is_armv7:
# On 32 bit ARM, clang generates no ".eh_frame" section;