Commit ad3ce39f authored by Logan Chien's avatar Logan Chien Committed by Andrew Hsieh
Browse files

[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.
parent 1699c89a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment