diff options
Diffstat (limited to 'lib/clang/clang.build.mk')
-rw-r--r-- | lib/clang/clang.build.mk | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 0f68178..c4ce724 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -12,7 +12,6 @@ CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ .if ${MK_CLANG_FULL} != "no" CFLAGS+= -DCLANG_ENABLE_ARCMT \ - -DCLANG_ENABLE_REWRITER \ -DCLANG_ENABLE_STATIC_ANALYZER .endif # MK_CLANG_FULL @@ -30,22 +29,29 @@ TARGET_ABI= gnueabi TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-unknown-freebsd11.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" -CXXFLAGS+= -fno-exceptions -fno-rtti +CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti +CXXFLAGS.clang+= -stdlib=libc++ .PATH: ${LLVM_SRCS}/${SRCDIR} -.if ${MACHINE} == "host" && defined(EARLY_BUILD) +#.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" -TOOLSDIR?= ${STAGE_HOST_OBJTOP} +.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) @@ -54,13 +60,14 @@ 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 \ -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ - ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 + AArch64/AArch64 ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 . for hdr in \ AsmMatcher/-gen-asm-matcher \ AsmWriter1/-gen-asm-writer,-asmwriternum=1 \ @@ -71,7 +78,7 @@ Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td DisassemblerTables/-gen-disassembler \ FastISel/-gen-fast-isel \ InstrInfo/-gen-instr-info \ - MCCodeEmitter/-gen-emitter,-mc-emitter \ + MCCodeEmitter/-gen-emitter \ MCPseudoLowering/-gen-pseudo-lowering \ RegisterInfo/-gen-register-info \ SubtargetInfo/-gen-subtarget @@ -93,8 +100,8 @@ AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td -AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ +AttrHasAttributeImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-has-attribute-impl \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td @@ -103,11 +110,6 @@ AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td -AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ - -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${CLANG_SRCS}/include/clang/Basic/Attr.td - AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-list \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ @@ -128,6 +130,11 @@ AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td +AttrParserStringSwitches.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-parser-string-switches \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td + AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ @@ -138,11 +145,6 @@ AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td -AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ - -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${CLANG_SRCS}/include/clang/Basic/Attr.td - AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ @@ -153,8 +155,8 @@ AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td -AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ +AttrVisitor.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-ast-visitor \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Basic/Attr.td @@ -233,12 +235,6 @@ Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/include/clang/Driver/Options.td -CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td - ${TBLGEN} -gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ - ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td - Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td ${CLANG_TBLGEN} -gen-clang-sa-checkers \ -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ |