From nobody Wed Jul 24 08:44:39 2024 X-Original-To: arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WTSJ40trTz5RXgf for ; Wed, 24 Jul 2024 08:44:52 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WTSJ33v5Jz4GLk; Wed, 24 Jul 2024 08:44:51 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (123-1-21-232.area1b.commufa.jp [123.1.21.232]) (authenticated bits=0) by www121.sakura.ne.jp (8.17.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 46O8ids6007428; Wed, 24 Jul 2024 17:44:40 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1721810681; bh=+SoaoI2NauKQ2td1nWj8TkmGoTpjZLIv7pNx+GUYr+k=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=b4RpBG9oOQ0XqRPGFKP3hKj4+2vbONyn6bHC7zzSSDTY6JHzDCYMRB5bWe0X1d3vb 4AgkyOS6TNG0XDfp8NjlDF/srKuWb16pJ6CbVWuJWsNV9NuIinlbepf6J680jzuF2k v1FoYbMWMAjfeGK+HjoRdFdQXDFdJbllJJZEXyI8= Date: Wed, 24 Jul 2024 17:44:39 +0900 From: Tomoaki AOKI To: John Baldwin Cc: Shawn Webb , arch@freebsd.org Subject: Re: Default NO_CLEAN=yes in 15+ Message-Id: <20240724174439.2384fae6b9bb17760d04fbfd@dec.sakura.ne.jp> In-Reply-To: <71d28fd9-7679-4aaa-981e-81fa70c5da71@FreeBSD.org> References: <9bbb12ee-d5e0-4e9c-a832-bbfe5eea0ba6@FreeBSD.org> <71d28fd9-7679-4aaa-981e-81fa70c5da71@FreeBSD.org> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.1) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Queue-Id: 4WTSJ33v5Jz4GLk On Tue, 23 Jul 2024 17:29:12 -0400 John Baldwin wrote: > On 7/23/24 16:08, Shawn Webb wrote: > > On Tue, Jul 23, 2024 at 03:58:13PM -0400, John Baldwin wrote: > >> The buildworld and buildkernel targets include a "clean" step before building > >> objects dating back before my time to 'make world' (I haven't looked to see > >> how far back it goes). To permit incremental builds, this step can be skipped > >> via NO_CLEAN=yes. This step is a bit unusual in build systems however. Most > >> build systems have separate commands for building vs cleaning (e.g. 'make all' > >> vs 'make clean') and over time FreeBSD's build system has gained dedicated > >> clean targets as well (cleanworld and cleankernel). For myself, I always > >> use NO_CLEAN=yes when building worlds and kernels. If I need a clean build > >> I use the dedicated clean targets (e.g. cleanworld) first. In particular, > >> cleanworld/cleankernel are far more efficient since they use a single > >> recursive 'rm' whereas the "clean" step involves a full tree walk with > >> nested make invocations of the 'cleandir' target. > >> > >> A few years ago, Ed Maste added a MK_CLEAN option to src.opts.mk to as a > >> WITH/WITHOUT knob for the "clean" step similar to NO_CLEAN=yes. To preserve > >> existing behavior this knob currently defaults to on, but I know Ed's goal > >> was to eventually flip the default so that NO_CLEAN builds would be the > >> default. I would like us to do that starting in 15. > > > > It would make sense to me to default MK_CLEAN=no in release branches. > > Perhaps stable branches, too. While I don't hold a strong opinion on > > the matter, I would prefer MK_CLEAN=yes to remain the default on the > > main branch. > > > > I can't give tangible examples, but I remember running into weird > > issues occasionally when using `make buildworld WITHOUT_CLEAN=yes` in > > main. I probably should do a better job at documenting those > > (infrequent) issues when they arise. > > To be clear, the suggestion is that when you hit an issue, just run > 'make cleanworld' rather than relying on the omission of NO_CLEAN=yes > to do this for you (and much slower at that). Have you used any other > build systems where 'make' does an implicit 'make clean' before it > builds? I have never encountered another where this is true. 'clean' is > always a separate target from 'all' in my experience. > > -- > John Baldwin +1. And IIRC, *.meta remains after cleanworld / cleankernel on META_MODE builds. If I'm correct, it should be properly cleaned, too. -- Tomoaki AOKI