xref: /linux/tools/testing/selftests/fchmodat2/Makefile (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1# SPDX-License-Identifier: GPL-2.0-or-later
2
3CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined $(KHDR_INCLUDES)
4
5# gcc requires -static-libasan in order to ensure that Address Sanitizer's
6# library is the first one loaded. However, clang already statically links the
7# Address Sanitizer if -fsanitize is specified. Therefore, simply omit
8# -static-libasan for clang builds.
9ifeq ($(LLVM),)
10    CFLAGS += -static-libasan
11endif
12
13TEST_GEN_PROGS := fchmodat2_test
14
15include ../lib.mk
16