diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-04 20:46:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 17:51:18 -0700 |
| commit | ce94c28e53e706e506d4c95c25c8bf99e7a597eb (patch) | |
| tree | e2ef71ccf5c03a90be69958b5cc0775dba307ac9 /src/main.zig | |
| parent | 3e52302644e29fec3917385f2b998f53941f8376 (diff) | |
| download | zig-ce94c28e53e706e506d4c95c25c8bf99e7a597eb.tar.gz zig-ce94c28e53e706e506d4c95c25c8bf99e7a597eb.zip | |
resinator: update std.Target.Query usage
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig index 3abe6ed3e4..121b7515a8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4664,8 +4664,11 @@ fn detectRcIncludeDirs(arena: Allocator, zig_lib_dir: []const u8, auto_includes: while (true) { switch (cur_includes) { .any, .msvc => { - const target_query = std.Target.Query.parse(.{ .arch_os_abi = "native-windows-msvc" }) catch unreachable; - const target = target_query.toTarget(); + const target_query: std.Target.Query = .{ + .os_tag = .windows, + .abi = .msvc, + }; + const target = try std.zig.system.resolveTargetQuery(target_query); const is_native_abi = target_query.isNativeAbi(); const detected_libc = Compilation.detectLibCIncludeDirs(arena, zig_lib_dir, target, is_native_abi, true, null) catch |err| { if (cur_includes == .any) { @@ -4689,8 +4692,11 @@ fn detectRcIncludeDirs(arena: Allocator, zig_lib_dir: []const u8, auto_includes: }; }, .gnu => { - const target_query = std.Target.Query.parse(.{ .arch_os_abi = "native-windows-gnu" }) catch unreachable; - const target = target_query.toTarget(); + const target_query: std.Target.Query = .{ + .os_tag = .windows, + .abi = .gnu, + }; + const target = try std.zig.system.resolveTargetQuery(target_query); const is_native_abi = target_query.isNativeAbi(); const detected_libc = try Compilation.detectLibCIncludeDirs(arena, zig_lib_dir, target, is_native_abi, true, null); return .{ |
