Makefile 559 B

123456789101112131415161718
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined
  3. TEST_GEN_PROGS := openat2_test resolve_test rename_attack_test
  4. # gcc requires -static-libasan in order to ensure that Address Sanitizer's
  5. # library is the first one loaded. However, clang already statically links the
  6. # Address Sanitizer if -fsanitize is specified. Therefore, simply omit
  7. # -static-libasan for clang builds.
  8. ifeq ($(LLVM),)
  9. CFLAGS += -static-libasan
  10. endif
  11. LOCAL_HDRS += helpers.h
  12. include ../lib.mk
  13. $(TEST_GEN_PROGS): helpers.c