diff options
Diffstat (limited to 'lib/clang/clang.build.mk')
-rw-r--r-- | lib/clang/clang.build.mk | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index a3fae12..c4ce724 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -39,8 +39,28 @@ CXXFLAGS.clang+= -stdlib=libc++ .PATH: ${LLVM_SRCS}/${SRCDIR} +#.info ${MACHINE BOOTSTRAPPING_TOOLS LEGACY_TOOLS:L:@v@$v=${$v}@} +.if empty(TOOLSDIR) || !exists(${TOOLSDIR}/usr/bin/clang-tblgen) +.if ${MACHINE} == "host" && defined(BOOTSTRAPPING_TOOLS) +.if !empty(LEGACY_TOOLS) && exists(${LEGACY_TOOLS}/usr/bin/tblgen) +TOOLSDIR= ${LEGACY_TOOLS} +.endif +.endif +.if ${MK_STAGING} == "yes" && exists(${STAGE_HOST_OBJTOP:Uno}/usr/bin/tblgen) +TOOLSDIR= ${STAGE_HOST_OBJTOP} +.endif +.if exists(${LEGACY_TOOLS:Uno}/usr/bin/tblgen) +TOOLSDIR= ${LEGACY_TOOLS} +.endif +.endif +TOOLSDIR?= +.if !empty(TOOLSDIR) && exists(${TOOLSDIR}/usr/bin/clang-tblgen) +TBLGEN= ${TOOLSDIR}/usr/bin/tblgen +CLANG_TBLGEN= ${TOOLSDIR}/usr/bin/clang-tblgen +.endif TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen +#.info ${TOOLSDIR TBLGEN CLANG_TBLGEN:L:@v@$v=${$v}@} Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td ${TBLGEN} -gen-intrinsic \ @@ -227,3 +247,7 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td SRCS+= ${TGHDRS:C/$/.inc.h/} DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} + +# if we are not doing explicit 'make depend', there is +# nothing to cause these to be generated. +beforebuild: ${SRCS:M*.inc.h} |