diff options
| author | kcbanner <kcbanner@gmail.com> | 2023-09-21 02:26:05 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-27 04:07:12 -0700 |
| commit | 70563aeac3e9efee7e8fb24744bc97197fc0ca9b (patch) | |
| tree | fc58b7cf3ee8340c46c13a4569caeb3651741d8e /test | |
| parent | de4d1ea250f37c03cf2eec6c6bdf7436c8816893 (diff) | |
| download | zig-70563aeac3e9efee7e8fb24744bc97197fc0ca9b.tar.gz zig-70563aeac3e9efee7e8fb24744bc97197fc0ca9b.zip | |
windows: fix not finding system libs when compiling for *-windows-msvc
When compiling for *-windows-msvc, find the native libc_installation and
add the lib dirs to lib_dirs, so that system libs can be found.
Previously, `version` and `ole32` were detected via the mingw.libExists logic,
even on .msvc, which was a false positive. This detection logic for mingw doesn't
find uuid.lib, which was the failure that triggered this bugfix.
Only build the issue_5825 test if the native target is x86_64-windows-msvc,
since it requires the .msvc abi.
Diffstat (limited to 'test')
| -rw-r--r-- | test/standalone/issue_5825/build.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/standalone/issue_5825/build.zig b/test/standalone/issue_5825/build.zig index 9a790f6bb9..a657317539 100644 --- a/test/standalone/issue_5825/build.zig +++ b/test/standalone/issue_5825/build.zig @@ -1,9 +1,13 @@ +const builtin = @import("builtin"); const std = @import("std"); pub fn build(b: *std.Build) void { const test_step = b.step("test", "Test it"); b.default_step = test_step; + // Building for the msvc abi requires a native MSVC installation + if (builtin.os.tag != .windows or builtin.cpu.arch != .x86_64) return; + const target = .{ .cpu_arch = .x86_64, .os_tag = .windows, |
