1 # SPDX-License-Identifier: GPL-2.0-or-later 1 # SPDX-License-Identifier: GPL-2.0-or-later 2 2 3 CFLAGS += -Wall -O2 -g -fsanitize=address -fsa 3 CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined 4 TEST_GEN_PROGS := openat2_test resolve_test re 4 TEST_GEN_PROGS := openat2_test resolve_test rename_attack_test 5 5 6 # gcc requires -static-libasan in order to ens 6 # gcc requires -static-libasan in order to ensure that Address Sanitizer's 7 # library is the first one loaded. However, cl 7 # library is the first one loaded. However, clang already statically links the 8 # Address Sanitizer if -fsanitize is specified 8 # Address Sanitizer if -fsanitize is specified. Therefore, simply omit 9 # -static-libasan for clang builds. 9 # -static-libasan for clang builds. 10 ifeq ($(LLVM),) 10 ifeq ($(LLVM),) 11 CFLAGS += -static-libasan 11 CFLAGS += -static-libasan 12 endif 12 endif 13 13 14 LOCAL_HDRS += helpers.h 14 LOCAL_HDRS += helpers.h 15 15 16 include ../lib.mk 16 include ../lib.mk 17 17 18 $(TEST_GEN_PROGS): helpers.c 18 $(TEST_GEN_PROGS): helpers.c
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.