From bfdb0a1d758644d02d85fa6cd5c76e416c3ba9c2 Mon Sep 17 00:00:00 2001 From: yangguangzhao Date: Tue, 26 Sep 2023 14:07:46 +0800 Subject: [PATCH] add compile nolto args Signed-off-by: yangguangzhao --- ohos_build/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ohos_build/build.sh b/ohos_build/build.sh index 3aa632144d..fd26f1d6c4 100755 --- a/ohos_build/build.sh +++ b/ohos_build/build.sh @@ -69,6 +69,7 @@ artifact_mode=0 with_nweb_ex=0 build_sysroot="use_ohos_sdk_sysroot=false" build_asan=0 +use_thin_lto=0 usage() { echo -ne "USAGE: $0 [OPTIONS] [PRODUCT] @@ -143,6 +144,9 @@ while [ "$1" != "" ]; do "-asan") build_asan=1 ;; + "-nolto") + use_thin_lto=1 + ;; "-ex") with_nweb_ex=1 ;; @@ -221,6 +225,10 @@ else GN_ARGS="${GN_ARGS} is_asan=false" fi +if [ ${use_thin_lto} -eq 1 ]; then + GN_ARGS="${GN_ARGS} use_thin_lto=false" +fi + # Extract ohos-sdk. if [ -f "src/ohos_sdk/.install" ]; then bash "src/ohos_sdk/.install" -- Gitee