aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index 0571616..1debe5a 100644
--- a/build.zig
+++ b/build.zig
@@ -1,20 +1,22 @@
const std = @import("std");
+const CrossTarget = std.zig.CrossTarget;
+const Target = std.Target;
// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
// runner.
pub fn build(b: *std.Build) void {
- const riscv64_freestanding = std.zig.CrossTarget{
- .cpu_arch = std.Target.Cpu.Arch.riscv64,
- .os_tag = std.Target.Os.Tag.freestanding,
- .ofmt = std.Target.ObjectFormat.elf,
+ const riscv64_freestanding = CrossTarget{
+ .cpu_arch = Target.Cpu.Arch.riscv64,
+ .os_tag = Target.Os.Tag.freestanding,
+ .ofmt = Target.ObjectFormat.elf,
};
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
- const target = b.standardTargetOptions(.{ .whitelist = &[_]std.zig.CrossTarget{riscv64_freestanding}, .default_target = riscv64_freestanding });
+ const target = b.standardTargetOptions(.{ .whitelist = &[_]CrossTarget{riscv64_freestanding}, .default_target = riscv64_freestanding });
// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not