aboutsummaryrefslogtreecommitdiff
path: root/lib/clang/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Build libclang also if LLDB is enabledEd Maste2022-01-101-1/+1
| | | | | | | | | | | | | | | | | | LLDB depends on libclang as it uses Clang as the expression parser. Previously setting WITHOUT_CLANG but leaving LLDB enabled (as default) resulted in a build failure. Users who set WITHOUT_CLANG in order to reduce build time or size might want to set WITHOUT_LLDB in addition to WITHOUT_CLANG, or use WITHOUT_TOOLCHAIN instead. PR: 260993 Reported by: eugen Reviewed by: dim MFC after: 3 days Sponsored by: The FreeBSD Foundation (cherry picked from commit adc88b9c01b5d7a51c896091b291afbdae42b02a)
* Add WITH_LLVM_BINUTILS to install LLVM binutils instead of ElftoolchainAlex Richardson2021-12-051-1/+3
| | | | | | | | | | | | | | | | | | | | | When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones. Having the LLVM binutils instead of the elftoolchain ones allows us to use features such as LTO that depend on binutils that understand LLVM IR. Another benefit will be an improved user-experience when compiling with AddressSanitizer, since ASAN does not symbolize backtraces correctly if addr2line is elftoolchain addr2line instead of llvm-symbolizer. See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/000062.html for more details. This is currently off by default but will be turned on by default at some point in the near future. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D31060 (cherry picked from commit 021385aba56279febcfdcc64d23673a0106ae45d)
* Completely revamp the way llvm, clang and lldb are built.Dimitry Andric2016-08-261-186/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: svn path=/projects/clang390-import/; revision=304867
* Update build glue for lldb. Also comment out parts of theDimitry Andric2016-08-201-2/+3
| | | | | | | | initialization and termination code which reference plugins and components that we don't use. Notes: svn path=/projects/clang390-import/; revision=304536
* Update build glue for clang and the llvm/clang extras.Dimitry Andric2016-08-191-4/+13
| | | | Notes: svn path=/projects/clang390-import/; revision=304486
* Add clang-format under WITH_CLANG_EXTRAS.Bryan Drewery2016-06-171-1/+3
| | | | | | | | | | Reviewed by: dim Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D6856 Notes: svn path=/head/; revision=301993
* Update build infrastructure for LLDB 3.8Ed Maste2016-01-041-0/+5
| | | | Notes: svn path=/projects/clang380-import/; revision=293124
* Next part of updating llvm/clang build glue: getting theDimitry Andric2015-12-311-2/+2
| | | | | | | WITH_CLANG_EXTRAS tools built. Notes: svn path=/projects/clang380-import/; revision=292990
* First part of updating llvm/clang build glue: getting llvm-tblgen,Dimitry Andric2015-12-311-10/+11
| | | | | | | clang-tblgen and clang itself built. Notes: svn path=/projects/clang380-import/; revision=292988
* libllvmmirparser and libllvmlibdriver are only used in usr.bin/clang/llc andBryan Drewery2015-11-301-2/+2
| | | | | | | | | | usr.bin/clang/llvm-ar, respectively, when MK_CLANG_EXTRAS is yes. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291495
* Minimize the number of files compiled for clang only (e.g. when neitherDimitry Andric2015-09-061-6/+6
| | | | | | | WITH_CLANG_EXTRAS nor WITH_LLDB is in effect). Notes: svn path=/projects/clang370-import/; revision=287526
* Update LLDB snapshot to upstream r241361Ed Maste2015-07-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream commits (upstream revision in parens): - Add a JSON producer to LLDB (228636) - Don't crash on bad DWARF expression (228729) - Add support of DWARFv3 DW_OP_form_tls_address (231342) - Assembly profiler for MIPS64 (232619) - Handle FreeBSD/arm64 core files (233273) - Read/Write register for MIPS64 (233685) - Rework LLDB system initialization (233758) - SysV ABI for aarch64 (236098) - MIPS software single stepping (236696) - FreeBSD/arm live debugging support (237303) - Assembly profiler for mips32 (237420) - Parse function name from DWARF DW_AT_abstract_origin (238307) - Improve LLDB prompt handling (238313) - Add real time signals support to FreeBSDSignals (238316) - Fix race in IOHandlerProcessSTDIO (238423) - MIPS64 Branch instruction emulation for SW single stepping (238820) - Improve OSType initialization in elf object file's arch_spec (239148) - Emulation of MIPS64 floating-point branch instructions (239996) - ABI Plugin for MIPS32 (239997) - ABI Plugin for MIPS64 (240123) - MIPS32 branch emulation and single stepping (240373) - Improve instruction emulation based stack unwinding on ARM (240533) - Add branch emulation to aarch64 instruction emulator (240769) Notes: svn path=/projects/clang-trunk/; revision=285116
* Update llvm/clang build glue.Dimitry Andric2015-06-231-0/+1
| | | | Notes: svn path=/projects/clang-trunk/; revision=284735
* Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunkDimitry Andric2015-06-101-0/+1
| | | | | | | r239412. Notes: svn path=/projects/clang-trunk/; revision=284236
* Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunkDimitry Andric2015-05-301-1/+5
| | | | | | | r238337. Notes: svn path=/projects/clang-trunk/; revision=283770
* Update FreeBSD LLDB build for 3.6 updateEd Maste2015-02-081-0/+4
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/projects/clang360-import/; revision=278390
* Update llvm and clang library and binary Makefiles for 3.6.0 rc1.Dimitry Andric2015-01-261-4/+2
| | | | Notes: svn path=/projects/clang360-import/; revision=277765
* Add the AArch64 llvm backend to the build to allow for early testing andDimitry Andric2015-01-071-0/+7
| | | | | | | | | | | to ease any rework of how clang is built to take arm64 in to account. Submitted by: andrew Reviewed by: andrew, emaste Differential Revision: https://reviews.freebsd.org/D1446 Notes: svn path=/head/; revision=276783
* Update build for LLDB snapshot at upstream rev 216948Ed Maste2014-11-261-0/+4
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/projects/clang350-import/; revision=275132
* Update llvm and clang library Makefiles.Dimitry Andric2014-11-241-7/+6
| | | | Notes: svn path=/projects/clang350-import/; revision=274973
* Eliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=noWarner Losh2014-05-101-7/+4
| | | | | | | | | and MK_LLDB=no, so set those explicitly (now that we can do that). Simplify tests for these variables as well, since we know they will always be defined regardless of the phase of the build. Notes: svn path=/head/; revision=265831
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to processDimitry Andric2014-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC after: 2 weeks Notes: svn path=/head/; revision=263778
* Add Makefile glue to build the Sparc backend libraries and link themDimitry Andric2014-02-201-0/+6
| | | | | | | into the clang executable. Notes: svn path=/projects/clang-sparc64/; revision=262263
* Upgrade our copy of llvm/clang to 3.4 release. This version supportsDimitry Andric2014-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | all of the features in the current working draft of the upcoming C++ standard, provisionally named C++1y. The code generator's performance is greatly increased, and the loop auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The PowerPC backend has made several major improvements to code generation quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ backends have all seen major feature work. Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.4/docs/ReleaseNotes.html> <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html> MFC after: 1 month Notes: svn path=/head/; revision=261991
* Enable llvm's integrated assembler for PowerPC, since it should now beDimitry Andric2013-12-161-0/+1
| | | | | | | | | | good enough for typical usage. Requested by: rdivacky MFC after: 1 week Notes: svn path=/head/; revision=259473
* Add LLDB bmake infrastructureEd Maste2013-09-201-5/+51
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=255722
* Upgrade our copy of llvm/clang to trunk r178860, in preparation of theDimitry Andric2013-04-121-0/+2
| | | | | | | | | | | | upcoming 3.3 release (branching and freezing expected in a few weeks). Preliminary release notes can be found at the usual location: <http://llvm.org/docs/ReleaseNotes.html> An MFC is planned once the actual 3.3 release is finished. Notes: svn path=/head/; revision=249423
* Pull in r170135 from upstream clang trunk:Dimitry Andric2013-02-021-8/+17
| | | | | | | | | | | | | | | | | | | Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user specifies not to. Dont build ASTMatchers with Rewriter disabled and StaticAnalyzer when it's disabled. Without all those three, the clang binary shrinks (x86_64) from ~36MB to ~32MB (unstripped). To disable these clang components, and get a smaller clang binary built and installed, set WITHOUT_CLANG_FULL in src.conf(5). During the initial stages of buildworld, those extra components are already disabled automatically, to save some build time. MFC after: 1 week Notes: svn path=/head/; revision=246259
* Cleanup a few duplicate llvm libs that snuck in with the recent update.Dimitry Andric2012-12-111-4/+1
| | | | | | | Noticed by: rdivacky Notes: svn path=/head/; revision=244124
* Upgrade our copy of llvm/clang to r168974, from upstream's release_32Dimitry Andric2012-12-031-1/+2
| | | | | | | | branch. This is effectively llvm/clang 3.2 RC2; the 3.2 release is coming soon. Notes: svn path=/head/; revision=243830
* Upgrade our copy of llvm/clang to trunk r162107. With thanks toDimitry Andric2012-08-201-0/+1
| | | | | | | Benjamin Kramer and Joerg Sonnenberger for their input and fixes. Notes: svn path=/head/; revision=239462
* Upgrade our copy of llvm/clang to r155985, from upstream's release_31Dimitry Andric2012-05-031-1/+0
| | | | | | | | | | branch. This brings us very close to the 3.1 release, which is planned for May 14th. MFC after: 2 weeks Notes: svn path=/head/; revision=234982
* Upgrade our copy of llvm/clang to trunk r154661, in preparation of theDimitry Andric2012-04-161-0/+6
| | | | | | | | | | upcoming 3.1 release (expected in a few weeks). Preliminary release notes can be found at: <http://llvm.org/docs/ReleaseNotes.html> MFC after: 2 weeks Notes: svn path=/head/; revision=234353
* Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,Dimitry Andric2012-02-051-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that builds the following additional llvm/clang tools: - bugpoint - llc - lli - llvm-ar - llvm-as - llvm-bcanalyzer - llvm-diff - llvm-dis - llvm-extract - llvm-ld - llvm-link - llvm-mc - llvm-nm - llvm-objdump - llvm-prof - llvm-ranlib - llvm-rtdyld - llvm-stub - macho-dump - opt These tools are mainly useful for people that want to manipulate llvm bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker with llvm and clang themselves. MFC after: 2 weeks Notes: svn path=/head/; revision=231057
* Upgrade our copy of llvm/clang to r142614, from upstream's release_30Dimitry Andric2011-10-221-0/+1
| | | | | | | | | | branch. This brings us very close to the 3.0 release, which is expected in a week or two. MFC after: 1 week Notes: svn path=/head/; revision=226633
* Upgrade our copy of llvm/clang to r135360, from upstream's trunk.Dimitry Andric2011-07-171-0/+6
| | | | Notes: svn path=/head/; revision=224145
* Upgrade our copy of llvm/clang to r130700, from upstream's trunk.Dimitry Andric2011-05-021-5/+6
| | | | Notes: svn path=/head/; revision=221345
* Upgrade our copy of llvm/clang to r126079, from upstream's trunk.Dimitry Andric2011-02-201-8/+10
| | | | | | | | This contains many improvements, primarily better C++ support, an integrated assembler for x86 and support for -pg. Notes: svn path=/head/; revision=218893
* When the make target is 'install', don't descend into the clangRui Paulo2010-10-301-3/+5
| | | | | | | | libraries subdirectories since there's nothing to do there. This saves us quite a few seconds off installworld, esp. if the disk I/O is slow. Notes: svn path=/head/; revision=214562
* Upgrade our Clang in base to r114020, from upstream's release_28 branch.Dimitry Andric2010-09-201-0/+4
| | | | | | | Approved-by: rpaulo (mentor) Notes: svn path=/head/; revision=212904
* Upgrade our Clang in base to r108428.Ed Schouten2010-07-201-0/+1
| | | | | | | | | | | | This commit merges the latest LLVM sources from the vendor space. It also updates the build glue to match the new sources. Clang's version number is changed to match LLVM's, which means /usr/include/clang/2.0 has been renamed to /usr/include/clang/2.8. Obtained from: projects/clangbsd Notes: svn path=/head/; revision=210299
* Import the build makefiles for clang/LLVM.Roman Divacky2010-06-091-0/+50
Approved by: ed (mentor) Notes: svn path=/head/; revision=208963