Skip to content

Commit

Permalink
ANDROID: Add a build config fragment for KHWASan.
Browse files Browse the repository at this point in the history
Bug: 182998770
Bug: 171327997
Bug: 170327170
Change-Id: I20db6a698b4d995f94bd592023a2a0b08b1f9548
Signed-off-by: Peter Collingbourne <[email protected]>
  • Loading branch information
pcc authored and metti committed Apr 6, 2021
1 parent 60aabb9 commit 70cf198
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.config.khwasan
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
append_cmd POST_DEFCONFIG_CMDS update_khwasan_config

function update_khwasan_config() {
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
-e CONFIG_KASAN \
-d CONFIG_KASAN_HW_TAGS \
-e CONFIG_KASAN_SW_TAGS \
-e CONFIG_KASAN_OUTLINE \
-e CONFIG_KASAN_PANIC_ON_WARN \
-e CONFIG_KCOV \
-e CONFIG_PANIC_ON_WARN_DEFAULT_ENABLE \
-d CONFIG_RANDOMIZE_BASE \
--set-val CONFIG_FRAME_WARN 0 \
-d SHADOW_CALL_STACK
(cd ${OUT_DIR} && \
make O=${OUT_DIR} "${TOOL_ARGS[@]}" ${MAKE_ARGS} olddefconfig)
}

0 comments on commit 70cf198

Please sign in to comment.