From 97a55ab32adf7e65494fd9f23d7f973798bb646a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 23:24:22 -0300 Subject: 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 --- build.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build.zig') 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) -- cgit v1.3