[ndk][conf] Add enable-shrink-binary-size to reduce size.
Add an option --enable-shrink-binary-size to reduce the cross- compiled LLVM binaries size. This patch will pass -fdata-sections and -ffunction-sections to $(CXX) and --gc-sections to the $(LD) when --enable-shrink-binary-size is enabled. This option is disabled by default; otherwise, the LLVM tools might not be able to load plugins (eg. LLVMPolly.so) This is ported from release_33 and release_34 branch, and squashing following patches: [1bb7be30] (release_33) WenHan Gu <Wenhan.gu@mediatek.com> Shrink binary sizes when cross-compiling. [6230037c] (release_33) Ray Donnelly <mingw.android@gmail.com> Fixes for "Shrink binary sizes when cross-compiling." [43153c92] (release_33) Ray Donnelly <mingw.android@gmail.com> Fix config comment about -Wl,--gc-sections. [d44086b8] (release_34) Lai Wei-Chih <Robert.Lai@mediatek.com> Add an option --enable-shrink-binary-size to configure.
Loading
Please sign in to comment