mirror of
https://github.com/ziglang/zig.git
synced 2025-02-09 22:20:17 +00:00
libc_installation.zig: don't special-case based on C ABI
Whether the C ABI is mingw-w64 or msvc, detection of native libc paths should be the same. In the future we may want to allow passing a C ABI parameter to detectNativeCPaths() but for now we have the same behavior regardless.
This commit is contained in:
parent
96ed544665
commit
e4eb817f79
@ -168,29 +168,22 @@ pub const LibCInstallation = struct {
|
||||
var self: LibCInstallation = .{};
|
||||
|
||||
if (is_windows) {
|
||||
if (is_gnu) {
|
||||
var batch = Batch(FindError!void, 3, .auto_async).init();
|
||||
batch.add(&async self.findNativeIncludeDirPosix(args));
|
||||
batch.add(&async self.findNativeCrtDirPosix(args));
|
||||
try batch.wait();
|
||||
} else {
|
||||
var sdk: *ZigWindowsSDK = undefined;
|
||||
switch (zig_find_windows_sdk(&sdk)) {
|
||||
.None => {
|
||||
defer zig_free_windows_sdk(sdk);
|
||||
var sdk: *ZigWindowsSDK = undefined;
|
||||
switch (zig_find_windows_sdk(&sdk)) {
|
||||
.None => {
|
||||
defer zig_free_windows_sdk(sdk);
|
||||
|
||||
var batch = Batch(FindError!void, 5, .auto_async).init();
|
||||
batch.add(&async self.findNativeMsvcIncludeDir(args, sdk));
|
||||
batch.add(&async self.findNativeMsvcLibDir(args, sdk));
|
||||
batch.add(&async self.findNativeKernel32LibDir(args, sdk));
|
||||
batch.add(&async self.findNativeIncludeDirWindows(args, sdk));
|
||||
batch.add(&async self.findNativeCrtDirWindows(args, sdk));
|
||||
try batch.wait();
|
||||
},
|
||||
.OutOfMemory => return error.OutOfMemory,
|
||||
.NotFound => return error.WindowsSdkNotFound,
|
||||
.PathTooLong => return error.WindowsSdkNotFound,
|
||||
}
|
||||
var batch = Batch(FindError!void, 5, .auto_async).init();
|
||||
batch.add(&async self.findNativeMsvcIncludeDir(args, sdk));
|
||||
batch.add(&async self.findNativeMsvcLibDir(args, sdk));
|
||||
batch.add(&async self.findNativeKernel32LibDir(args, sdk));
|
||||
batch.add(&async self.findNativeIncludeDirWindows(args, sdk));
|
||||
batch.add(&async self.findNativeCrtDirWindows(args, sdk));
|
||||
try batch.wait();
|
||||
},
|
||||
.OutOfMemory => return error.OutOfMemory,
|
||||
.NotFound => return error.WindowsSdkNotFound,
|
||||
.PathTooLong => return error.WindowsSdkNotFound,
|
||||
}
|
||||
} else {
|
||||
try blk: {
|
||||
|
Loading…
Reference in New Issue
Block a user