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.
This commit is contained in:
parent
329f9cd9fe
commit
5724656acb
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue