diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-19 22:36:03 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-19 22:36:19 +0100 |
commit | cad5d11261de8fea87b8568587f698cb0794e77f (patch) | |
tree | dcaaee0642da43f055d8894e1b907534e62e0d14 /android/build.py | |
parent | fcaedec2ab027971fdb342d257c4af6d3560edde (diff) |
android/build.py: simplify libc++ flags
By telling clang which implementation to use, we avoid the dependency
on libstdc++.so.
Diffstat (limited to 'android/build.py')
-rwxr-xr-x | android/build.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/android/build.py b/android/build.py index 393f1d7da..c2ee971e2 100755 --- a/android/build.py +++ b/android/build.py @@ -101,15 +101,13 @@ class AndroidNdkToolchain: libcxx_path = os.path.join(ndk_path, 'sources/cxx-stl/llvm-libc++') libcxx_libs_path = os.path.join(libcxx_path, 'libs', android_abi) - libstdcxx_cppflags = '-nostdinc++ -isystem ' + os.path.join(libcxx_path, 'include') + ' -isystem ' + os.path.join(ndk_path, 'sources/android/support/include') - libstdcxx_ldadd = os.path.join(libcxx_libs_path, 'libc++_static.a') + ' ' + os.path.join(libcxx_libs_path, 'libc++abi.a') - - if self.is_armv7: - libstdcxx_ldadd += ' ' + os.path.join(libcxx_libs_path, 'libunwind.a') + libstdcxx_flags = '-stdlib=libc++' + 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 + ' -static-libstdc++ -L' + libcxx_libs_path if use_cxx: - self.libs += ' ' + libstdcxx_ldadd - self.cppflags += ' ' + libstdcxx_cppflags + self.cxxflags += ' ' + libstdcxx_cxxflags + self.ldflags += ' ' + libstdcxx_ldflags self.env = dict(os.environ) |