Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add LLVM and clang build system. It is enabled by MKLLVM=yes.
details: https://anonhg.NetBSD.org/src/rev/6a52dabc2e5c
branches: trunk
changeset: 761715:6a52dabc2e5c
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Feb 06 01:13:42 2011 +0000
description:
Add LLVM and clang build system. It is enabled by MKLLVM=yes.
Upstream sources can be fetched by running "make checkout" in
src/external/bsd/llvm, they will be properly imported once the
integration and missing features are sorted out.
diffstat:
distrib/sets/lists/comp/mi | 5 +-
distrib/sets/sets.subr | 5 +-
external/bsd/Makefile | 5 +-
external/bsd/llvm/Makefile | 15 +
external/bsd/llvm/Makefile.inc | 30 +
external/bsd/llvm/bin/Makefile | 29 +
external/bsd/llvm/bin/Makefile.inc | 5 +
external/bsd/llvm/bin/bugpoint/Makefile | 38 +
external/bsd/llvm/bin/clang/Makefile | 62 +
external/bsd/llvm/bin/llc/Makefile | 33 +
external/bsd/llvm/bin/lli/Makefile | 33 +
external/bsd/llvm/bin/llvm-ar/Makefile | 20 +
external/bsd/llvm/bin/llvm-as/Makefile | 20 +
external/bsd/llvm/bin/llvm-bcanalyzer/Makefile | 17 +
external/bsd/llvm/bin/llvm-diff/Makefile | 21 +
external/bsd/llvm/bin/llvm-dis/Makefile | 19 +
external/bsd/llvm/bin/llvm-extract/Makefile | 26 +
external/bsd/llvm/bin/llvm-ld/Makefile | 31 +
external/bsd/llvm/bin/llvm-link/Makefile | 23 +
external/bsd/llvm/bin/llvm-mc/Makefile | 34 +
external/bsd/llvm/bin/llvm-nm/Makefile | 21 +
external/bsd/llvm/bin/llvm-prof/Makefile | 20 +
external/bsd/llvm/bin/llvm-ranlib/Makefile | 20 +
external/bsd/llvm/bin/llvm-stub/Makefile | 12 +
external/bsd/llvm/bin/llvmc/Makefile | 35 +
external/bsd/llvm/bin/macho-dumpx/Makefile | 19 +
external/bsd/llvm/bin/opt/Makefile | 32 +
external/bsd/llvm/bin/tblgen/Makefile | 52 +
external/bsd/llvm/config/clang/Basic/Version.inc | 6 +
external/bsd/llvm/config/llvm/Config/AsmParsers.def | 29 +
external/bsd/llvm/config/llvm/Config/AsmPrinters.def | 29 +
external/bsd/llvm/config/llvm/Config/Disassemblers.def | 29 +
external/bsd/llvm/config/llvm/Config/Targets.def | 28 +
external/bsd/llvm/config/llvm/Config/config.h | 633 ++++++++++
external/bsd/llvm/config/llvm/Config/llvm-config.h | 98 +
external/bsd/llvm/config/llvm/Support/DataTypes.h | 112 +
external/bsd/llvm/include/Makefile | 90 +
external/bsd/llvm/lib/Makefile | 66 +
external/bsd/llvm/lib/Makefile.inc | 5 +
external/bsd/llvm/lib/libLLVMAnalysis/Makefile | 70 +
external/bsd/llvm/lib/libLLVMArchive/Makefile | 13 +
external/bsd/llvm/lib/libLLVMAsmParser/Makefile | 17 +
external/bsd/llvm/lib/libLLVMAsmPrinter/Makefile | 23 +
external/bsd/llvm/lib/libLLVMBitReader/Makefile | 16 +
external/bsd/llvm/lib/libLLVMBitWriter/Makefile | 18 +
external/bsd/llvm/lib/libLLVMCBackend/Makefile | 11 +
external/bsd/llvm/lib/libLLVMCBackendInfo/Makefile | 13 +
external/bsd/llvm/lib/libLLVMCodeGen/Makefile | 108 +
external/bsd/llvm/lib/libLLVMCompilerDriver/Makefile | 15 +
external/bsd/llvm/lib/libLLVMCore/Makefile | 48 +
external/bsd/llvm/lib/libLLVMCppBackend/Makefile | 11 +
external/bsd/llvm/lib/libLLVMCppBackendInfo/Makefile | 13 +
external/bsd/llvm/lib/libLLVMExecutionEngine/Makefile | 12 +
external/bsd/llvm/lib/libLLVMHello/Makefile | 11 +
external/bsd/llvm/lib/libLLVMInstCombine/Makefile | 27 +
external/bsd/llvm/lib/libLLVMInstrumentation/Makefile | 15 +
external/bsd/llvm/lib/libLLVMInterpreter/Makefile | 13 +
external/bsd/llvm/lib/libLLVMJIT/Makefile | 20 +
external/bsd/llvm/lib/libLLVMLinker/Makefile | 14 +
external/bsd/llvm/lib/libLLVMMC/Makefile | 48 +
external/bsd/llvm/lib/libLLVMMCDisassembler/Makefile | 18 +
external/bsd/llvm/lib/libLLVMMCJIT/Makefile | 12 +
external/bsd/llvm/lib/libLLVMMCParser/Makefile | 23 +
external/bsd/llvm/lib/libLLVMObject/Makefile | 15 +
external/bsd/llvm/lib/libLLVMScalarOpts/Makefile | 47 +
external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile | 35 +
external/bsd/llvm/lib/libLLVMSupport/Makefile | 100 +
external/bsd/llvm/lib/libLLVMTarget/Makefile | 28 +
external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile | 40 +
external/bsd/llvm/lib/libLLVMX86AsmParser/Makefile | 19 +
external/bsd/llvm/lib/libLLVMX86AsmPrinter/Makefile | 21 +
external/bsd/llvm/lib/libLLVMX86CodeGen/Makefile | 56 +
external/bsd/llvm/lib/libLLVMX86Disassembler/Makefile | 19 +
external/bsd/llvm/lib/libLLVMX86TargetInfo/Makefile | 18 +
external/bsd/llvm/lib/libLLVMipa/Makefile | 19 +
external/bsd/llvm/lib/libLLVMipo/Makefile | 36 +
external/bsd/llvm/lib/libclangAST/Makefile | 56 +
external/bsd/llvm/lib/libclangAnalysis/Makefile | 26 +
external/bsd/llvm/lib/libclangBasic/Makefile | 29 +
external/bsd/llvm/lib/libclangCodeGen/Makefile | 50 +
external/bsd/llvm/lib/libclangDriver/Makefile | 32 +
external/bsd/llvm/lib/libclangFrontend/Makefile | 40 +
external/bsd/llvm/lib/libclangFrontendTool/Makefile | 15 +
external/bsd/llvm/lib/libclangIndex/Makefile | 25 +
external/bsd/llvm/lib/libclangLex/Makefile | 33 +
external/bsd/llvm/lib/libclangParse/Makefile | 27 +
external/bsd/llvm/lib/libclangRewrite/Makefile | 25 +
external/bsd/llvm/lib/libclangSema/Makefile | 47 +
external/bsd/llvm/lib/libclangSerialization/Makefile | 22 +
external/bsd/llvm/lib/libclangStaticAnalyzer/Makefile | 47 +
external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile | 63 +
external/bsd/llvm/link.mk | 28 +
external/bsd/llvm/tablegen.mk | 15 +
share/mk/bsd.own.mk | 6 +-
tools/Makefile | 12 +-
tools/llvm-clang/Makefile | 20 +
tools/llvm-include/Makefile | 6 +
tools/llvm-lib/Makefile | 9 +
tools/llvm-lib/Makefile.inc | 10 +
tools/llvm-lib/libLLVMAnalysis/Makefile | 3 +
tools/llvm-lib/libLLVMAsmParser/Makefile | 3 +
tools/llvm-lib/libLLVMAsmPrinter/Makefile | 3 +
tools/llvm-lib/libLLVMBitReader/Makefile | 3 +
tools/llvm-lib/libLLVMBitWriter/Makefile | 3 +
tools/llvm-lib/libLLVMCodeGen/Makefile | 3 +
tools/llvm-lib/libLLVMCore/Makefile | 3 +
tools/llvm-lib/libLLVMInstCombine/Makefile | 3 +
tools/llvm-lib/libLLVMMC/Makefile | 3 +
tools/llvm-lib/libLLVMMCDisassembler/Makefile | 3 +
tools/llvm-lib/libLLVMMCParser/Makefile | 3 +
tools/llvm-lib/libLLVMScalarOpts/Makefile | 3 +
tools/llvm-lib/libLLVMSelectionDAG/Makefile | 3 +
tools/llvm-lib/libLLVMSupport/Makefile | 3 +
tools/llvm-lib/libLLVMTarget/Makefile | 3 +
tools/llvm-lib/libLLVMTransformsUtils/Makefile | 3 +
tools/llvm-lib/libLLVMX86AsmParser/Makefile | 3 +
tools/llvm-lib/libLLVMX86AsmPrinter/Makefile | 3 +
tools/llvm-lib/libLLVMX86CodeGen/Makefile | 3 +
tools/llvm-lib/libLLVMX86Disassembler/Makefile | 3 +
tools/llvm-lib/libLLVMX86TargetInfo/Makefile | 3 +
tools/llvm-lib/libLLVMipa/Makefile | 3 +
tools/llvm-lib/libLLVMipo/Makefile | 3 +
tools/llvm-lib/libclangAST/Makefile | 3 +
tools/llvm-lib/libclangAnalysis/Makefile | 3 +
tools/llvm-lib/libclangBasic/Makefile | 3 +
tools/llvm-lib/libclangCodeGen/Makefile | 3 +
tools/llvm-lib/libclangDriver/Makefile | 3 +
tools/llvm-lib/libclangFrontend/Makefile | 3 +
tools/llvm-lib/libclangFrontendTool/Makefile | 3 +
tools/llvm-lib/libclangIndex/Makefile | 3 +
tools/llvm-lib/libclangLex/Makefile | 3 +
tools/llvm-lib/libclangParse/Makefile | 3 +
tools/llvm-lib/libclangRewrite/Makefile | 3 +
tools/llvm-lib/libclangSema/Makefile | 3 +
tools/llvm-lib/libclangSerialization/Makefile | 3 +
tools/llvm-lib/libclangStaticAnalyzer/Makefile | 3 +
tools/llvm-lib/libclangStaticAnalyzerCheckers/Makefile | 3 +
tools/llvm-tblgen/Makefile | 7 +
tools/llvm/Makefile | 43 +
tools/llvm/Makefile.inc | 3 +
140 files changed, 3652 insertions(+), 7 deletions(-)
diffs (truncated from 4297 to 300 lines):
diff -r 7c37092ae8b2 -r 6a52dabc2e5c distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Sun Feb 06 01:08:37 2011 +0000
+++ b/distrib/sets/lists/comp/mi Sun Feb 06 01:13:42 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1582 2011/02/06 00:44:09 christos Exp $
+# $NetBSD: mi,v 1.1583 2011/02/06 01:13:42 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -13,6 +13,8 @@
./usr/bin/c89 comp-c-bin
./usr/bin/c99 comp-c-bin
./usr/bin/cc comp-c-bin gcccmds
+./usr/bin/clang comp-c-bin llvm
+./usr/bin/clang++ comp-c-bin llvm
./usr/bin/config comp-util-bin
./usr/bin/crunchgen comp-c-bin
./usr/bin/crunchide comp-c-bin
@@ -46,6 +48,7 @@
./usr/bin/lint comp-c-bin
./usr/bin/lorder comp-util-bin
./usr/bin/luac comp-util-bin
+./usr/bin/llvm-tblgen comp-c-bin llvm
./usr/bin/menuc comp-c-bin
./usr/bin/mkstr comp-c-bin
./usr/bin/mkubootimage comp-util-bin
diff -r 7c37092ae8b2 -r 6a52dabc2e5c distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Sun Feb 06 01:08:37 2011 +0000
+++ b/distrib/sets/sets.subr Sun Feb 06 01:13:42 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.127 2011/01/28 20:36:19 matt Exp $
+# $NetBSD: sets.subr,v 1.128 2011/02/06 01:13:42 joerg Exp $
#
#
@@ -172,7 +172,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.127 2011/01/28 20:36:19 matt Exp $
+# # $NetBSD: sets.subr,v 1.128 2011/02/06 01:13:42 joerg Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -221,6 +221,7 @@
# kmod ${MKKMOD} != no
# ldap ${MKLDAP} != no
# lint ${MKLINT} != no
+# llvm ${MKLLVM} != no
# lvm ${MKLVM} != no
# man ${MKMAN} != no
# manpages ${MKMANPAGES} != no
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/Makefile
--- a/external/bsd/Makefile Sun Feb 06 01:08:37 2011 +0000
+++ b/external/bsd/Makefile Sun Feb 06 01:13:42 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2010/12/05 05:59:59 christos Exp $
+# $NetBSD: Makefile,v 1.27 2011/02/06 01:13:43 joerg Exp $
.include <bsd.own.mk>
@@ -14,6 +14,9 @@
.if (${MKLDAP} != "no")
SUBDIR+= openldap
.endif
+.if (${MKLLVM} != "no")
+SUBDIR+= llvm
+.endif
.if (${MKCRYPTO} != "no")
SUBDIR+= pkg_install ../../crypto/external/bsd
.endif
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/Makefile Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:43 joerg Exp $
+
+SUBDIR= include \
+ .WAIT \
+ lib \
+ .WAIT \
+ bin
+
+.include "Makefile.inc"
+
+checkout:
+ svn co -r ${LLVM_REVISION} http://llvm.org/svn/llvm-project/llvm/trunk ${LLVM_SRCDIR}
+ svn co -r ${CLANG_REVISION} http://llvm.org/svn/llvm-project/cfe/trunk ${CLANG_SRCDIR}
+
+.include <bsd.subdir.mk>
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/Makefile.inc Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile.inc,v 1.1 2011/02/06 01:13:43 joerg Exp $
+
+.if !defined(LLVM_TOPLEVEL_MK)
+LLVM_TOPLEVEL_MK=
+
+.include <bsd.own.mk>
+
+LLVM_REVISION= 124738
+CLANG_REVISION= 124738
+
+LLVM_SRCDIR:= ${.PARSEDIR}/dist/llvm
+CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang
+LLVM_TOPLEVEL:= ${.PARSEDIR}
+
+CPPFLAGS+= -I. -I${LLVM_SRCDIR}/include -I${CLANG_SRCDIR}/include \
+ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
+
+.if defined(HOSTLIB) || defined(HOSTPROG)
+LLVM_INCLUDE_CONFIG= ${LLVM_TOOLCONF_OBJDIR}/config/include
+LLVM_INCLUDE_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR}
+LLVM_TOOLCONF_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR}
+HOST_CPPFLAGS+= ${CPPFLAGS}
+HOST_CXXFLAGS+= -O2 -g
+.else
+LLVM_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config
+LLVM_INCLUDE_OBJDIR!= cd ${LLVM_TOPLEVEL}/include && ${PRINTOBJDIR}
+.endif
+CPPFLAGS+= -I${LLVM_INCLUDE_OBJDIR} -I${LLVM_INCLUDE_CONFIG}
+
+.endif
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/bin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/Makefile Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:43 joerg Exp $
+
+SUBDIR= clang \
+ tblgen
+
+.if defined(LLVM_DEVELOPER)
+SUBDIR+= \
+ bugpoint \
+ llc \
+ lli \
+ llvm-ar \
+ llvm-as \
+ llvm-bcanalyzer \
+ llvm-diff \
+ llvm-dis \
+ llvm-extract \
+ llvm-ld \
+ llvm-link \
+ llvm-mc \
+ llvm-nm \
+ llvm-prof \
+ llvm-ranlib \
+ llvm-stub \
+ llvmc \
+ macho-dumpx \
+ opt
+.endif
+
+.include <bsd.subdir.mk>
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/bin/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/Makefile.inc Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile.inc,v 1.1 2011/02/06 01:13:43 joerg Exp $
+
+BINDIR= /usr/bin
+
+.include "${.PARSEDIR}/../Makefile.inc"
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/bin/bugpoint/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/bugpoint/Makefile Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:44 joerg Exp $
+
+PROG_CXX= bugpoint
+NOMAN= yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/tools/bugpoint
+
+SRCS= BugDriver.cpp \
+ CrashDebugger.cpp \
+ ExecutionDriver.cpp \
+ ExtractFunction.cpp \
+ FindBugs.cpp \
+ Miscompilation.cpp \
+ OptimizerDriver.cpp \
+ ToolRunner.cpp \
+ bugpoint.cpp
+
+LLVM_LIBS+= \
+ AsmParser \
+ BitReader \
+ BitWriter \
+ InstCombine \
+ Instrumentation \
+ Linker \
+ ScalarOpts \
+ Analysis \
+ Target \
+ ipo \
+ TransformsUtils \
+ ipa \
+ Core \
+ Support
+
+.include "${.PARSEDIR}/../../link.mk"
+
+.include <bsd.prog.mk>
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/bin/clang/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/clang/Makefile Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:44 joerg Exp $
+
+PROG_CXX= clang
+NOMAN= yes
+
+.if !defined(HOSTPROG)
+SYMLINKS+= clang ${BINDIR}/clang++
+.endif
+
+.include <bsd.init.mk>
+
+.PATH: ${CLANG_SRCDIR}/tools/driver
+
+SRCS= driver.cpp \
+ cc1_main.cpp \
+ cc1as_main.cpp
+
+CLANG_LIBS+= \
+ clangFrontendTool \
+ clangFrontend \
+ clangStaticAnalyzerCheckers \
+ clangStaticAnalyzer \
+ clangDriver \
+ clangSerialization \
+ clangCodeGen \
+ clangParse \
+ clangSema \
+ clangAnalysis \
+ clangIndex \
+ clangRewrite \
+ clangAST \
+ clangLex \
+ clangBasic
+
+LLVM_LIBS+= \
+ AsmParser \
+ BitReader \
+ BitWriter \
+ X86CodeGen \
+ X86TargetInfo \
+ X86AsmParser \
+ X86Disassembler \
+ X86AsmPrinter \
+ SelectionDAG \
+ AsmPrinter \
+ CodeGen \
+ Target \
+ InstCombine \
+ ScalarOpts \
+ Analysis \
+ MCDisassembler \
+ MCParser \
+ MC \
+ ipo \
+ TransformsUtils \
+ ipa \
+ Core \
+ Support
+
+.include "${.PARSEDIR}/../../link.mk"
+
+.include <bsd.prog.mk>
diff -r 7c37092ae8b2 -r 6a52dabc2e5c external/bsd/llvm/bin/llc/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/bin/llc/Makefile Sun Feb 06 01:13:42 2011 +0000
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:44 joerg Exp $
+
+PROG_CXX= llc
+NOMAN= yes
+
+.include <bsd.init.mk>
+
+.PATH: ${LLVM_SRCDIR}/tools/llc
+
+SRCS= llc.cpp
+
+LLVM_LIBS+= \
+ AsmPrinter \
+ AsmParser \
+ BitReader \
+ X86CodeGen \
+ X86TargetInfo \
+ X86AsmParser \
+ X86AsmPrinter \
+ SelectionDAG \
+ CodeGen \
+ Target \
Home |
Main Index |
Thread Index |
Old Index