Some more build fixes
This commit is contained in:
parent
8da54fdb78
commit
9bf2f4d8a0
1 changed files with 6 additions and 9 deletions
15
build.zig
15
build.zig
|
@ -5,7 +5,7 @@ const rt = @import("test/runtime_test.zig");
|
|||
const RuntimeStep = rt.RuntimeStep;
|
||||
const Allocator = std.mem.Allocator;
|
||||
// const Builder = std.build.Builder;
|
||||
const Step = std.build.Step;
|
||||
const Step = std.Build.Step;
|
||||
const Target = std.Target;
|
||||
const CrossTarget = std.Target.Query;
|
||||
const fs = std.fs;
|
||||
|
@ -23,16 +23,13 @@ const x86_i686 = CrossTarget{
|
|||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{ .whitelist = &[_]CrossTarget{x86_i686}, .default_target = x86_i686 });
|
||||
const arch = switch (target.getCpuArch()) {
|
||||
.i386 => "x86",
|
||||
const arch = switch (target.query.cpu_arch.?) {
|
||||
.x86 => "x86",
|
||||
else => unreachable,
|
||||
};
|
||||
|
||||
const fmt_step = b.addFmt(&[_][]const u8{
|
||||
"build.zig",
|
||||
"mkfat32.zig",
|
||||
"src",
|
||||
"test",
|
||||
const fmt_step = b.addFmt(Step.Fmt.Options{
|
||||
.paths = &[_][]const u8{ "build.zig", "mkfat32.zig", "src", "test" },
|
||||
});
|
||||
b.default_step.dependOn(&fmt_step.step);
|
||||
|
||||
|
@ -47,7 +44,7 @@ pub fn build(b: *std.Build) !void {
|
|||
const fat32_image_path = try fs.path.join(b.allocator, &[_][]const u8{ b.install_path, "fat32.img" });
|
||||
const test_fat32_image_path = try fs.path.join(b.allocator, &[_][]const u8{ "test", "fat32", "test_fat32.img" });
|
||||
|
||||
const build_mode = b.standardReleaseOptions();
|
||||
const build_mode = b.standardOptimizeOption(.{});
|
||||
comptime var test_mode_desc: []const u8 = "\n ";
|
||||
inline for (@typeInfo(TestMode).Enum.fields) |field| {
|
||||
const tm = @field(TestMode, field.name);
|
||||
|
|
Loading…
Reference in a new issue