mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
fix two standalone tests on windows
This commit is contained in:
@@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void {
|
||||
|
||||
const optimize: std.builtin.OptimizeMode = .Debug;
|
||||
|
||||
if (builtin.os.tag == .windows and std.process.hasEnvVarConstant("ConEmuHWND")) {
|
||||
if (builtin.os.tag == .windows and b.graph.environ_map.contains("ConEmuHWND")) {
|
||||
// ConEmu injects environment variables into processes before they are executed
|
||||
// depending on user settings. This obviously invalidates the test, so skipping
|
||||
// it is the best option.
|
||||
|
||||
@@ -67,7 +67,7 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
// Only target the MSVC ABI if MSVC/Windows SDK is available
|
||||
const has_msvc = has_msvc: {
|
||||
const sdk = std.zig.WindowsSdk.find(b.allocator, b.graph.io, builtin.cpu.arch) catch |err| switch (err) {
|
||||
const sdk = std.zig.WindowsSdk.find(b.allocator, b.graph.io, builtin.cpu.arch, &b.graph.environ_map) catch |err| switch (err) {
|
||||
error.OutOfMemory => @panic("oom"),
|
||||
else => break :has_msvc false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user