mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-27 22:45:57 +00:00
Enable LTO for Android build (#21243)
### Description Enable LTO for Android build, which can reduce binary size by 6%.
This commit is contained in:
parent
28af544278
commit
fe6ef404b5
5 changed files with 9 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
"android_min_sdk_version": 21,
|
||||
"android_target_sdk_version": 24,
|
||||
"build_params": [
|
||||
"--enable_lto",
|
||||
"--android",
|
||||
"--parallel",
|
||||
"--cmake_generator=Ninja",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"android_min_sdk_version": 21,
|
||||
"android_target_sdk_version": 24,
|
||||
"build_params": [
|
||||
"--enable_lto",
|
||||
"--android",
|
||||
"--parallel",
|
||||
"--cmake_generator=Ninja",
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ stages:
|
|||
|
||||
- script: |
|
||||
python3 tools/ci_build/build.py \
|
||||
--enable_lto \
|
||||
--android \
|
||||
--build_dir build \
|
||||
--android_sdk_path $ANDROID_HOME \
|
||||
|
|
@ -169,6 +170,7 @@ stages:
|
|||
|
||||
- script: |
|
||||
python3 tools/ci_build/build.py \
|
||||
--enable_lto \
|
||||
--android \
|
||||
--build_dir build_nnapi \
|
||||
--android_sdk_path $ANDROID_HOME \
|
||||
|
|
@ -264,6 +266,7 @@ stages:
|
|||
|
||||
- script: |
|
||||
python3 tools/ci_build/build.py \
|
||||
--enable_lto \
|
||||
--android \
|
||||
--build_dir build \
|
||||
--android_sdk_path $ANDROID_HOME \
|
||||
|
|
@ -329,6 +332,7 @@ stages:
|
|||
|
||||
- script: |
|
||||
python3 tools/ci_build/build.py \
|
||||
--enable_lto \
|
||||
--android \
|
||||
--build_dir build_nnapi \
|
||||
--android_sdk_path $ANDROID_HOME \
|
||||
|
|
@ -401,6 +405,7 @@ stages:
|
|||
|
||||
- script: |
|
||||
python3 tools/ci_build/build.py \
|
||||
--enable_lto \
|
||||
--android \
|
||||
--build_dir build_nnapi \
|
||||
--android_sdk_path $ANDROID_HOME \
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"os": "android",
|
||||
"arch": "arm64-v8a",
|
||||
"build_params": [
|
||||
"--enable_lto",
|
||||
"--android",
|
||||
"--android_sdk_path=/android_home",
|
||||
"--android_ndk_path=/ndk_home",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"os": "android",
|
||||
"arch": "arm64-v8a",
|
||||
"build_params": [
|
||||
"--enable_lto",
|
||||
"--android",
|
||||
"--android_sdk_path=/android_home",
|
||||
"--android_ndk_path=/ndk_home",
|
||||
|
|
|
|||
Loading…
Reference in a new issue