Also apply WITH_LLD_AS_LD to build tools
Previously WITH_LLD_AS_LD installed LLD as /usr/bin/ld in the target system, but still used the GNU BFD ld to link the binaries in that target. LLD 4.0.0 can link the FreeBSD/amd64 world and kernel so use LLD as the build-time linker as well when the knob is set. Reviewed by: dim Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9226
This commit is contained in:
parent
60af5546d1
commit
737872e978
@ -516,7 +516,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
|
|||||||
# cross-tools stage
|
# cross-tools stage
|
||||||
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
|
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
|
||||||
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
||||||
MK_GDB=no MK_TESTS=no MK_LLD_AS_LD=no
|
MK_GDB=no MK_TESTS=no
|
||||||
|
|
||||||
# kernel-tools stage
|
# kernel-tools stage
|
||||||
KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||||
@ -1827,6 +1827,9 @@ _elftctools= lib/libelftc \
|
|||||||
# cross-build on a FreeBSD 10 host:
|
# cross-build on a FreeBSD 10 host:
|
||||||
_elftctools+= usr.bin/addr2line
|
_elftctools+= usr.bin/addr2line
|
||||||
.endif
|
.endif
|
||||||
|
.if ${MK_LLD_AS_LD} != "no"
|
||||||
|
_lld= usr.bin/clang/lld
|
||||||
|
.endif
|
||||||
.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
|
.elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
|
||||||
# If cross-building with an external binutils we still need to build strip for
|
# If cross-building with an external binutils we still need to build strip for
|
||||||
# the target (for at least crunchide).
|
# the target (for at least crunchide).
|
||||||
@ -1851,6 +1854,7 @@ cross-tools: .MAKE .PHONY
|
|||||||
${LOCAL_XTOOL_DIRS} \
|
${LOCAL_XTOOL_DIRS} \
|
||||||
${_clang_libs} \
|
${_clang_libs} \
|
||||||
${_clang} \
|
${_clang} \
|
||||||
|
${_lld} \
|
||||||
${_binutils} \
|
${_binutils} \
|
||||||
${_elftctools} \
|
${_elftctools} \
|
||||||
${_dtrace_tools} \
|
${_dtrace_tools} \
|
||||||
|
@ -1146,7 +1146,7 @@ SRCS_MIN+= Transforms/Vectorize/SLPVectorizer.cpp
|
|||||||
SRCS_EXT+= Transforms/Vectorize/Vectorize.cpp
|
SRCS_EXT+= Transforms/Vectorize/Vectorize.cpp
|
||||||
|
|
||||||
SRCS_ALL+= ${SRCS_MIN}
|
SRCS_ALL+= ${SRCS_MIN}
|
||||||
.if !defined(TOOLS_PREFIX)
|
.if !defined(TOOLS_PREFIX) || ${MK_LLD_AS_LD} != "no"
|
||||||
SRCS_ALL+= ${SRCS_MIW}
|
SRCS_ALL+= ${SRCS_MIW}
|
||||||
.endif
|
.endif
|
||||||
.if ${MK_CLANG_EXTRAS} != "no"
|
.if ${MK_CLANG_EXTRAS} != "no"
|
||||||
|
Loading…
Reference in New Issue
Block a user