Previously WITH_LLD_AS_LD installed LLD as /usr/bin/ld in the target system, but still used BFD ld as the linker for the binaries in that target. LLD 4.0.0 can link the FreeBSD world and kernel so use LLD as the build-time linker as well when the knob is set.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Note that this has no effect by default on any arch, since MK_LLD_AS_LD defaults to no everywhere but arm64, and on arm64 we currently override the in-tree toolchain using the aarch64-binutils package automatically.
Makefile.inc1 | ||
---|---|---|
519 ↗ | (On Diff #24140) | Previously this forced the use of ld.bfd to build the world and kernel, but installed ld.lld as /usr/bin/ld in the result. Without overriding it, WITH_LLD_AS_LD will apply to both the ld used to build world, as well as the ld installed in the world. |
lib/clang/libllvm/Makefile | ||
1149 ↗ | (On Diff #24140) | !defined(TOOLS_PREFIX) is used as a proxy for "building the tool chain that will be installed in the resulting world". We need ${SRCS_MIW} included if we're building LLD as part of the build tool chain. |
lib/clang/libllvm/Makefile | ||
---|---|---|
1149 ↗ | (On Diff #24140) | Not sure if this will be enough. At the moment there is no separate category SRCS_xxx for just MK_LLD, so whether those sources are enough to build lld is unclear. It is likely that we have to add more objects to SRCS_MIW, instead. |
lib/clang/libllvm/Makefile | ||
---|---|---|
1149 ↗ | (On Diff #24140) | When LLD is built to be installed in the target (${WITH_LLD}) it's already building against ${SRCS_MIW} via TOOLS_PREFIX. Unless you mean for example that WITH_LLD but WITHOUT_LLDB doesn't work today? It's when we're building LLD early (${WITH_LLD_AS_LD}) that ${SRCS_MIW} isn't available and LLD fails to build (with the other change above). |