Skip to content

Commit

Permalink
std.mem: delete workaround now that zig1.wasm is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Jul 22, 2024
1 parent 86d8f38 commit a2fdc16
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/std/mem.zig
Original file line number Diff line number Diff line change
Expand Up @@ -636,18 +636,14 @@ test lessThan {
try testing.expect(lessThan(u8, "", "a"));
}

/// Normally, we could simply use `builtin.fuzz` but this requires a zig1.wasm
/// update. After the next zig1.wasm update, the `@hasDecl` can be removed.
const fuzz = @hasDecl(builtin, "fuzz") and builtin.fuzz;

const eqlBytes_allowed = switch (builtin.zig_backend) {
// The SPIR-V backend does not support the optimized path yet.
.stage2_spirv64 => false,
// The RISC-V does not support vectors.
.stage2_riscv64 => false,
// The naive memory comparison implementation is more useful for fuzzers to
// find interesting inputs.
else => !fuzz,
else => !builtin.fuzz,
};

/// Compares two slices and returns whether they are equal.
Expand Down

0 comments on commit a2fdc16

Please sign in to comment.