Completely revamp the way llvm, clang and lldb are built.

* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
  library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance.  The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
  one target will be fine.  This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
  libraries.
* Adding other components from the LLVM project, such as lld.
This commit is contained in:
Dimitry Andric 2016-08-26 22:44:22 +00:00
parent e9c25f2108
commit 986e05bc2a
489 changed files with 3066 additions and 10570 deletions

View File

@ -1652,13 +1652,12 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptree
# the bootstrap compiler, or as the part of the normal build. # the bootstrap compiler, or as the part of the normal build.
.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no"
_clang_tblgen= \ _clang_tblgen= \
lib/clang/libllvmsupport \ lib/clang/libllvmminimal \
lib/clang/libllvmtablegen \
usr.bin/clang/llvm-tblgen \ usr.bin/clang/llvm-tblgen \
usr.bin/clang/clang-tblgen usr.bin/clang/clang-tblgen
${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport ${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmminimal
${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport ${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmminimal
.endif .endif
# Default to building the GPL DTC, but build the BSDL one if users explicitly # Default to building the GPL DTC, but build the BSDL one if users explicitly

View File

@ -2,192 +2,12 @@
.include <src.opts.mk> .include <src.opts.mk>
.if !make(install) # These have to be built in order.
.if ${MK_CLANG_FULL} != "no" SUBDIR= libllvm
_libclangstaticanalyzer= \ SUBDIR+= libclang
libclangstaticanalyzercheckers \
libclangstaticanalyzercore \
libclangstaticanalyzerfrontend
_libclangarcmigrate= \
libclangarcmigrate
.endif # MK_CLANG_FULL
SUBDIR= libclanganalysis \
${_libclangarcmigrate} \
libclangast \
libclangastmatchers \
libclangbasic \
libclangcodegen \
libclangdriver \
libclangdynamicastmatchers \
libclangedit \
libclangfrontend \
libclangfrontendtool \
libclangindex \
libclanglex \
libclangparse \
libclangrewrite \
libclangrewritefrontend \
libclangsema \
libclangserialization \
${_libclangstaticanalyzer} \
libclangtooling \
\
libllvmanalysis \
libllvmasmparser \
libllvmasmprinter \
libllvmbitreader \
libllvmbitwriter \
libllvmcodegen \
libllvmcore \
libllvmcoverage \
libllvmdebuginfocodeview \
libllvmglobalisel \
libllvminstcombine \
libllvminstrumentation \
libllvmipo \
libllvmirreader \
libllvmlineeditor \
libllvmlinker \
libllvmmc \
libllvmmcdisassembler \
libllvmmcparser \
libllvmobjcarcopts \
libllvmobject \
libllvmobjectyaml \
libllvmoption \
libllvmprofiledata \
libllvmscalaropts \
libllvmselectiondag \
libllvmsupport \
libllvmtablegen \
libllvmtarget \
libllvmtransformutils \
libllvmvectorize \
\
libllvmaarch64asmparser \
libllvmaarch64asmprinter \
libllvmaarch64codegen \
libllvmaarch64desc \
libllvmaarch64disassembler \
libllvmaarch64info \
libllvmaarch64utils \
libllvmarmasmparser \
libllvmarmasmprinter \
libllvmarmcodegen \
libllvmarmdesc \
libllvmarmdisassembler \
libllvmarminfo \
libllvmmipsasmparser \
libllvmmipsasmprinter \
libllvmmipscodegen \
libllvmmipsdesc \
libllvmmipsinfo \
libllvmpowerpcasmparser \
libllvmpowerpcasmprinter \
libllvmpowerpccodegen \
libllvmpowerpcdesc \
libllvmpowerpcdisassembler \
libllvmpowerpcinfo \
libllvmsparcasmparser \
libllvmsparcasmprinter \
libllvmsparccodegen \
libllvmsparcdesc \
libllvmsparcinfo \
libllvmx86asmparser \
libllvmx86asmprinter \
libllvmx86codegen \
libllvmx86desc \
libllvmx86info \
libllvmx86utils
.if ${MK_CLANG_EXTRAS} != "no"
SUBDIR+=libclangformat \
libclangtoolingcore \
libllvmdebuginfodwarf \
libllvmdebuginfopdb \
libllvmlibdriver \
libllvmlto \
libllvmmirparser \
libllvmorcjit \
libllvmpasses \
libllvmsymbolize
.endif # MK_CLANG_EXTRAS
.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no"
SUBDIR+=libllvmexecutionengine \
libllvminterpreter \
libllvmmcjit \
libllvmmipsdisassembler \
libllvmruntimedyld \
libllvmsparcdisassembler \
libllvmx86disassembler
.endif # MK_CLANG_EXTRAS | LLDB
.if ${MK_LLDB} != "no" .if ${MK_LLDB} != "no"
SUBDIR+=liblldb \ SUBDIR+= liblldb
\ .endif
liblldbAPI \ SUBDIR+= headers
liblldbBreakpoint \
liblldbCommands \
liblldbCore \
liblldbDataFormatters \
liblldbExpression \
liblldbHostCommon \
liblldbHostFreeBSD \
liblldbHostPOSIX \
liblldbInitialization \
liblldbInterpreter \
liblldbSymbol \
liblldbTarget \
liblldbUtility \
\
liblldbPluginABISysV_arm \
liblldbPluginABISysV_arm64 \
liblldbPluginABISysV_i386 \
liblldbPluginABISysV_mips \
liblldbPluginABISysV_mips64 \
liblldbPluginABISysV_ppc \
liblldbPluginABISysV_ppc64 \
liblldbPluginABISysV_x86_64 \
liblldbPluginCPlusPlusLanguage \
liblldbPluginCXXItaniumABI \
liblldbPluginDisassemblerLLVM \
liblldbPluginDynamicLoaderStatic \
liblldbPluginDynamicLoaderPosixDYLD \
liblldbPluginExpressionParserClang \
liblldbPluginExpressionParserGo \
liblldbPluginInstructionARM \
liblldbPluginInstructionARM64 \
liblldbPluginInstructionMIPS \
liblldbPluginInstructionMIPS64 \
liblldbPluginInstrumentationRuntimeAddressSanitizer \
liblldbPluginJITLoaderGDB \
liblldbPluginMemoryHistoryASan \
liblldbPluginObjCLanguage \
liblldbPluginObjectContainerBSDArchive \
liblldbPluginObjectFileELF \
liblldbPluginObjectFileJIT \
liblldbPluginPlatformFreeBSD \
liblldbPluginPlatformGDB \
liblldbPluginProcessElfCore \
liblldbPluginProcessFreeBSD \
liblldbPluginProcessGDBRemote \
liblldbPluginProcessPOSIX \
liblldbPluginProcessUtility \
liblldbPluginScriptInterpreterNone \
liblldbPluginSymbolFileDWARF \
liblldbPluginSymbolFilePDB \
liblldbPluginSymbolFileSymtab \
liblldbPluginSymbolVendorELF \
liblldbPluginUnwindAssemblyInstEmulation \
liblldbPluginUnwindAssemblyX86
.endif # MK_LLDB
.endif # !make(install)
SUBDIR+= include
SUBDIR_PARALLEL=
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View File

@ -2,258 +2,23 @@
.include <src.opts.mk> .include <src.opts.mk>
CLANG_SRCS= ${LLVM_SRCS}/tools/clang .ifndef LLVM_SRCS
.error Please define LLVM_SRCS before including this file
.endif
CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ .ifndef CLANG_SRCS
-I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \ .error Please define CLANG_SRCS before including this file
-I${LLVM_SRCS}/../../lib/clang/include \ .endif
-DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG .ifndef SRCDIR
.error Please define SRCDIR before including this file
.endif
CFLAGS+= -I${CLANG_SRCS}/include
.if ${MK_CLANG_FULL} != "no" .if ${MK_CLANG_FULL} != "no"
CFLAGS+= -DCLANG_ENABLE_ARCMT \ CFLAGS+= -DCLANG_ENABLE_ARCMT
-DCLANG_ENABLE_STATIC_ANALYZER CFLAGS+= -DCLANG_ENABLE_STATIC_ANALYZER
.endif # MK_CLANG_FULL
# LLVM is not strict aliasing safe as of 12/31/2011
CFLAGS+= -fno-strict-aliasing
TARGET_ARCH?= ${MACHINE_ARCH}
BUILD_ARCH?= ${MACHINE_ARCH}
# Armv6 uses hard float abi, unless the CPUTYPE has soft in it.
# arm (for armv4 and armv5 CPUs) always uses the soft float ABI.
# For all other targets, we stick with 'unknown'.
.if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
TARGET_ABI= gnueabihf
.elif ${TARGET_ARCH:Marm*}
TARGET_ABI= gnueabi
.else
TARGET_ABI= unknown
.endif .endif
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd12.0 .include "llvm.build.mk"
BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-freebsd12.0
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
-DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \
-DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti
CXXFLAGS.clang+= -stdlib=libc++
.PATH: ${LLVM_SRCS}/${SRCDIR}
LLVM_TBLGEN?= llvm-tblgen
CLANG_TBLGEN?= clang-tblgen
Attributes.inc.h: ${LLVM_SRCS}/include/llvm/IR/Attributes.td
${LLVM_TBLGEN} -gen-attrs \
-I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/include/llvm/IR/Attributes.td
AttributesCompatFunc.inc.h: ${LLVM_SRCS}/lib/IR/AttributesCompatFunc.td
${LLVM_TBLGEN} -gen-attrs \
-I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/lib/IR/AttributesCompatFunc.td
Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td
${LLVM_TBLGEN} -gen-intrinsic \
-I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/include/llvm/IR/Intrinsics.td
.for arch in \
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 \
AsmWriter/-gen-asm-writer \
CallingConv/-gen-callingconv \
CodeEmitter/-gen-emitter \
DAGISel/-gen-dag-isel \
DisassemblerTables/-gen-disassembler \
FastISel/-gen-fast-isel \
InstrInfo/-gen-instr-info \
MCCodeEmitter/-gen-emitter \
MCPseudoLowering/-gen-pseudo-lowering \
RegisterInfo/-gen-register-info \
SubtargetInfo/-gen-subtarget \
SystemOperands/-gen-searchable-tables
${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td
${LLVM_TBLGEN} ${hdr:T:C/,/ /g} \
-I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td
. endfor
.endfor
Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-classes \
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-dump \
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
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
AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-impl \
-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} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \
-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} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-pch-write \
-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} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/Attr.td
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
CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td
${CLANG_TBLGEN} -gen-clang-comment-command-info \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/AST/CommentCommands.td
CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td
${CLANG_TBLGEN} -gen-clang-comment-command-list \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/AST/CommentCommands.td
CommentHTMLNamedCharacterReferences.inc.h: \
${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td
${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td
CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td
${CLANG_TBLGEN} -gen-clang-comment-html-tags \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td
CommentHTMLTagsProperties.inc.h: \
${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td
${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td
CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td
${CLANG_TBLGEN} -gen-clang-comment-nodes \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/CommentNodes.td
DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td
${CLANG_TBLGEN} -gen-clang-decl-nodes \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/DeclNodes.td
StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td
${CLANG_TBLGEN} -gen-clang-stmt-nodes \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/StmtNodes.td
arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td
${CLANG_TBLGEN} -gen-arm-neon \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/arm_neon.td
arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td
${CLANG_TBLGEN} -gen-arm-neon-sema \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/arm_neon.td
DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
${CLANG_TBLGEN} -gen-clang-diag-groups \
-I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \
-o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
${CLANG_TBLGEN} -gen-clang-diags-index-name \
-I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \
-o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
.for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization
Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \
-I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \
-o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
.endfor
# XXX: Atrocious hack, need to clean this up later
.if ${LIB:U} == llvmlibdriver
Options.inc.h: ${LLVM_SRCS}/lib/LibDriver/Options.td
${LLVM_TBLGEN} -gen-opt-parser-defs \
-I ${LLVM_SRCS}/include \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/lib/LibDriver/Options.td
.elif ${LIB:U} == clangdriver || ${LIB:U} == clangfrontend || \
${LIB:U} == clangfrontendtool || ${PROG_CXX:U} == clang
Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td
${LLVM_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/Options.td
.endif
Checkers.inc.h: ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/Checkers.td
${CLANG_TBLGEN} -gen-clang-sa-checkers \
-I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/Checkers.td
.for dep in ${TGHDRS:C/$/.inc.d/}
. if ${MAKE_VERSION} < 20160220
. if !make(depend)
. sinclude "${dep}"
. endif
. else
. dinclude "${dep}"
. endif
.endfor
SRCS+= ${TGHDRS:C/$/.inc.h/}
CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/}

View File

@ -1,13 +0,0 @@
# $FreeBSD$
LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm
.include "clang.build.mk"
INTERNALLIB=
.if ${MACHINE_CPUARCH} == "arm"
STATIC_CXXFLAGS+= -mlong-calls
.endif
.include <bsd.lib.mk>

View File

@ -0,0 +1,91 @@
# $FreeBSD$
.include "../clang.pre.mk"
.PATH: ${CLANG_SRCS}/lib/Headers
INCSDIR= ${LIBDIR}/clang/3.9.0/include
GENINCS+= arm_neon.h
INCS+= __clang_cuda_cmath.h
INCS+= __clang_cuda_intrinsics.h
INCS+= __clang_cuda_math_forward_declares.h
INCS+= __clang_cuda_runtime_wrapper.h
INCS+= __stddef_max_align_t.h
INCS+= __wmmintrin_aes.h
INCS+= __wmmintrin_pclmul.h
INCS+= adxintrin.h
INCS+= altivec.h
INCS+= ammintrin.h
INCS+= arm_acle.h
INCS+= avx2intrin.h
INCS+= avx512bwintrin.h
INCS+= avx512cdintrin.h
INCS+= avx512dqintrin.h
INCS+= avx512erintrin.h
INCS+= avx512fintrin.h
INCS+= avx512ifmaintrin.h
INCS+= avx512ifmavlintrin.h
INCS+= avx512pfintrin.h
INCS+= avx512vbmiintrin.h
INCS+= avx512vbmivlintrin.h
INCS+= avx512vlbwintrin.h
INCS+= avx512vlcdintrin.h
INCS+= avx512vldqintrin.h
INCS+= avx512vlintrin.h
INCS+= avxintrin.h
INCS+= bmi2intrin.h
INCS+= bmiintrin.h
INCS+= clflushoptintrin.h
INCS+= cpuid.h
INCS+= cuda_builtin_vars.h
INCS+= emmintrin.h
INCS+= f16cintrin.h
INCS+= fma4intrin.h
INCS+= fmaintrin.h
INCS+= fxsrintrin.h
INCS+= htmintrin.h
INCS+= htmxlintrin.h
INCS+= ia32intrin.h
INCS+= immintrin.h
INCS+= lzcntintrin.h
INCS+= mm3dnow.h
INCS+= mm_malloc.h
INCS+= mmintrin.h
INCS+= module.modulemap
INCS+= mwaitxintrin.h
INCS+= nmmintrin.h
INCS+= opencl-c.h
INCS+= pkuintrin.h
INCS+= pmmintrin.h
INCS+= popcntintrin.h
INCS+= prfchwintrin.h
INCS+= rdseedintrin.h
INCS+= rtmintrin.h
INCS+= s390intrin.h
INCS+= shaintrin.h
INCS+= smmintrin.h
INCS+= tbmintrin.h
INCS+= tmmintrin.h
INCS+= vadefs.h
INCS+= vecintrin.h
INCS+= wmmintrin.h
INCS+= x86intrin.h
INCS+= xmmintrin.h
INCS+= xopintrin.h
INCS+= xsavecintrin.h
INCS+= xsaveintrin.h
INCS+= xsaveoptintrin.h
INCS+= xsavesintrin.h
INCS+= xtestintrin.h
INCS+= ${GENINCS}
arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td
${CLANG_TBLGEN} -gen-arm-neon \
-d ${.TARGET:C/$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Basic/arm_neon.td
CLEANFILES= ${GENINCS} ${GENINCS:C/$/.d/}
.include <bsd.prog.mk>

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenAsmMatcher.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenAsmWriter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenAsmWriter1.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenCallingConv.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenDAGISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenDisassemblerTables.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenFastISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenInstrInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenMCCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenMCPseudoLowering.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenRegisterInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenSubtargetInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AArch64GenSystemOperands.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenAsmMatcher.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenAsmWriter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenCallingConv.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenDAGISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenDisassemblerTables.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenFastISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenInstrInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenMCCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenMCPseudoLowering.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenRegisterInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "ARMGenSubtargetInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AttributesCompatFunc.inc.h"

View File

@ -1,88 +0,0 @@
# $FreeBSD$
.include <bsd.own.mk>
LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm
.include "../clang.build.mk"
.PATH: ${LLVM_SRCS}/tools/clang/lib/Headers
INCSDIR=${LIBDIR}/clang/3.9.0/include
INCS= __clang_cuda_cmath.h \
__clang_cuda_intrinsics.h \
__clang_cuda_math_forward_declares.h \
__clang_cuda_runtime_wrapper.h \
__stddef_max_align_t.h \
__wmmintrin_aes.h \
__wmmintrin_pclmul.h \
adxintrin.h \
altivec.h \
ammintrin.h \
arm_acle.h \
avx2intrin.h \
avx512bwintrin.h \
avx512cdintrin.h \
avx512dqintrin.h \
avx512erintrin.h \
avx512fintrin.h \
avx512ifmaintrin.h \
avx512ifmavlintrin.h \
avx512pfintrin.h \
avx512vbmiintrin.h \
avx512vbmivlintrin.h \
avx512vlbwintrin.h \
avx512vlcdintrin.h \
avx512vldqintrin.h \
avx512vlintrin.h \
avxintrin.h \
bmi2intrin.h \
bmiintrin.h \
clflushoptintrin.h \
cpuid.h \
cuda_builtin_vars.h \
emmintrin.h \
f16cintrin.h \
fma4intrin.h \
fmaintrin.h \
fxsrintrin.h \
htmintrin.h \
htmxlintrin.h \
ia32intrin.h \
immintrin.h \
lzcntintrin.h \
mm3dnow.h \
mm_malloc.h \
mmintrin.h \
module.modulemap \
mwaitxintrin.h \
nmmintrin.h \
opencl-c.h \
pkuintrin.h \
pmmintrin.h \
popcntintrin.h \
prfchwintrin.h \
rdseedintrin.h \
rtmintrin.h \
s390intrin.h \
shaintrin.h \
smmintrin.h \
tbmintrin.h \
tmmintrin.h \
vadefs.h \
vecintrin.h \
wmmintrin.h \
x86intrin.h \
xmmintrin.h \
xopintrin.h \
xsavecintrin.h \
xsaveintrin.h \
xsaveoptintrin.h \
xsavesintrin.h \
xtestintrin.h \
${GENINCS}
GENINCS= arm_neon.h
CLEANFILES= ${GENINCS} ${GENINCS:C/\.h$/.d/}
.include <bsd.prog.mk>

View File

@ -1,12 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
usr.bin/clang/clang-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenAsmMatcher.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenAsmWriter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenCallingConv.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenDAGISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenDisassemblerTables.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenFastISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenInstrInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenMCCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenMCPseudoLowering.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenRegisterInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "MipsGenSubtargetInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenAsmMatcher.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenAsmWriter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenCallingConv.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenDAGISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenDisassemblerTables.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenFastISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenInstrInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenMCCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenRegisterInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "PPCGenSubtargetInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenAsmMatcher.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenAsmWriter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenCallingConv.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenDAGISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenDisassemblerTables.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenInstrInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenMCCodeEmitter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenRegisterInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "SparcGenSubtargetInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenAsmMatcher.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenAsmWriter.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenAsmWriter1.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenCallingConv.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenDAGISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenDisassemblerTables.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenFastISel.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenInstrInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenRegisterInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "X86GenSubtargetInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AttrDump.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AttrImpl.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AttrVisitor.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "Attrs.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "CommentCommandInfo.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "CommentCommandList.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "CommentHTMLNamedCharacterReferences.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "CommentHTMLTags.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "CommentHTMLTagsProperties.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "CommentNodes.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DeclNodes.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "StmtNodes.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AttrHasAttributeImpl.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "AttrList.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticASTKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticAnalysisKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticCommentKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticCommonKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticDriverKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticFrontendKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticGroups.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticIndexName.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticLexKinds.inc.h"

View File

@ -1,2 +0,0 @@
/* $FreeBSD$ */
#include "DiagnosticParseKinds.inc.h"

Some files were not shown because too many files have changed in this diff Show More