Skip to content

Commit

Permalink
stage2: support being built in ReleaseSafe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Sep 14, 2022
1 parent 349d78a commit 0a89624
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Air.zig
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ pub const Inst = struct {
// bigger than expected. Note that in Debug builds, Zig is allowed
// to insert a secret field for safety checks.
comptime {
if (builtin.mode != .Debug) {
if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) {
assert(@sizeOf(Data) == 8);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Zir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@ pub const Inst = struct {
// bigger than expected. Note that in Debug builds, Zig is allowed
// to insert a secret field for safety checks.
comptime {
if (builtin.mode != .Debug) {
if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) {
assert(@sizeOf(Data) == 8);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/arch/aarch64/Mir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ pub const Inst = struct {
// Make sure we don't accidentally make instructions bigger than expected.
// Note that in Debug builds, Zig is allowed to insert a secret field for safety checks.
comptime {
if (builtin.mode != .Debug) {
if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) {
assert(@sizeOf(Data) == 8);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/arch/arm/Mir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ pub const Inst = struct {
// Make sure we don't accidentally make instructions bigger than expected.
// Note that in Debug builds, Zig is allowed to insert a secret field for safety checks.
comptime {
if (builtin.mode != .Debug) {
if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) {
assert(@sizeOf(Data) == 8);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/arch/sparc64/Mir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ pub const Inst = struct {
// Make sure we don't accidentally make instructions bigger than expected.
// Note that in Debug builds, Zig is allowed to insert a secret field for safety checks.
comptime {
if (builtin.mode != .Debug) {
if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) {
assert(@sizeOf(Data) == 8);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/Mir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ pub const Inst = struct {
// Make sure we don't accidentally make instructions bigger than expected.
// Note that in Debug builds, Zig is allowed to insert a secret field for safety checks.
comptime {
if (builtin.mode != .Debug) {
if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) {
assert(@sizeOf(Data) == 8);
}
}
Expand Down

0 comments on commit 0a89624

Please sign in to comment.