Commit Graph

190 Commits

Author SHA1 Message Date
Dimitry Andric
621cbb9437 Regenerate clang man page after upstream change to document the possible
values for the -std= option.

Noticed by:	Steve Kargl
Obtained from:	https://reviews.llvm.org/rL329827
MFC after:	3 days
2018-04-11 18:39:47 +00:00
Ed Maste
1b49115a40 Promote llvm-cov to a standalone option
Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV.
It is intended to provide a superset of the interface and functionality
of gcov.

It is enabled by default when building Clang, similarly to gcov and GCC.

This change moves one file in libllvm to be compiled unconditionally.
Previously it was included only when WITH_CLANG_EXTRAS was set, but the
complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not
worth avoiding a tiny increase in build time.

Reviewed by:	dim, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D142645
2018-02-10 00:22:35 +00:00
Ed Maste
18f201e79c ld.lld.1: explain long options may use one or two dashes 2018-02-08 00:09:17 +00:00
Ed Maste
c62c1fe23e Update ld.lld.1 based on the version committed upstream 2018-02-07 23:58:00 +00:00
Ed Maste
5725799a3b ld.lld.1: miscellaneous style improvements
Submitted by:	wblock in review D13813
2018-02-02 21:52:00 +00:00
Dimitry Andric
62bd626920 Build llvm-extract with -lz, and add a few objects to liblldb, both of
which turn out to be needed when you don't use -ffunction-sections.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
2018-01-13 13:53:05 +00:00
Dimitry Andric
c79126f2e4 Merge ^/head r327624 through r327885. 2018-01-12 18:23:35 +00:00
Ed Maste
71e8c9b65d lld: introduce basic man page
Upstream lld has no man page. Introduce a basic one for FreeBSD based on
ld.lld --help, with a brief introduction and additional detail for some
options.

We'll continue refining this in FreeBSD, and then submit it upstream once
the first round of edits are complete.

Submitted by:	krion, Arshan Khanifar, emaste, bjk
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13813
2018-01-10 16:01:25 +00:00
Dimitry Andric
747dcddd1d Regenerate clang manpage. 2017-12-24 13:06:37 +00:00
Dimitry Andric
7435ffaa83 Regenerate llvm tools manpages, and add one for llvm-pbdutil. 2017-12-24 13:02:43 +00:00
Dimitry Andric
5e00e53008 Minimize library dependencies for some llvm tools. 2017-12-24 12:42:30 +00:00
Dimitry Andric
9509d906c1 Add new llvm-objcopy utility, enabled when MK_CLANG_EXTRAS=yes. 2017-12-24 12:36:31 +00:00
Dimitry Andric
2757ff7e2f Update clang, lld and llvm version numbers for r321414, and update build
glue.
2017-12-24 12:32:55 +00:00
Dimitry Andric
7bfc2d0f8e Next step in updating llvm/clang build glue: make lld build. 2017-12-22 16:27:29 +00:00
Dimitry Andric
3cd201a12f Next step in updating llvm/clang build glue: make the optional llvm and
clang tools build.
2017-12-22 13:28:10 +00:00
Dimitry Andric
36cb3905c9 First step in updating llvm/clang build glue: make only the clang
executable build.
2017-12-21 21:24:52 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
John Baldwin
de6feefdb7 Improve the coverage of debug symbols for MK_DEBUG_FILES.
- Include debug symbols in static libraries.  This permits binaries
  to include debug symbols for functions obtained from static libraries.
- Permit the C/C++ compiler flags added for MK_DEBUG_FILES to be
  overridden by setting DEBUG_FILES_CFLAGS.  Use this to limit the debug
  information for llvm libraries and binaries.

