# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n

# Function splitter causes unnecessary splits in __asan_load1/__asan_store1
# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533
CC_FLAGS_KASAN_RUNTIME := $(call cc-option, -fno-conserve-stack)
CC_FLAGS_KASAN_RUNTIME += -fno-stack-protector
# Disable branch tracing to avoid recursion.
CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING

CFLAGS_REMOVE_hm_kasan.o = $(CC_FLAGS_FTRACE)
CFLAGS_hm_kasan.o := $(CC_FLAGS_KASAN_RUNTIME) -I$(srctree)/mm
obj-y := hm_kasan.o
subdir-ccflags-y += -g
