Commit 5724656a authored by Max Kellermann's avatar Max Kellermann

android/build.py: enable function/data sections in static libraries

.. and make all library symbols hidden by default. Saves big amounts of .text section size with --gc-sections, because only this allows discarding unused functions from those (static) third-party libraries.
parent 329f9cd9
......@@ -73,6 +73,8 @@ class AndroidNdkToolchain:
self.cxx = os.path.join(llvm_bin, 'clang++')
common_flags += ' -target ' + llvm_triple + ' -integrated-as -gcc-toolchain ' + toolchain_path
common_flags += ' -fvisibility=hidden -fdata-sections -ffunction-sections'
self.ar = os.path.join(toolchain_bin, arch + '-ar')
self.ranlib = os.path.join(toolchain_bin, arch + '-ranlib')
self.nm = os.path.join(toolchain_bin, arch + '-nm')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment