HomeFreeBSD

Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain

Description

Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain

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)

Details

Provenance
arichardsonAuthored on Sep 6 2021, 8:49 AM
dimCommitted on Dec 25 2021, 11:51 AM
Reviewer
emaste
Differential Revision
D31060: Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain
Parents
rG64d26775b37e: Fix bootstrapping to actually build lldb-tblgen for later use
Branches
Unknown
Tags
Unknown