xref: /linux/tools/testing/selftests/fchmodat2/Makefile (revision 44ed4f90a97ff6f339e50ac01db71544e0990efc)
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