Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2015 09:40:44 -0800
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        current@FreeBSD.org
Subject:   [CFT] build: WITH_FAST_DEPEND and WITH_CCACHE_BUILD
Message-ID:  <5644CF1C.9020709@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5644CF1C.9020709>