Skip to content

Commit ba1e53f

Browse files
committed
avoid triggering LLVM bug on MIPS
See #13782
1 parent 8248fdb commit ba1e53f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/std/http/Client.zig

+7
Original file line numberDiff line numberDiff line change
@@ -551,5 +551,12 @@ pub fn request(client: *Client, url: Url, headers: Request.Headers, options: Req
551551
}
552552

553553
test {
554+
const builtin = @import("builtin");
555+
const native_endian = comptime builtin.cpu.arch.endian();
556+
if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) {
557+
// https://github.com/ziglang/zig/issues/13782
558+
return error.SkipZigTest;
559+
}
560+
554561
_ = Request;
555562
}

test/behavior/bitcast.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn testBitCastuXToBytes(comptime N: usize) !void {
109109
const bytes = std.mem.asBytes(&x);
110110

111111
const byte_count = (N + 7) / 8;
112-
switch (builtin.cpu.arch.endian()) {
112+
switch (native_endian) {
113113
.Little => {
114114
var byte_i = 0;
115115
while (byte_i < (byte_count - 1)) : (byte_i += 1) {
@@ -333,7 +333,7 @@ test "comptime @bitCast packed struct to int and back" {
333333
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
334334
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
335335

336-
if (comptime builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.endian() == .Big) {
336+
if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) {
337337
// https://github.com/ziglang/zig/issues/13782
338338
return error.SkipZigTest;
339339
}

0 commit comments

Comments
 (0)