mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
build: fix error in standalone test when using --release
Co-authored-by: Carl Åstholm <carl@astholm.se>
This commit is contained in:
parent
bb29846732
commit
dea3ed7f59
@ -10,7 +10,14 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
const none_specified_mod = none_specified.module("dummy");
|
||||
if (!none_specified_mod.resolved_target.?.query.eql(b.graph.host.query)) return error.TestFailed;
|
||||
if (none_specified_mod.optimize.? != .Debug) return error.TestFailed;
|
||||
const expected_optimize: std.builtin.OptimizeMode = switch (b.release_mode) {
|
||||
.off => .Debug,
|
||||
.any => unreachable,
|
||||
.fast => .ReleaseFast,
|
||||
.safe => .ReleaseSafe,
|
||||
.small => .ReleaseSmall,
|
||||
};
|
||||
if (none_specified_mod.optimize.? != expected_optimize) return error.TestFailed;
|
||||
|
||||
// Passing null is the same as not specifying the option,
|
||||
// so this should resolve to the same cached dependency instance.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user