From 67c0c971e092912c2016fe83b9b5f0f23f51e527 Mon Sep 17 00:00:00 2001 From: GUO Zihua Date: Thu, 8 Sep 2022 10:25:50 +0800 Subject: [PATCH] lto: Optimize build performance for CI ohos inclusion category: feature feature: Build Optimization issue: I5Q9JV CVE: NA Signed-off-by: GUO Zihua -------------------------------- Optimize build performance while duing CI build by disabling LTO optimization. Signed-off-by: GUO Zihua Change-Id: I1b0e7287851931e819dc852e3e3494cedae177cc --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 35ca90776a9f..679a1b1ceb61 100644 --- a/Makefile +++ b/Makefile @@ -902,6 +902,9 @@ ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG_THIN CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod-prefix).thinlto-cache +ifeq ($(KERNEL_LTO_USE_O0),y) +KBUILD_LDFLAGS += --lto-O0 +endif else CC_FLAGS_LTO := -flto endif -- Gitee