mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 00:26:57 +00:00
Do not run asserts for WASI alignment when not targeting WASI
This commit is contained in:
parent
6ca4ed5948
commit
cc39ce28a1
@ -7,14 +7,16 @@ const std = @import("std");
|
||||
const assert = std.debug.assert;
|
||||
|
||||
comptime {
|
||||
assert(@alignOf(i8) == 1);
|
||||
assert(@alignOf(u8) == 1);
|
||||
assert(@alignOf(i16) == 2);
|
||||
assert(@alignOf(u16) == 2);
|
||||
assert(@alignOf(i32) == 4);
|
||||
assert(@alignOf(u32) == 4);
|
||||
// assert(@alignOf(i64) == 8);
|
||||
// assert(@alignOf(u64) == 8);
|
||||
if (builtin.os.tag == .wasi) {
|
||||
assert(@alignOf(i8) == 1);
|
||||
assert(@alignOf(u8) == 1);
|
||||
assert(@alignOf(i16) == 2);
|
||||
assert(@alignOf(u16) == 2);
|
||||
assert(@alignOf(i32) == 4);
|
||||
assert(@alignOf(u32) == 4);
|
||||
assert(@alignOf(i64) == 8);
|
||||
assert(@alignOf(u64) == 8);
|
||||
}
|
||||
}
|
||||
|
||||
pub const iovec_t = std.posix.iovec;
|
||||
|
Loading…
Reference in New Issue
Block a user