aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-08-26 22:44:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-08-26 22:44:22 +0000
commit986e05bc2a18e58ffe5ad5c944e4c188d01a4462 (patch)
tree77d6cefbacfed7e4b4b53080e3cc6a06dd50fcaf /Makefile.inc1
parente9c25f21083a601b3e38689c6ed2a25ae1f5e046 (diff)
downloadsrc-986e05bc2a18e58ffe5ad5c944e4c188d01a4462.tar.gz
src-986e05bc2a18e58ffe5ad5c944e4c188d01a4462.zip
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.
Notes
Notes: svn path=/projects/clang390-import/; revision=304867
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc17
1 files changed, 3 insertions, 4 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index d87a6dbdb963..a08b41a47a9e 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1652,13 +1652,12 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptree
# the bootstrap compiler, or as the part of the normal build.
.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no"
_clang_tblgen= \
- lib/clang/libllvmsupport \
- lib/clang/libllvmtablegen \
+ lib/clang/libllvmminimal \
usr.bin/clang/llvm-tblgen \
usr.bin/clang/clang-tblgen
-${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport
-${_bt}-usr.bin/clang/llvm-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/libllvmminimal
.endif
# Default to building the GPL DTC, but build the BSDL one if users explicitly