build2 build system
build2 is an open source (MIT), cross-platform build toolchain that provides
sufficient depth and flexibility to develop and package complex C/C++
projects. The toolchain is a hierarchy of tools consisting of a
general-purpose build system, package manager (for package consumption), and
project manager (for project development). This package contains the build2
build system.
For more information refer to the build2 home page and
the build2 project organization on GitHub.
This README file contains information that is more appropriate for
development or packaging of build2. If you simply want to install and use
it, then rather refer to the installation
instructions. Note also that the packaged
development snapshots are
available as well.
Depends (1)
Requires (1)
Builds
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-static_O3 |
| timestamp |
2026-05-12 14:14:06 UTC (07:34:35 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++-static_O3 |
| timestamp |
2026-05-12 14:13:11 UTC (07:35:31 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++-O3 |
| timestamp |
2026-05-12 14:05:59 UTC (07:42:42 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-ndebug_O3 |
| timestamp |
2026-05-12 14:03:15 UTC (07:45:26 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++ |
| timestamp |
2026-05-12 13:52:24 UTC (07:56:17 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-O3 |
| timestamp |
2026-05-12 13:40:10 UTC (08:08:31 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18-static_O3 |
| timestamp |
2026-05-12 13:39:44 UTC (08:08:57 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18-O3 |
| timestamp |
2026-05-12 13:30:50 UTC (08:17:51 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18 |
| timestamp |
2026-05-12 13:20:30 UTC (08:28:11 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14 |
| timestamp |
2026-05-12 13:19:49 UTC (08:28:53 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_15.2_mingw_w64-static_O2 |
| timestamp |
2026-05-12 13:00:37 UTC (08:48:04 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_15.2_mingw_w64-O2 |
| timestamp |
2026-05-12 12:56:42 UTC (08:51:59 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_15.2_mingw_w64 |
| timestamp |
2026-05-12 12:50:36 UTC (08:58:05 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_fedora_44-gcc_16-bindist |
| timestamp |
2026-05-12 11:58:21 UTC (09:50:20 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew-static_O3 |
| timestamp |
2026-05-12 11:42:01 UTC (10:06:40 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew-O3 |
| timestamp |
2026-05-12 11:37:54 UTC (10:10:47 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew |
| timestamp |
2026-05-12 11:31:46 UTC (10:16:55 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++-static_O3 |
| timestamp |
2026-05-12 11:25:27 UTC (10:23:14 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++-O3 |
| timestamp |
2026-05-12 11:22:35 UTC (10:26:06 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++ |
| timestamp |
2026-05-12 11:17:58 UTC (10:30:43 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22-static_O3 |
| timestamp |
2026-05-12 10:43:45 UTC (11:04:56 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22-O3 |
| timestamp |
2026-05-12 10:40:42 UTC (11:07:59 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22 |
| timestamp |
2026-05-12 10:34:55 UTC (11:13:46 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-static_O3 |
| timestamp |
2026-05-12 10:20:44 UTC (11:27:58 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-ndebug_O3 |
| timestamp |
2026-05-12 10:17:40 UTC (11:31:01 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0-static_O3 |
| timestamp |
2026-05-12 10:14:10 UTC (11:34:31 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-O3 |
| timestamp |
2026-05-12 10:13:15 UTC (11:35:26 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_9_tsan-gcc_7.4 |
| timestamp |
2026-05-12 10:12:06 UTC (11:36:35 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0-O3 |
| timestamp |
2026-05-12 10:10:16 UTC (11:38:25 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16 |
| timestamp |
2026-05-12 10:08:27 UTC (11:40:15 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19-static_O3 |
| timestamp |
2026-05-12 10:07:45 UTC (11:40:56 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19-O3 |
| timestamp |
2026-05-12 10:04:32 UTC (11:44:10 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0 |
| timestamp |
2026-05-12 10:04:28 UTC (11:44:13 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21_libc++ |
| timestamp |
2026-05-12 10:04:18 UTC (11:44:23 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11_tsan-gcc_11.3 |
| timestamp |
2026-05-12 10:02:03 UTC (11:46:38 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.0 |
| tgt config |
windows_10-msvc_14.3 |
| timestamp |
2026-05-12 09:59:20 UTC (11:49:21 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11_asan-gcc_11.3 |
| timestamp |
2026-05-12 09:59:11 UTC (11:49:31 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19 |
| timestamp |
2026-05-12 09:59:09 UTC (11:49:32 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21 |
| timestamp |
2026-05-12 09:57:57 UTC (11:50:45 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_ubuntu_24.04-gcc_13-bindist |
| timestamp |
2026-05-12 09:54:18 UTC (11:54:23 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15-O3 |
| timestamp |
2026-05-12 09:50:04 UTC (11:58:37 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_12-gcc_12-bindist |
| timestamp |
2026-05-12 09:49:49 UTC (11:58:52 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.1 |
| tgt config |
windows_10-msvc_15.9 |
| timestamp |
2026-05-12 09:48:43 UTC (11:59:59 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11_tsan-clang_14.0 |
| timestamp |
2026-05-12 09:48:15 UTC (12:00:26 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11_asan-clang_14.0 |
| timestamp |
2026-05-12 09:45:13 UTC (12:03:28 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.2 |
| tgt config |
windows_10_devmode-msvc_16.11 |
| timestamp |
2026-05-12 09:43:32 UTC (12:05:09 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_fedora_43-gcc_15-bindist |
| timestamp |
2026-05-12 09:42:36 UTC (12:06:05 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15 |
| timestamp |
2026-05-12 09:42:31 UTC (12:06:10 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.2 |
| tgt config |
windows_10-msvc_16.11 |
| timestamp |
2026-05-12 09:42:09 UTC (12:06:32 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11-gcc_10.2-bindist |
| timestamp |
2026-05-12 09:41:55 UTC (12:06:46 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14 |
| timestamp |
2026-05-12 09:38:58 UTC (12:09:43 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_rhel_9-gcc_11-bindist |
| timestamp |
2026-05-12 09:38:30 UTC (12:10:11 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_ubuntu_16.04-clang_3.7_libc++ |
| timestamp |
2026-05-12 09:37:51 UTC (12:10:50 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_9-gcc_7.4 |
| timestamp |
2026-05-12 09:36:27 UTC (12:12:14 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_rhel_8-gcc_8-bindist |
| timestamp |
2026-05-12 09:36:27 UTC (12:12:15 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11-gcc_11.3 |
| timestamp |
2026-05-12 09:33:13 UTC (12:15:28 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_8-gcc_4.9 |
| timestamp |
2026-05-12 09:32:29 UTC (12:16:12 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_10-gcc_9.3 |
| timestamp |
2026-05-12 09:32:11 UTC (12:16:30 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_13 |
| timestamp |
2026-05-12 09:31:11 UTC (12:17:30 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-freebsd14.1 |
| tgt config |
freebsd_14-clang_18 |
| timestamp |
2026-05-12 09:29:17 UTC (12:19:24 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_10-gcc_10.2 |
| timestamp |
2026-05-12 09:28:54 UTC (12:19:47 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-apple-darwin22.5.0 |
| tgt config |
macos_13-clang_15.0 |
| timestamp |
2026-05-12 09:27:55 UTC (12:20:46 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_9-gcc_8.4 |
| timestamp |
2026-05-12 09:21:37 UTC (12:27:04 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_12-gcc_13.1 |
| timestamp |
2026-05-12 09:18:19 UTC (12:30:22 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_11-gcc_12.1 |
| timestamp |
2026-05-12 09:17:57 UTC (12:30:44 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_ubuntu_26.04-gcc_15-bindist |
| timestamp |
2026-05-12 09:04:34 UTC (12:44:07 hours ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18-static_O2 |
| timestamp |
2026-05-11 08:34:09 UTC (01 13:14:32 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18-static_O2 |
| timestamp |
2026-05-11 08:31:06 UTC (01 13:17:35 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18-O2 |
| timestamp |
2026-05-11 08:30:42 UTC (01 13:17:59 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18-O2 |
| timestamp |
2026-05-11 08:28:15 UTC (01 13:20:26 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18 |
| timestamp |
2026-05-11 08:24:59 UTC (01 13:23:42 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18 |
| timestamp |
2026-05-11 08:24:14 UTC (01 13:24:28 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-microsoft-win32-msvc14.3 |
| tgt config |
windows_10-msvc_17 |
| timestamp |
2026-05-11 08:05:34 UTC (01 13:43:07 days ago) |
| result |
success | log | rebuild |
| toolchain |
stage-0.19.0-a.0.20260504094417.3d3afbade0c6 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_14-bindist |
| timestamp |
2026-05-11 07:27:24 UTC (01 14:21:17 days ago) |
| result |
success | log | rebuild |
Changes
Version 0.18.0
* Support for `while`-loop in the Buildfile language.
See the "Buildfile Language" section in the manual for details.
* Support for `continue` and `break` in loops in the Buildfile and scripting
languages.
* `ifn` and `ife` shortcuts in the Buildfile and scripting languages.
These flow control shortcuts allow more succinct expression of is/is-not
\c{null} and empty checks. They are equivalent to the following more
verbose expressions:
ifn ... ~ if $null(...)
ife ... ~ if $empty(...)
ifn! ... ~ if! $null(...)
ife! ... ~ if! $empty(...)
elifn ... ~ elif $null(...)
elife ... ~ elif $empty(...)
elifn! ... ~ elif! $null(...)
elife! ... ~ elif! $empty(...)
* New Buildfile and scripting language functions:
- $front(), $back() and $json.array_front(), $json.array_back()
Return first/last element in a sequence.
- $sha256sum(), $xxh64sum()
Compute SHA256 and XXH64 checksums of a string.
- $builtin.generate_uuid()
Generate UUID.
- $string.{compare,filter,filter_out}()
Compare or filter/filter out strings.
There is now also support for the `contains`, `contains_once`,
`starts_with`, and `ends_with` flags in $string.{find,find_index}().
- $process.search()
Search in PATH to determine absolute executable path.
* New scripting languages builtins:
- sha256sum
Compute SHA256 checksum of a file or stdin.
- xxh64sum
Compute XXH64 checksum of a file or stdin.
Also, the `ln` builtin now supports creating hard links in addition to
symbolic.
* New json{} builtin target type.
It represents a JSON text file and has the .json default extension.
* Shell script and task runner executable.
The portable scripting language that is used for buildfile recipes
(Buildscript) and test scripts (Testscript) has been generalized to also
provide a general-purpose shell scripting flavor (Shellscript). Such shell
scripts can be executed with the `bx` executable which is now provided
alongside the build system driver (`b`). See the bx(1) man page for
details.
* Buildscript/Testscript/Shellscript syntax version 2.
The version 2 is an improved syntax that should be used in new projects.
Existing projects should also be eventually migrated to the new syntax.
The syntax changes in version 2 compared to version 1 are:
- Flow-control constructs (`if`, `for`, etc) are no longer terminated with
the `end` line. Instead, the commands inside need to be enclosed into
curly braces, which can be omitted for a single command. For example,
syntax 1:
if true
echo one
echo two
end
if true
echo one
end
Syntax 2:
if true
{
echo one
echo two
}
if true
echo one
- Testscript groups are now enclosed into double curly braces ({{ }}).
For example, syntax 1:
: basics
:
{
: test1
:
$* test1
: test2
:
$* test2
}
Syntax 2:
: basics
:
{{
: test1
:
$* test1
: test2
:
$* test2
}}
- Testscript commands in explicit test scopes are no longer separated with
semicolons. For example, syntax 1:
: test1
:
{
$* pre;
$* test1;
$* post
}
Syntax 2:
: test1
:
{
$* pre
$* test1
$* post
}
The syntax version is selected based on the project's build2 version
constraint in the manifest (`depends: build2 >= X.Y.Z`). Specifically, if
the required version is equal to or great than 0.18.0, then syntax 2 is
automatically selected. Otherwise, version 1 is used for backwards
compatibility.
The desired syntax can also be specified explicitly, both at the buildfile
and script levels, with the {shellscript,buildscript,testscript}.syntax
variables. For example:
# root.build
#
testscript.syntax = 1
* Support for JSON compilation database generation and maintenance.
See the "Compilation Database" section in the "cc Module" chapter of
the manual for details.
* Support for specifying compile options on exe/lib{} targets
It is now possible to specify compile option (*.poptions and *.coptions)
on the exe/lib{} targets (we call them "binary-specific compile
options"). Such options are propagated to obj/bmi{} targets that are
synthesized for source prerequisites of the binary. Note that this
propagation does not apply to explicit (non-synthesized) obj/bmi{}
prerequisites. For example:
exe{foo}: cxx{foo} obj{common}
{
cxx.poptions += -DFOO
}
exe{bar}: cxx{bar} obj{common}... More