summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-12-02 10:58:40 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-12-06 14:58:38 +0100
commit467fa30f05eeed8a47dd582b3c7751ebaa58bf94 (patch)
treea4fcfd9d0d6418b355433f38e26fc5deced90428 /platform/android
parent9a9e7978db67276cfaab97e00f2b56eeb0222b12 (diff)
downloadqtlocation-mapboxgl-467fa30f05eeed8a47dd582b3c7751ebaa58bf94.tar.gz
[android] use Identical Code Folding to reduce binary size
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/config.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/android/config.cmake b/platform/android/config.cmake
index ff02750450..4901eda5e5 100644
--- a/platform/android/config.cmake
+++ b/platform/android/config.cmake
@@ -173,6 +173,7 @@ macro(mbgl_platform_core)
PUBLIC -latomic
PUBLIC -lz
PUBLIC -Wl,--gc-sections
+ PUBLIC -Wl,--icf=safe
)
endmacro()
@@ -196,6 +197,7 @@ target_compile_options(mapbox-gl
target_link_libraries(mapbox-gl
PUBLIC mbgl-core
PUBLIC -Wl,--gc-sections
+ PUBLIC -Wl,--icf=safe
)
# Create a stripped version of the library and copy it to the JNIDIR.
@@ -282,6 +284,7 @@ target_compile_options(example-custom-layer
target_link_libraries(example-custom-layer
PRIVATE mapbox-gl
PUBLIC -Wl,--gc-sections
+ PUBLIC -Wl,--icf=safe
)
add_custom_command(TARGET example-custom-layer POST_BUILD