build.config.gki_kasan was not setting the correct configs to disable LTO for KASAN builds, since the configs differ between when LTO support was first created downstream vs what landed upstream. These builds are large and take a long time to build with LTO added. CONFIG_LTO and CONFIG_LTO_CLANG are not user selectable. Instead, set LTO=none which build.sh will interpret then properly disable CONFIG_LTO_CLANG_FULL, CONFIG_LTO_CLANG_THIN, and enable CONFIG_LTO_NONE. Bug: 225394140 Suggested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Change-Id: I79d1ea94b04d0a55afeb8df2874aeb7099bb030c
23 lines
634 B
Plaintext
23 lines
634 B
Plaintext
DEFCONFIG=gki_defconfig
|
|
POST_DEFCONFIG_CMDS="check_defconfig && update_kasan_config"
|
|
KERNEL_DIR=common
|
|
LTO=none
|
|
|
|
function update_kasan_config() {
|
|
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
|
|
-e CONFIG_KASAN \
|
|
-e CONFIG_KASAN_INLINE \
|
|
-e CONFIG_KCOV \
|
|
-e CONFIG_PANIC_ON_WARN_DEFAULT_ENABLE \
|
|
-d CONFIG_RANDOMIZE_BASE \
|
|
-d CONFIG_KASAN_OUTLINE \
|
|
--set-val CONFIG_FRAME_WARN 0 \
|
|
-d CFI \
|
|
-d CFI_PERMISSIVE \
|
|
-d CFI_CLANG \
|
|
-d SHADOW_CALL_STACK
|
|
(cd ${OUT_DIR} && \
|
|
make ${TOOL_ARGS} O=${OUT_DIR} olddefconfig)
|
|
}
|
|
|