Skip to content

std.Target.Cpu.Arch.isAARCH64 is deprecated #49

Backlog

Description

@nikitalocalhost

As of zig 0.17.0 std.Target.Cpu.Arch.isAARCH64 is deprecated in favor of std.Target.Cpu.Arch.isAarch64 (as you can see because in 0.17.0 I link isAARCH64 and it resolves to isAarch64) and removed in zig 0.18.0-dev

So, because pull requests are disabled, here is git diff:

diff --git a/build.zig b/build.zig
index 761735485a..05be981394 100644
--- a/build.zig
+++ b/build.zig
@@ -118,7 +118,7 @@ pub fn build(b: *std.Build) void {
         const cpu = target.result.cpu;
         const x86 = cpu.arch.isX86();
         const arm = cpu.arch.isArm();
-        const aarch64 = cpu.arch.isAARCH64();
+        const aarch64 = cpu.arch.isAarch64();
         const loongarch = cpu.arch == .loongarch32 or cpu.arch == .loongarch64;
         break :build_config_h b.addConfigHeader(.{
             .style = .{ .cmake = b.path("include/build_config/SDL_build_config.h.cmake") },

as you can see it's very big /s, but without it compiler errors:

<PATH_TO_LIB>/zig-x86_64-linux-0.18.0-dev.1373+7d78b5fb5/lib/std/Target.zig:1743:31: error: Renamed to isAarch64
        pub const isAARCH64 = @compileError("Renamed to isAarch64");
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    build: build.zig:121:33
    runPackageScript [inlined]: <PATH_TO_LIB>/zig-x86_64-linux-0.18.0-dev.1373+7d78b5fb5/lib/std/Build.zig:2220:50
    main: <PATH_TO_LIB>/zig-x86_64-linux-0.18.0-dev.1373+7d78b5fb5/lib/compiler/configurer.zig:138:29
    4 reference(s) hidden; use '-freference-trace=7' to see all references

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions