xref: /linux/mm/kmsan/Makefile (revision 3c206509826094e85ead0b056f484db96829248d)
1f80be457SAlexander Potapenko# SPDX-License-Identifier: GPL-2.0
2f80be457SAlexander Potapenko#
3f80be457SAlexander Potapenko# Makefile for KernelMemorySanitizer (KMSAN).
4f80be457SAlexander Potapenko#
5f80be457SAlexander Potapenko#
6*3c206509SAlexander Potapenkoobj-y := core.o instrumentation.o init.o hooks.o report.o shadow.o
7f80be457SAlexander Potapenko
8f80be457SAlexander PotapenkoKMSAN_SANITIZE := n
9f80be457SAlexander PotapenkoKCOV_INSTRUMENT := n
10f80be457SAlexander PotapenkoUBSAN_SANITIZE := n
11f80be457SAlexander Potapenko
12f80be457SAlexander Potapenko# Disable instrumentation of KMSAN runtime with other tools.
13f80be457SAlexander PotapenkoCC_FLAGS_KMSAN_RUNTIME := -fno-stack-protector
14f80be457SAlexander PotapenkoCC_FLAGS_KMSAN_RUNTIME += $(call cc-option,-fno-conserve-stack)
15f80be457SAlexander PotapenkoCC_FLAGS_KMSAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
16f80be457SAlexander Potapenko
17f80be457SAlexander PotapenkoCFLAGS_REMOVE.o = $(CC_FLAGS_FTRACE)
18f80be457SAlexander Potapenko
19f80be457SAlexander PotapenkoCFLAGS_core.o := $(CC_FLAGS_KMSAN_RUNTIME)
20f80be457SAlexander PotapenkoCFLAGS_hooks.o := $(CC_FLAGS_KMSAN_RUNTIME)
21*3c206509SAlexander PotapenkoCFLAGS_init.o := $(CC_FLAGS_KMSAN_RUNTIME)
22f80be457SAlexander PotapenkoCFLAGS_instrumentation.o := $(CC_FLAGS_KMSAN_RUNTIME)
23f80be457SAlexander PotapenkoCFLAGS_report.o := $(CC_FLAGS_KMSAN_RUNTIME)
24f80be457SAlexander PotapenkoCFLAGS_shadow.o := $(CC_FLAGS_KMSAN_RUNTIME)
25