diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -13,6 +13,18 @@ const display_version = if (std.mem.endsWith(u8, zon.version, ".0") and std.mem. else zon.version; +/// Every dependency the manifest pins, by its content hash: a grammar, +/// ghostty or the Unicode tables steps a core differently, so they are part +/// of a replica's semantics hash (src/detached/wire.zig `semantics`). +const deps_text = blk: { + var text: []const u8 = ""; + for (@typeInfo(@TypeOf(zon.dependencies)).@"struct".field_names) |name| { + const dep = @field(zon.dependencies, name); + text = text ++ name ++ " " ++ (if (@hasField(@TypeOf(dep), "hash")) dep.hash else "path") ++ "\n"; + } + break :blk text; +}; + pub const Platform = enum { tty, gui, web, macos, esp32p4 }; const PerfBuild = struct { @@ -2120,6 +2132,7 @@ fn shellOptions(b: *std.Build, cfg: ShellConfig, platform: Platform) *std.Build. // ...and the commit it was built from, when there is one and the build // is stamped at all (see `stamp_commit`). Read at configure time. o.addOption(?[]const u8, "commit", cfg.commit); + o.addOption([]const u8, "deps", deps_text); return o; } |
