summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-09-20 01:52:02 +0000
committeremaste <emaste@FreeBSD.org>2013-09-20 01:52:02 +0000
commit51ba585f88949f7d515cf6be9c32aa678838a67c (patch)
tree03c4639d8dd72b5865e528b3705c2061add52e92 /usr.bin
parent07c75ee46c7f2c2fa93ef848a944b6c054d22168 (diff)
downloadFreeBSD-src-51ba585f88949f7d515cf6be9c32aa678838a67c.zip
FreeBSD-src-51ba585f88949f7d515cf6be9c32aa678838a67c.tar.gz
Add LLDB bmake infrastructure
This connects LLDB to the build, but it is disabled by default. Add WITH_LLDB= to src.conf to build it. Note that LLDB requires a C++11 compiler so is disabled on platforms using GCC. Approved by: re (gjb) Sponsored by: DARPA, AFRL
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/clang/Makefile8
-rw-r--r--usr.bin/clang/lldb/Makefile135
2 files changed, 142 insertions, 1 deletions
diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile
index db5fae7..a61a418 100644
--- a/usr.bin/clang/Makefile
+++ b/usr.bin/clang/Makefile
@@ -4,7 +4,8 @@
SUBDIR= clang clang-tblgen tblgen
-.if ${MK_CLANG_EXTRAS} != "no" && !defined(TOOLS_PREFIX)
+.if !defined(TOOLS_PREFIX)
+.if ${MK_CLANG_EXTRAS} != "no"
SUBDIR+=bugpoint \
llc \
lli \
@@ -25,4 +26,9 @@ SUBDIR+=bugpoint \
opt
.endif
+.if ${MK_LLDB} != "no"
+SUBDIR+=lldb
+.endif
+.endif # TOOLS_PREFIX
+
.include <bsd.subdir.mk>
diff --git a/usr.bin/clang/lldb/Makefile b/usr.bin/clang/lldb/Makefile
new file mode 100644
index 0000000..6869b8d
--- /dev/null
+++ b/usr.bin/clang/lldb/Makefile
@@ -0,0 +1,135 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+PROG_CXX=lldb
+
+LLDB_SRCS=${.CURDIR}/../../../contrib/llvm/tools/lldb
+
+CFLAGS+= -I${LLDB_SRCS}/include
+CXXFLAGS+= -std=c++11
+
+SRCDIR= tools/lldb/tools/driver
+SRCS= Driver.cpp \
+ IOChannel.cpp
+
+lldb.1:
+ ln -fs ${LLDB_SRCS}/docs/lldb.1 ${.TARGET}
+
+DPADD= ${LIBEDIT} ${LIBCURSES} ${LIBEXECINFO}
+LDADD= -ledit -lcurses -lexecinfo
+
+LLDB_LIBS=\
+ lldb \
+ \
+ lldbAPI \
+ lldbBreakpoint \
+ lldbCommands \
+ lldbCore \
+ lldbDataFormatters \
+ lldbExpression \
+ lldbHostFreeBSD \
+ lldbHostCommon \
+ lldbInterpreter \
+ lldbSymbol \
+ lldbTarget \
+ lldbUtility \
+ \
+ lldbPluginABISysV_x86_64 \
+ lldbPluginCXXItaniumABI \
+ lldbPluginDisassemblerLLVM \
+ lldbPluginInstructionARM \
+ lldbPluginSymbolFileDWARF \
+ lldbPluginSymbolFileSymtab \
+ lldbPluginDynamicLoaderStatic \
+ lldbPluginDynamicLoaderPosixDYLD \
+ lldbPluginObjectContainerBSDArchive \
+ lldbPluginObjectFileELF \
+ lldbPluginSymbolVendorELF \
+ lldbPluginPlatformFreeBSD \
+ lldbPluginPlatformGDB \
+ lldbPluginProcessElfCore \
+ lldbPluginProcessFreeBSD \
+ lldbPluginProcessGDBRemote \
+ lldbPluginProcessUtility \
+ lldbPluginProcessPOSIX \
+ lldbPluginUnwindAssemblyInstEmulation \
+ lldbPluginUnwindAssemblyX86
+
+LDADD+= -Wl,--start-group
+.for lib in ${LLDB_LIBS}
+DPADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
+LDADD+= ${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
+.endfor
+LDADD+= -Wl,--end-group
+
+# Clang and LLVM libraries
+LIBDEPS=\
+ clangfrontend \
+ clangdriver \
+ clangserialization \
+ clangcodegen \
+ clangparse \
+ clangsema \
+ clanganalysis \
+ clangedit \
+ clangast \
+ clangbasic \
+ clanglex \
+ \
+ llvmarmasmparser \
+ llvmarmcodegen \
+ llvminstrumentation \
+ llvmirreader \
+ llvmlinker \
+ llvmmipsasmparser \
+ llvmmipscodegen \
+ llvmmipsdisassembler \
+ llvmobjcarcopts \
+ llvmpowerpccodegen \
+ llvmx86asmparser \
+ llvmx86codegen \
+ llvmx86disassembler \
+ llvmmcjit \
+ llvmmcdisassembler \
+ llvmarmdisassembler \
+ llvmselectiondag \
+ llvmipo \
+ llvmbitwriter \
+ llvmbitreader \
+ llvmasmparser \
+ llvminterpreter \
+ llvmjit \
+ llvmarmdesc \
+ llvmasmprinter \
+ llvmmipsdesc \
+ llvmmipsinstprinter \
+ llvmpowerpcdesc \
+ llvmpowerpcinstprinter \
+ llvmruntimedyld \
+ llvmvectorize \
+ llvmx86desc \
+ llvmx86instprinter \
+ llvmexecutionengine \
+ llvmcodegen \
+ llvmscalaropts \
+ llvmarminfo \
+ llvmarminstprinter \
+ llvmmcparser \
+ llvmmipsinfo \
+ llvmpowerpcinfo \
+ llvmx86info \
+ llvmx86utils \
+ llvmobject \
+ llvminstcombine \
+ llvmtransformutils \
+ llvmipa \
+ llvmanalysis \
+ llvmtarget \
+ llvmcore \
+ llvmmc \
+ llvmsupport
+
+.include "../clang.prog.mk"
+
+LDADD+= -lpthread
OpenPOWER on IntegriCloud