From owner-freebsd-arch@freebsd.org Thu Nov 12 17:40:50 2015 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2132A2D195 for ; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B63081907 for ; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id B309DA2D193; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 988D6A2D192; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7CEC01905; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 76E6E11F3; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 35832146A1; Thu, 12 Nov 2015 17:40:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id rBLPL9ilTI0G; Thu, 12 Nov 2015 17:40:44 +0000 (UTC) To: current@FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 0A98B1469B From: Bryan Drewery Subject: [CFT] build: WITH_FAST_DEPEND and WITH_CCACHE_BUILD Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc X-Enigmail-Draft-Status: N1110 Organization: FreeBSD Message-ID: <5644CF1C.9020709@FreeBSD.org> Date: Thu, 12 Nov 2015 09:40:44 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M8vn7GDFg4xth8WrijkLOHfFUXraq9SSg" X-Mailman-Approved-At: Thu, 12 Nov 2015 19:50:48 +0000 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 17:40:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --M8vn7GDFg4xth8WrijkLOHfFUXraq9SSg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Recently I have introduced two new features into the build. These apply to anything using /usr/share/mk including buildworld, buildkernel, universe, etc. - The first is WITH_FAST_DEPEND. Please see the commit for its full description, benefits and discussion. It saves 16-30% in build times without gimmicks or risk. It avoids running the preprocessor twice in the build and only runs it during compilation. This is a feature that's 14 years overdue. https://svnweb.freebsd.org/changeset/base/290433 There was a problem with the GCC build, but that has been fixed. I intend to enable this *by default* for the src buildworld/etc... build in a few weeks. I do need to schedule a ports exp-run with this as well to see if anything outside of the src tree is broken by it, which I very much doubt. If you have a downstream fork of FreeBSD, please import r290433 and r290629 and give me feedback on any issues you encounter. There is 1 gotcha that I realized. People running 'make depend' manually may actually want to see a .depend file generated without having to compile first. I may add support for that somehow but am not sure yet. It may be a 'make mkdep' target. - The second is WITH_CCACHE_BUILD. This replaces the previous suggestion of modifying CC and CXX in /etc/make.conf. This is purposely chosen to match the ports name. It can save up to 65% build times when combined with WITH_FAST_DEPEND. This fixes all known issues with buildworld+ccache. There is a rare problem that can occur with header detection that is documented in the ccache manpage in the DIRECT MODE section. **It is only useful for frequent builders who do not use -DNO_CLEAN and want a reliable incremental build. It is not useful for people who build infrequently.** See commit for further details and stats. I do not intend to ever support enabling this by default. I just intend to update the devel/ccache pkg-message to suggest using it once it is known to work for all. https://svnweb.freebsd.org/changeset/base/290526 Thanks! Bryan Drewery --M8vn7GDFg4xth8WrijkLOHfFUXraq9SSg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWRM8cAAoJEDXXcbtuRpfPPKsIANgaJynN8UWGTgI6R7OWgT0s UHIy15+vsE9HVrQ8yvITp5lVOtI0xp69RmHhI6B+xje2VfYv/2brmUcW3kL4LK3K s17oYX7Nz9xNSLdASNeboet77cygpG5lycElU/XpD0GJ4tVUsWBlf5M/xydh/UG7 gBnHV4cCFXJ/fbpnHdY58cTJl8p08ngG+KUVBM3+HkihZ4Zy+e9QizRqvpf9VcgS HWP6wQniQ+qdNYzlOMyoLrDzoZM8yNPlkOg/m/ToeacNji4K4I9Igp768e60FJKB 153jNhrA8gMvO2wVCIH+llO79yzVqlrXpF8viw7o4vSMoxfqc2dhxWrcyP+2aPc= =/hq/ -----END PGP SIGNATURE----- --M8vn7GDFg4xth8WrijkLOHfFUXraq9SSg--