1 # SPDX-License-Identifier: GPL-2.0 2 # GCC and Clang accept backend options differe 3 # because Clang accepts "--param" even if it i 4 ifdef CONFIG_CC_IS_CLANG 5 cc-param = -mllvm -$(1) 6 else 7 cc-param = --param $(1) 8 endif 9 10 # Keep most options here optional, to allow en 11 # of some options does not break KCSAN nor cau 12 kcsan-cflags := -fsanitize=thread -fno-optimiz 13 $(call cc-option,$(call cc-param,tsan- 14 $(call cc-param,tsan-distinguish-volat 15 16 ifdef CONFIG_CC_IS_GCC 17 # GCC started warning about operations unsuppo 18 # KCSAN != TSan, so just ignore these warnings 19 kcsan-cflags += -Wno-tsan 20 endif 21 22 ifndef CONFIG_KCSAN_WEAK_MEMORY 23 kcsan-cflags += $(call cc-option,$(call cc-par 24 endif 25 26 export CFLAGS_KCSAN := $(kcsan-cflags)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.