diff options
author | Himbeer <himbeerserverde@gmail.com> | 2024-03-26 12:46:22 +0100 |
---|---|---|
committer | Himbeer <himbeerserverde@gmail.com> | 2024-03-26 12:46:22 +0100 |
commit | 6aecb564dd79777c5a67db478e023180e16e3803 (patch) | |
tree | 001d3196e7a153f74fff3339da84f338043ab011 /build.zig | |
parent | 25d0448bdb1160b2d06786c40d4d0a6ac1d98b59 (diff) |
use imports for smaller type identifiers
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |