authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-14 22:18:24 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-14 22:18:24 -07:00
log84a091c269cc2fdbe75289aed58d9534811d8850
tree284bbb3037351f469438976607d556aedb4093ae
parent5cbd21c04f25b44872a20e2c0a0647d64ae1d117

build: use -Dmode instead of -Doptimize


1 files changed, 2 insertions(+), 2 deletions(-)

build.zig+2-2
...@@ -5,11 +5,11 @@ const deps = @import("./deps.zig");...@@ -5,11 +5,11 @@ const deps = @import("./deps.zig");
55
6pub fn build(b: *std.build.Builder) void {6pub fn build(b: *std.build.Builder) void {
7 const target = b.standardTargetOptions(.{});7 const target = b.standardTargetOptions(.{});
8 const optimize = b.standardOptimizeOption(.{});8 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
9 const use_full_name = b.option(bool, "use-full-name", "") orelse false;9 const use_full_name = b.option(bool, "use-full-name", "") orelse false;
10 const with_arch_os = b.fmt("-{s}-{s}", .{ @tagName(target.cpu_arch orelse builtin.cpu.arch), @tagName(target.os_tag orelse builtin.os.tag) });10 const with_arch_os = b.fmt("-{s}-{s}", .{ @tagName(target.cpu_arch orelse builtin.cpu.arch), @tagName(target.os_tag orelse builtin.os.tag) });
11 const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" });11 const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" });
12 const exe = b.addExecutable(.{ .name = exe_name, .root_source_file = .{ .path = "src/main.zig" }, .target = target, .optimize = optimize });12 const exe = b.addExecutable(.{ .name = exe_name, .root_source_file = .{ .path = "src/main.zig" }, .target = target, .optimize = mode });
1313
14 const exe_options = b.addOptions();14 const exe_options = b.addOptions();
15 exe.addOptions("build_options", exe_options);15 exe.addOptions("build_options", exe_options);