Reviewed by:	emaste
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D12025
2017-08-23 23:30:25 +00:00
Dimitry Andric
c439438675 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update
build glue.
2017-07-13 21:58:45 +00:00
Dimitry Andric
a580b01494 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and update
build glue.
2017-07-02 11:41:15 +00:00
Dimitry Andric
edd7eaddc8 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and update
build glue.
2017-06-27 06:40:39 +00:00
Dimitry Andric
24d58133b7 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and update
build glue.
2017-06-17 00:09:34 +00:00
Dimitry Andric
db17bf38c5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and update
build glue.
2017-06-10 19:17:14 +00:00
Dimitry Andric
f9448bf33f Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update
build glue.
2017-06-01 22:47:02 +00:00
Dimitry Andric
302affcb04 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.
2017-05-29 22:09:23 +00:00
Dimitry Andric
5517e702c0 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and update
build glue.
2017-05-16 21:50:29 +00:00
Dimitry Andric
0f5676f432 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302418, and update
build glue.
2017-05-08 19:20:55 +00:00
Dimitry Andric
f37b6182a5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302069, and update
build glue (preliminary, not all option combinations work yet).
2017-05-03 21:54:55 +00:00
Dimitry Andric
51690af2a4 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
build glue.
2017-04-26 22:33:09 +00:00
Dimitry Andric
b33474c89f Strip out a few objects from libclang, liblldb and lldb, which are not
referenced due to the selection of tools that we build, and our compile
time options.
2017-04-21 21:06:11 +00:00
Dimitry Andric
482a8244bf Update some more build glue. All llvm extras, lld and lldb should link now. 2017-04-21 15:59:58 +00:00
Dimitry Andric
f8bb7d0f87 Add new objects to usr.bin/clang/lld for the MK_LLD=yes case. 2017-04-18 19:15:06 +00:00
Dimitry Andric
050e2df194 Add new objects to lib/clang/lib{llvm,clang} and usr.bin/clang for the
MK_CLANG_EXTRAS=yes case.
2017-04-18 17:39:20 +00:00
Dimitry Andric
5897d2f01b Initial update of clang/llvm build glue, for building just a minimal
clang executable.
2017-04-17 11:21:42 +00:00
Dimitry Andric
14f850f3df Merge ^/head r312720 through r312893. 2017-01-27 20:01:46 +00:00
Ed Maste
f52e4bdfd7 Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC
Reported by:	Dan McGregor <dan.mcgregor usask.ca>
2017-01-27 01:59:12 +00:00
Dimitry Andric
f1a29dd344 Merge llvm, clang, lld and lldb release_40 branch r292009. Also update
build glue.
2017-01-14 22:12:13 +00:00
Dimitry Andric
69415bc524 Merge ^/head r311546 through r311683. 2017-01-08 14:36:18 +00:00
Dimitry Andric
dc6e1047ce Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled. When
invoked as llvm-ranlib, it can create an archive symbol table for
archives of objects compiled for LTO by an LLVM compiler.

Submitted by:	Dan McGregor <danismostlikely@gmail.com>
MFC after:	3 days
2017-01-06 23:05:29 +00:00
Dimitry Andric
281264c5d1 Add new llvm-{cxxfilt,lto2,modextract,xray} tools. 2017-01-04 21:47:39 +00:00
Dimitry Andric
d5e9498269 Fix double-dollar typo in lld Makefile. 2017-01-04 20:56:03 +00:00
Dimitry Andric
1419873d24 Update lld Makefile. 2017-01-04 18:53:35 +00:00
Dimitry Andric
51d027f2a4 Update llvm-cov and llvm-pdbdump Makefiles. 2017-01-04 18:53:25 +00:00
Dimitry Andric
09bfd04318 Initial updates to llvm/clang build glue. 2017-01-03 20:28:09 +00:00
Dimitry Andric
30d4828e63 Reapply 310775, now it also builds correctly if lldb is disabled:
Move llvm-objdump from CLANG_EXTRAS to installed by default

We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.

LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D8879
2016-12-30 18:00:31 +00:00
Dimitry Andric
a222710ce2 Revert r310775 for now, until we can figure out why it does not seem to
work properly when cross-building.  Sorry for the breakage.
2016-12-29 21:57:16 +00:00
Dimitry Andric
1357722508 Move llvm-objdump from CLANG_EXTRAS to installed by default
We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.

LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D8879
2016-12-29 13:27:04 +00:00
Dimitry Andric
8930262bce Fix packaging for clang, lldb and lld 3.9.0
During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE
directive in the usr.bin/clang/*.mk files got dropped accidentally.

Restore it, with a few minor changes and additions:
* Correct license in clang.ucl to NCSA
* Add PACKAGE=clang for clang and most of the "ll" tools
* Put lldb in its own package
* Put lld in its own package

Reviewed by:	gjb, jmallett
X-MFC-With:	309124
Differential Revision: https://reviews.freebsd.org/D8666
2016-11-28 20:13:56 +00:00
Ed Maste
0aa5466e7d Add WITH_LLD_AS_LD build knob
If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.

It is on by default for arm64, and off for all other CPU architectures.

Sponsored by:	The FreeBSD Foundation
2016-11-25 13:15:28 +00:00
Ed Maste
28a116bab4 Correct lld llvm-tblgen dependency file name 2016-11-25 01:24:35 +00:00