diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-08 20:58:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-08 21:48:19 -0300 |
| commit | 97568ff864876098579f5510624ae92995404d75 (patch) | |
| tree | 8d56d654039f6ef5ef859da1241c8506a52eb03a /src | |
| parent | 9a7eb67ba60fed36a65db3d68ab22abf40807682 (diff) | |
| download | pardes-97568ff864876098579f5510624ae92995404d75.tar.gz pardes-97568ff864876098579f5510624ae92995404d75.zip | |
fix: a build with the addons compiled in (any off Linux, the static step) and -Dpdf=false did not compile, Addon.zig importing a pdf_addon the build had not made: the builtin_addons options say whether the pdf addon is built, and without it the image addon is compiled in alone; an aarch64-macos -Dpdf=false compile no longer names pdf_addon (its one error left is daemon.zig's darwin CMSG_CLOEXEC, a break of its own)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src')
| -rw-r--r-- | src/Addon.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Addon.zig b/src/Addon.zig index 67939f57..fa41f774 100644 --- a/src/Addon.zig +++ b/src/Addon.zig @@ -179,7 +179,13 @@ var nfound: usize = 0; /// the image and pdf modules' `pardes_addon` declarations, which only a /// library exports. A static binary cannot dlopen, and the loader below /// is Linux's (a memfd): this is how either has image and PDF panes. -const compiled_in: []const *const Kind.Ops = if (@import("builtin_addons").on) &.{ &@import("image_addon").pardes_addon, &@import("pdf_addon").pardes_addon } else &.{}; +/// A build with -Dpdf=false has the image addon alone. +const compiled_in: []const *const Kind.Ops = if (!@import("builtin_addons").on) + &.{} +else if (@import("builtin_addons").pdf) + &.{ &@import("image_addon").pardes_addon, &@import("pdf_addon").pardes_addon } +else + &.{&@import("image_addon").pardes_addon}; /// The addons compiled in, as if loaded (`builtin` their path); else every /// library of the two directories, in name order each, the user's first. A |
