zig/lib
Andrew Kelley 252f4ab2a5 build system: implement lazy dependencies, part 1
Build manifest files support `lazy: true` for dependency sections.
This causes the auto-generated dependencies.zig to have 2 more
possibilities:
1. It communicates whether a dependency is lazy or not.
2. The dependency might be acknowledged, but missing due to being lazy
   and not fetched.

Lazy dependencies are not fetched by default, but if they are already
fetched then they are provided to the build script.

The build runner reports the set of missing lazy dependenices that are
required to the parent process via stdout and indicates the situation
with exit code 3.

std.Build now has a `lazyDependency` function. I'll let the doc comments
speak for themselves:

When this function is called, it means that the current build does, in
fact, require this dependency. If the dependency is already fetched, it
proceeds in the same manner as `dependency`. However if the dependency
was not fetched, then when the build script is finished running, the
build will not proceed to the make phase. Instead, the parent process
will additionally fetch all the lazy dependencies that were actually
required by running the build script, rebuild the build script, and then
run it again.
In other words, if this function returns `null` it means that the only
purpose of completing the configure phase is to find out all the other
lazy dependencies that are also required.
It is allowed to use this function for non-lazy dependencies, in which
case it will never return `null`. This allows toggling laziness via
build.zig.zon without changing build.zig logic.

The CLI for `zig build` detects this situation, but the logic for then
redoing the build process with these extra dependencies fetched is not
yet implemented.
2024-02-02 20:43:01 -07:00
..
compiler_rt Enable gnu_f16_abi on x86_64 2024-01-04 17:41:30 +02:00
docs Update styles in std docs to correct display glitch 2024-01-12 16:25:55 -08:00
include update C language headers to LLVM 17 2023-09-19 09:37:31 -07:00
init Grammar fixes (#18320) 2023-12-20 13:17:15 +02:00
libc mingw-w64: remove msvcrt sources 2024-01-20 00:21:34 +00:00
libcxx update libcxx to latest LLVM release/17.x 2023-09-19 09:37:53 -07:00
libcxxabi libcxxabi: update to LLVM 17 2023-09-19 09:37:31 -07:00
libunwind libunwind: update to LLVM 17 2023-09-19 09:37:31 -07:00
std build system: implement lazy dependencies, part 1 2024-02-02 20:43:01 -07:00
tsan tsan: update rtl files to LLVM 17.0.6 2024-01-10 01:00:37 -07:00
build_runner.zig build system: implement lazy dependencies, part 1 2024-02-02 20:43:01 -07:00
c.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
compiler_rt.zig move libssp into libcompiler_rt 2023-11-10 13:12:10 -07:00
test_runner.zig wasm: re-enable regressed tests 2023-11-01 19:47:15 +01:00
zig.h cbe: fix non-msvc externs and exports 2024-01-03 02:52:25 -05:00