summaryrefslogtreecommitdiff
path: root/9proc/build.zig
diff options
context:
space:
mode:
Diffstat (limited to '9proc/build.zig')
-rw-r--r--9proc/build.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/9proc/build.zig b/9proc/build.zig
index 43176d7..cf32886 100644
--- a/9proc/build.zig
+++ b/9proc/build.zig
@@ -21,9 +21,8 @@ pub const Context = struct {
};
pub const Artifacts = struct {
- /// The `9proc` module, exported with `b.addModule` so dependents of
- /// cloud9 can `.module("9proc")`. Built for any target; the Linux
- /// layer is compiled in only when the target OS is Linux.
+ /// The `9proc` module for `target`: the Linux layer is compiled in
+ /// only when the target OS is Linux.
module: *std.Build.Module,
/// The demo 9P2000 server (binary `9proc-demo`); null when the target is
/// not Linux. 9ns's integration tests use it as their server.
@@ -59,8 +58,9 @@ pub fn add(b: *std.Build, ctx: Context) Artifacts {
build_options.addOption([]const u8, "target", target.result.zigTriple(b.allocator) catch "unknown");
// The library: freestanding core + vars, scratch (allocator), Linux layer.
- // Exported under the name `9proc` for packages that depend on cloud9.
- const lib_mod = b.addModule("9proc", .{
+ // This copy is for `target`; packages that depend on cloud9 get the one
+ // the root exports, which has no target of its own.
+ const lib_mod = b.createModule(.{
.root_source_file = b.path("9proc/src/root.zig"),
.target = target,
.optimize = optimize,