Do not clean (in buildworld/buildkernel) by default

As discussed on the freebsd-arch mailing list[1].  For historical
reasons FreeBSD's buildworld and buildkernel targets started by cleaning
the object tree, for traditional (non-metamode) builds.

Cleaning is not necessary when dependencies are properly tracked, and we
have a somewhat kludgey script[2] to handle some known cases where deps
were mishandled by traditional builds.  Be consistent with the vast
majority of open source build systems by default, and do not clean at
the beginning of buildworld or buildkernel.

Users may set WITH_CLEAN in src.conf(5) to restore the previous
behaviour, or run `make cleanworld` and/or `make cleankernel` before
starting a build.

[1] https://lists.freebsd.org/archives/freebsd-arch/2024-July/000727.html
[2] tools/build/depend-cleanup.sh

Reviewed by:	jhb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46172
This commit is contained in:
Ed Maste
2024-07-29 00:00:00 +00:00
parent f933363a81
commit ba373fca78
4 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -80,7 +80,6 @@ __DEFAULT_YES_OPTIONS = \
CDDL \
CLANG \
CLANG_BOOTSTRAP \
CLEAN \
CPP \
CROSS_COMPILER \
CRYPT \
@@ -195,6 +194,7 @@ __DEFAULT_NO_OPTIONS = \
BHYVE_SNAPSHOT \
CLANG_EXTRAS \
CLANG_FORMAT \
CLEAN \
DIALOG \
DETECT_TZ_CHANGES \
DISK_IMAGE_TOOLS_BOOTSTRAP \