Disable LLD_IS_LD option combinations that fail

If WITH_LLD is disabled LLD is not built and cannot be installed as
/usr/bin/ld, so disable WITH_LLD_IS_LD.

Currently we do not compare the LLD host/in-tree version and LLD
requires the LLVM libraries to be built, so force WITH_SYSTEM_COMPILER
off when WITH_LLD_IS_LD is set.

The logic for bootstrapping LLD requires some tidying later. We should
be able to detect that the host linker is the same version and avoid
building LLD in the same way that WITH_SYSTEM_COMPILER handles Clang.
We also may be able to extend libllvmminimal to meet LLD's needs.  For
now this change unbreaks buildworld with default settings except for
WITH_LLD_IS_LD.

Reported by:	Shawn Webb
Reviewed by:	bdrewery
Tested by:	Shawn Webb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D9487
This commit is contained in:
Ed Maste 2017-02-09 14:47:34 +00:00
parent f9edb08480
commit e4e5829b11

View File

@ -325,6 +325,16 @@ MK_LDNS_UTILS:= no
MK_UNBOUND:= no
.endif
.if ${MK_LLD} == "no"
MK_LLD_IS_LD:= no
.endif
# LLD requires LLVM libraries, and we do not yet compare in-tree and host LLD
# versions to avoid building it if they are identical.
.if ${MK_LLD_IS_LD} != "no"
MK_SYSTEM_COMPILER:= no
.endif
.if ${MK_SOURCELESS} == "no"
MK_SOURCELESS_HOST:= no
MK_SOURCELESS_UCODE:= no