Home | History | Annotate | Line # | Download | only in llvm
      1  1.8  lukem #	$NetBSD: Makefile.inc,v 1.8 2023/06/04 17:48:05 lukem Exp $
      2  1.1  joerg 
      3  1.1  joerg .if !defined(LLVM_TOPLEVEL_MK)
      4  1.1  joerg LLVM_TOPLEVEL_MK=
      5  1.1  joerg 
      6  1.1  joerg .include <bsd.own.mk>
      7  1.1  joerg 
      8  1.5  joerg COMMON_REVISION=	249b40b558955afe5ac2b549edcf2d7f859c8cc9
      9  1.1  joerg CLANG_REVISION=		${COMMON_REVISION}
     10  1.1  joerg LLVM_REVISION=		${COMMON_REVISION}
     11  1.1  joerg 
     12  1.5  joerg LLVM_VERSION=		13.0.0
     13  1.5  joerg CLANG_VERSION=		13.0.0
     14  1.1  joerg 
     15  1.1  joerg CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang
     16  1.1  joerg LLVM_SRCDIR:=	${.PARSEDIR}/dist/llvm
     17  1.1  joerg LLVM_TOPLEVEL:=	${.PARSEDIR}
     18  1.1  joerg CONFIG_DIR:=	${.PARSEDIR}/autoconf
     19  1.1  joerg 
     20  1.1  joerg CPPFLAGS+=	-I. -I${CLANG_SRCDIR}/include -I${LLVM_SRCDIR}/include
     21  1.1  joerg 
     22  1.5  joerg MODULES_CXXFLAGS=	-fmodules -fcxx-modules -Werror=incomplete-umbrella \
     23  1.5  joerg 			-fmodules-validate-system-headers \
     24  1.5  joerg 			-Xclang -fmodules-local-submodule-visibility \
     25  1.5  joerg 			-fmodules-cache-path=${LLVM_MODULE_CACHE:Q}
     26  1.5  joerg 
     27  1.1  joerg .if defined(HOSTLIB) || defined(HOSTPROG) || defined(_BSD_HOSTINIT_MK_)
     28  1.1  joerg LLVM_INCLUDE_CONFIG=	${LLVM_TOOLCONF_OBJDIR}/config/include
     29  1.1  joerg CLANG_INCLUDE_CONFIG=	${LLVM_TOOLCONF_OBJDIR}/config/tools/clang/include
     30  1.1  joerg LLVM_INCLUDE_OBJDIR!=	cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR}
     31  1.1  joerg LLVM_TOOLCONF_OBJDIR!=	cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR}
     32  1.5  joerg LLVM_MODULE_CACHE=	${LLVM_TOOLCONF_OBJDIR}/module.cache
     33  1.1  joerg HOST_CPPFLAGS+=	${CPPFLAGS}
     34  1.4  joerg HOST_CXXFLAGS+=	-O2 -fno-rtti -fno-exceptions -fno-strict-aliasing
     35  1.5  joerg .sinclude "${LLVM_TOOLCONF_OBJDIR}/support-modules"
     36  1.5  joerg .if ${HOST_SUPPORTS_MODULES:Uno} == "yes"
     37  1.5  joerg HOST_CXXFLAGS+=	${MODULES_CXXFLAGS}
     38  1.5  joerg .endif
     39  1.8  lukem HOST_CXXFLAGS+=	-std=c++14
     40  1.1  joerg LLVM_TARGETS=	x86,powerpc,sparc,aarch64,arm,mips
     41  1.1  joerg .else
     42  1.1  joerg LLVM_INCLUDE_CONFIG=	${LLVM_TOPLEVEL}/config
     43  1.1  joerg CLANG_INCLUDE_CONFIG=	${LLVM_TOPLEVEL}/config
     44  1.1  joerg LLVM_INCLUDE_OBJDIR!=	cd ${LLVM_TOPLEVEL}/include && ${PRINTOBJDIR}
     45  1.5  joerg LLVM_MODULE_CACHE=	${LLVM_INCLUDE_OBJDIR}/module.cache
     46  1.1  joerg LLVM_TARGETS=	x86,powerpc,sparc,aarch64,arm,mips,amdgpu
     47  1.5  joerg CXXFLAGS+=		${${ACTIVE_CC} == "clang":? ${MODULES_CXXFLAGS} :}
     48  1.1  joerg 
     49  1.1  joerg CXXFLAGS+=	-std=c++14
     50  1.6  joerg .if ${MKDEBUG:Uno} != "no"
     51  1.6  joerg CXXFLAGS+=	-g1
     52  1.6  joerg .endif
     53  1.3  joerg CXXFLAGS+=	-fno-rtti -fno-exceptions ${${ACTIVE_CC} == "gcc" :? -fno-strict-aliasing :}
     54  1.1  joerg CXXFLAGS+=	-ffunction-sections -fdata-sections
     55  1.1  joerg LDFLAGS+=	-Wl,--gc-sections
     56  1.1  joerg DPADD+=		${LIBEXECINFO}
     57  1.1  joerg LDADD+=		-lexecinfo
     58  1.1  joerg .endif
     59  1.1  joerg CPPFLAGS+=	-I${LLVM_INCLUDE_OBJDIR} -I${LLVM_INCLUDE_CONFIG} \
     60  1.1  joerg 		-I${CLANG_INCLUDE_CONFIG}
     61  1.1  joerg 
     62  1.1  joerg LLVM_PLATFORM=${MACHINE_GNU_ARCH}--netbsd
     63  1.1  joerg 
     64  1.1  joerg LLVM_CONFIGURE_ARGS=	\
     65  1.1  joerg 	--enable-targets=${LLVM_TARGETS} \
     66  1.1  joerg 	--with-c-include-dirs=/usr/include/clang-${CLANG_VERSION:R}:/usr/include \
     67  1.1  joerg 	--disable-timestamps --prefix=/usr --sysconfdir=/etc/llvm \
     68  1.1  joerg 	--with-clang-default-openmp-runtime=libomp \
     69  1.1  joerg 	--with-llvm-srcdir=${LLVM_SRCDIR} \
     70  1.1  joerg 	--with-clang-srcdir=${CLANG_SRCDIR} \
     71  1.1  joerg 	--host=${LLVM_PLATFORM} --disable-compiler-version-checks \
     72  1.1  joerg 	--disable-bindings llvm_cv_gnu_make_command=${MAKE}
     73  1.1  joerg 
     74  1.1  joerg .for tool in circo dot dotty fdp neato twopi xdot
     75  1.1  joerg LLVM_CONFIGURE_ARGS+= ac_cv_path_${tool:tu}="echo ${tool}"
     76  1.1  joerg .endfor
     77  1.1  joerg 
     78  1.1  joerg .endif
     79