aboutsummaryrefslogtreecommitdiff
path: root/tools/build
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2018-06-20 16:10:14 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2018-06-20 16:10:14 +0000
commita7d84af8903353c75350105366bed5c80182a66f (patch)
tree3e165d3bc4b30ad91db8f320e3d54eefe1c6c691 /tools/build
parenta883ed8c1da61eacb305818a4029623699f01534 (diff)
downloadsrc-a7d84af8903353c75350105366bed5c80182a66f.tar.gz
src-a7d84af8903353c75350105366bed5c80182a66f.zip
Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible.
This works similar to WITH_SYSTEM_COMPILER added in r300354. It only supports lld via WITH_LLD_BOOTSTRAP. When both SYSTEM_COMPILER and SYSTEM_LINKER logic passes then libclang will not build in cross-tools. If either check fails though then libclang is built. The .info is reworked to notify when libclang will be built since if either clang or lld needs to be rebuilt, but not the other, the notification can lead to confusion on why "clang is building". -fuse-ld= is not used with this method so some combinations of compiler and linker are expected to fail. A new 'make test-system-linker' target is added to see the logic results. Makefile.inc1: CROSS_BINUTILS_PREFIX support had to be moved higher up so that XLD could be set and MK_LLD_BOOTSTRAP disabled before checking SYSTEM_LINKER logic as done with SYSTEM_COMPILER. This also required moving where bsd.linker.mk was read since XLD needs to be set before parsing it. This creates a situation where src.opts.mk can not test LINKER_FEATURES or add LLD_BOOTSTAP to BROKEN_OPTIONS. Reviewed by: emaste (earlier version) Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D15894
Notes
Notes: svn path=/head/; revision=335450
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/options/WITHOUT_SYSTEM_LINKER16
-rw-r--r--tools/build/options/WITH_SYSTEM_LINKER16
2 files changed, 32 insertions, 0 deletions
diff --git a/tools/build/options/WITHOUT_SYSTEM_LINKER b/tools/build/options/WITHOUT_SYSTEM_LINKER
new file mode 100644
index 000000000000..3d5fc003f960
--- /dev/null
+++ b/tools/build/options/WITHOUT_SYSTEM_LINKER
@@ -0,0 +1,16 @@
+.\" $FreeBSD$
+Set to not opportunistically skip building a cross-linker during the
+bootstrap phase of the build.
+Normally, if the currently installed linker matches the planned bootstrap
+linker type and revision, then it will not be built.
+This does not prevent a linker from being built for installation though,
+only for building one for the build itself.
+The
+.Va WITHOUT_LLD
+and
+.Va WITHOUT_BINUTILS
+options control those.
+.Pp
+This option is only relevant when
+.Va WITH_LLD_BOOTSTRAP
+is set.
diff --git a/tools/build/options/WITH_SYSTEM_LINKER b/tools/build/options/WITH_SYSTEM_LINKER
new file mode 100644
index 000000000000..ad9325896a79
--- /dev/null
+++ b/tools/build/options/WITH_SYSTEM_LINKER
@@ -0,0 +1,16 @@
+.\" $FreeBSD$
+Set to opportunistically skip building a cross-linker during the
+bootstrap phase of the build.
+If the currently installed linker matches the planned bootstrap linker
+type and revision, then it will not be built.
+This does not prevent a linker from being built for installation though,
+only for building one for the build itself.
+The
+.Va WITHOUT_LLD
+and
+.Va WITHOUT_BINUTILS
+options control those.
+.Pp
+This option is only relevant when
+.Va WITH_LLD_BOOTSTRAP
+is set.