BSDCan2016 - v1.1.24a

BSDCan 2016
The Technical BSD Conference

Speakers
Bryan Drewery
Schedule
Day Talks #1 - 10 June - 2016-06-10
Room DMS 1140
Start time 16:00
Duration 01:00
Info
ID 716
Event type Lecture
Track Hacking
Language used for presentation English

Improving the FreeBSD Build

Making it faster, more parallelized, smarter, cross-compilable, and more easily maintained

The FreeBSD build has largely gone unchanged in the past 20 years. There is a 'buildworld' with multiple redundant phases that bootstrap their way to building everything. This presentation will go over recent improvements and planned work.

The FreeBSD build has mostly seen small incremental improvements over the years and a lot of bitrot. Not many people are active today that understand all of the pieces involved in the build. While some recent work is moving towards a drastically new build, much of the work is also benefiting the historical buildworld which most people are used to and is likely to prevail. The ability to build a subset of the tree is a large goal of this effort since it is a big productivity loss for developers. Improving the speed of buildworld is being done while working towards the new build goals.

Recent improvements to be covered: * External toolchains. * More parallelization of buildworld and bsd.subdir.mk. * FASTDEPEND: Generating dependencies at compile time with GCC 3.0 flags rather than pre-processing files before compiling them and then pre-processing them again. This brings a 16% buildworld improvement and 35% to buildkernel. * Removing the need for 'make depend'. * CCACHEBUILD: Built-in ccache support. This brings up to 65% incremental build time improvement when combined with FASTDEPEND. * LIBADD and its improvements. * DIRDEPSBUILD (Presented by Simon Gerraty in 2014 as "meta mode") improvements, which bring reliable sub-directory builds. * Incremental build fixes for stealth dependencies. * WITHSYSTEMCOMPILER: Skipping building clang sometimes * WITHMETAMODE: reliable incremental buildworld

Planned work to be covered: * Adding more build-time assertions to ensure the framework is used properly, such as was done with great success in Ports. * Library over/under-link testing. * Building clang once for make universe * Reducing duplicated dependency logic and redundant phases in buildworld. * Foreign building, such as from OSX or Linux. * Ports cross-building without QEMU, as it is not always feasible to use it.