1# $FreeBSD$ 2 3.include <bsd.compiler.mk> 4 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 15 16WARNS?= 0 17 18SSP_CFLAGS= 19CFLAGS+= -DNDEBUG 20CFLAGS+= -DHAVE_RPC_XDR_H=0 21CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 22CFLAGS+= -DUBSAN_CAN_USE_CXXABI 23CFLAGS+= ${PICFLAG} 24CFLAGS+= -fno-builtin 25CFLAGS+= -fno-exceptions 26CXXFLAGS+= -fno-rtti 27.if ${COMPILER_TYPE} == clang 28CFLAGS+= -fno-sanitize=safe-stack 29.endif 30CFLAGS+= -fno-stack-protector 31CFLAGS+= -funwind-tables 32CXXFLAGS+= -fvisibility-inlines-hidden 33CXXFLAGS+= -fvisibility=hidden 34CFLAGS+= -I${CRTSRC}/include 35CFLAGS+= -I${CRTSRC}/lib 36CXXSTD= c++14 37