diff options
Diffstat (limited to 'src/source_manifest.zig')
| -rw-r--r-- | src/source_manifest.zig | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/source_manifest.zig b/src/source_manifest.zig index e2cc312c..c3bfde88 100644 --- a/src/source_manifest.zig +++ b/src/source_manifest.zig @@ -15,18 +15,13 @@ //! Paths are as a user would type them, repo-root-relative, which is what //! `look` resolves a click against. -//! ON THE P4 the allowlist is EMPTY, and that is the whole difference: the -//! table is ~0.95 MiB of rodata against a 1.5 MiB flash partition, and the -//! firmware's filesystem is the serial host's, reached through the Host -//! vtable. The API is unchanged — `all` is a zero-length array and `find` -//! answers null — so every caller compiles identically and simply finds -//! nothing embedded. +const limits = @import("limits.zig"); pub const Source = struct { path: []const u8, contents: []const u8 }; -/// A slice, not an array: the P4 table is empty and every consumer only ever -/// iterates or takes `.len`. -pub const all: []const Source = if (@import("pardes_config").platform == .p4) &.{} else &allowlist; +/// A slice, not an array: the P4 table is empty (see `limits.embedded_sources` +/// for why) and every consumer only ever iterates or takes `.len`. +pub const all: []const Source = if (limits.embedded_sources) &allowlist else &.{}; const allowlist = [_]Source{ .{ .path = "build.zig", .contents = @embedFile("root-build.zig") }, |
