summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 23:24:22 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit97a55ab32adf7e65494fd9f23d7f973798bb646a (patch)
tree538cdb2a3efc68115b837f4f1c7845292d87151c /build.zig
parentf0c947bd1b1e6e172b11f007d7bdeff2d6599e03 (diff)
downloadpardes-97a55ab32adf7e65494fd9f23d7f973798bb646a.tar.gz
pardes-97a55ab32adf7e65494fd9f23d7f973798bb646a.zip
The board image links again: sources are no longer embedded by default on esp32p4
uzksuumxruzr turned -Dembed-sources on for esp32p4 (before it, the board was the one build without them). The sources are ~1.8 MB against a 1.5 MiB app partition, so the object built but the firmware did not link: .flash.rodata overflowed by 786392 bytes and .flash.text by 1732312. Default off everywhere; -Dembed-sources=true still embeds them. Without them the image is 1459760 B, 113104 B under 1.5 MiB. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 4a478ac5..b3382d4b 100644
--- a/build.zig
+++ b/build.zig
@@ -109,7 +109,9 @@ pub fn build(b: *std.Build) void {
ninep_options.addOption(bool, "quic", enable_quic);
const enable_mupdf = b.option(bool, "mupdf", "native PDF rendering with MuPDF (AGPL/commercial; native default on, web/esp32p4 off; -Dmupdf=false disables)") orelse !freestanding_core;
const enable_jpx = b.option(bool, "jpx", "JPEG 2000 in PDFs, for scanned documents (default on; -Djpx=false drops openjpeg)") orelse true;
- const embed_sources = b.option(bool, "embed-sources", "serve the editor's own sources under /src of its 9P tree (default off; on for -Dplatform=esp32p4, whose only source is the device)") orelse is_esp32p4;
+ // Off on the board too: the sources are ~1.8 MB, more than the whole
+ // 1.5 MiB app partition, and with them the image does not link.
+ const embed_sources = b.option(bool, "embed-sources", "serve the editor's own sources under /src of its 9P tree (default off; the esp32p4 image has no room for them)") orelse false;
const is_web_target = target.result.cpu.arch == .wasm32 and target.result.os.tag == .freestanding;
const is_esp32p4_target = target.result.cpu.arch == .riscv32 and target.result.os.tag == .freestanding;
const optimize = if (is_web)