1 2.include <bsd.compiler.mk> 3 4PACKAGE= clang 5CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt 6.include "compiler-rt-vars.mk" 7 8.PATH: ${CRTSRC}/lib 9 10LIBDIR= ${SANITIZER_LIBDIR} 11SHLIBDIR= ${LIBDIR} 12 13NO_PIC= 14MK_PROFILE= no 15MK_ASAN:= no 16MK_SSP= no 17MK_UBSAN:= no 18 19WARNS?= 0 20 21CFLAGS+= -DNDEBUG 22CFLAGS+= -DHAVE_RPC_XDR_H=0 23CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 24CFLAGS+= -DUBSAN_CAN_USE_CXXABI 25CFLAGS+= ${PICFLAG} 26CFLAGS+= -fno-builtin 27CFLAGS+= -fno-exceptions 28CXXFLAGS+= -fno-rtti 29.if ${COMPILER_TYPE} == clang 30CFLAGS+= -fno-sanitize=safe-stack 31.endif 32CFLAGS+= -fno-stack-protector 33CFLAGS+= -funwind-tables 34CXXFLAGS+= -fvisibility-inlines-hidden 35CXXFLAGS+= -fvisibility=hidden 36CFLAGS+= -I${CRTSRC}/include 37CFLAGS+= -I${CRTSRC}/lib 38CXXSTD= c++14 39