mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
avoid depending on a zig1.wasm update
This commit is contained in:
parent
1741b821c3
commit
7802cf9814
1 changed files with 5 additions and 1 deletions
|
|
@ -636,6 +636,10 @@ 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,
|
||||
|
|
@ -643,7 +647,7 @@ const eqlBytes_allowed = switch (builtin.zig_backend) {
|
|||
.stage2_riscv64 => false,
|
||||
// The naive memory comparison implementation is more useful for fuzzers to
|
||||
// find interesting inputs.
|
||||
else => !builtin.fuzz,
|
||||
else => !fuzz,
|
||||
};
|
||||
|
||||
/// Compares two slices and returns whether they are equal.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue