diff options
| -rw-r--r-- | build.zig | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -363,8 +363,15 @@ pub fn build(b: *std.Build) void { web_step.dependOn(&b.addInstallFileWithDir(html, .{ .custom = "web" }, "index.html").step); b.getInstallStep().dependOn(web_step); } else { + // binary name: the native-shaped linux-x86_64 tty build stays `pardes` + // (the snap suite and e2e harness drive zig-out/bin/pardes); the gui + // shell gets its own name so it no longer clobbers the tty binary, + // and any non linux-x86_64 target carries os-arch in the name. + var exe_name: []const u8 = if (platform == .gui) "pardes-gui" else "pardes"; + if (target.result.os.tag != .linux or target.result.cpu.arch != .x86_64) + exe_name = b.fmt("{s}-{s}-{s}", .{ exe_name, @tagName(target.result.os.tag), @tagName(target.result.cpu.arch) }); const exe = b.addExecutable(.{ - .name = "pardes", + .name = exe_name, .linkage = if (static) .static else null, .root_module = root_mod, }); |
