build.zig: Also set code model for loongarch32.

This issue applies to both loongarch32 and loongarch64.
This commit is contained in:
Alex Rønne Petersen 2024-12-07 16:58:28 +01:00
parent 4894ac4bcb
commit 1f95e3d9cd

View file

@ -667,11 +667,11 @@ fn addCompilerStep(b: *std.Build, options: AddCompilerStepOptions) *std.Build.St
//
// relocation R_LARCH_B26 out of range
//
// error when linking a loongarch64 zig binary.
// error when linking a loongarch32/loongarch64 zig binary.
//
// Here we explicitly set code model to `medium' to avoid this
// error.
.loongarch64 => .medium,
.loongarch32, .loongarch64 => .medium,
else => .default,
},
});