diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 13:04:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 13:06:13 -0300 |
| commit | f44744d8bfce2f94cae9a658c416a3c2a0364a6a (patch) | |
| tree | 0a76dbc20b8fefa01c409bfb44dcfdee27dab463 /9proc/src/linux/runtime.zig | |
| parent | 9dd6f001c7d5eee987cbd305a79d1b1d011b83f5 (diff) | |
| download | cloud9-f44744d8bfce2f94cae9a658c416a3c2a0364a6a.tar.gz cloud9-f44744d8bfce2f94cae9a658c416a3c2a0364a6a.zip | |
build: a library's part for a consumer, and no more
A package that depends on cloud9 ran all of its build(): the tests, 9web,
the probes and the three program fragments, with the jj and the date
9proc's fragment spawns at configure, and it had to pass .target and
.optimize, since the module carried both (one forgotten, cloud9 was Debug
inside a release build). Now build() exports two modules with no target
or optimize of their own, which take their importer's (std.Build.Module's
CreateOptions: unspecified options are inherited): cloud9, and 9proc
beside it at the top level, then returns when it is not the root
(b.isRoot()). A consumer writes b.dependency("cloud9", .{}).module("cloud9").
The root's tests and programs root a compilation on the library, which
needs a target, so they make their own module from the same file: the
five lines the module took before, now a createModule, and 9proc's
fragment makes its copy with createModule where it exported with
addModule (no line more).
The target and optimize options are still declared before the return:
pardes and sketchbook pass both today, and an undeclared option a
dependency is given is logged as "invalid option" (target, cpu and
optimize) with a stack trace on every configure of theirs (not fatal:
Build.dependencyResolved reports it, only the root's invalid options
exit, compiler/configurer.zig:146-158; seen in a consumer: rc 0, three
errors). The comment says to move both under the return once they pass
nothing.
zig build test 106 of 108 at load 15 (serve's "a ticket of a hung-up
client" and "repeated connect/disconnect", the two known to fail under
load; see the next change for quiet runs); install into a scratch prefix
builds 9web, 9ns, 9agents, 9proc-demo and cloud9-probe as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to '9proc/src/linux/runtime.zig')
0 files changed, 0 insertions, 0 deletions
