fix: build.zig

* can use .ReleaseFast shortcut
* string format the new way
This commit is contained in:
rvcas 2021-06-06 00:48:14 -04:00
parent e56559993f
commit 99db511481

View File

@ -1,16 +1,15 @@
const builtin = @import("builtin");
const std = @import("std");
const mem = std.mem;
const Builder = std.build.Builder;
pub fn build(b: *Builder) void {
// b.setPreferredReleaseMode(builtin.Mode.Debug);
b.setPreferredReleaseMode(builtin.Mode.ReleaseFast);
// b.setPreferredReleaseMode(builtin.Mode.Debug
b.setPreferredReleaseMode(.ReleaseFast);
const mode = b.standardReleaseOptions();
// Options
const fallback_main_path = "./src/main.zig";
const main_path_desc = b.fmt("Override path to main.zig. Used by \"ir\" and \"test\". Defaults to \"{}\". ", .{fallback_main_path});
const main_path_desc = b.fmt("Override path to main.zig. Used by \"ir\" and \"test\". Defaults to \"{s}\". ", .{fallback_main_path});
const main_path = b.option([]const u8, "main-path", main_path_desc) orelse fallback_main_path;
// Tests