Commit 1f95e3d9cd

Alex Rønne Petersen <alex@alexrp.com>
2024-12-07 16:58:28
build.zig: Also set code model for loongarch32.
This issue applies to both loongarch32 and loongarch64.
1 parent 4894ac4
Changed files (1)
build.zig
@@ -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,
         },
     });