If we enable lld, we also enable the CONFIG_LTO_CLANG to avoid the build breakage. We need to do two things 1. To enable CONFIG_LTO_CLANG in defconfig 2. Clean the "-d LTO" and "-d LTO_CLANG" from build configs THINLTO also disabled and we enable it when using *.config.no-cfi to reduce the build time. Bug: 140525226 Change-Id: I7adb9f9e474acddad078447be17777355d884d20 Signed-off-by: Kyle Lin <kylelin@google.com>
20 lines
606 B
Plaintext
20 lines
606 B
Plaintext
DEFCONFIG=gki_defconfig
|
|
POST_DEFCONFIG_CMDS="check_defconfig && update_kasan_config"
|
|
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 ${CC_LD_ARG} O=${OUT_DIR} olddefconfig)
|
|
}
|
|
|