Skip to content

Commit

Permalink
resinator: update std.Target.Query usage
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Dec 5, 2023
1 parent cbed4e2 commit a5cc086
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 .{
Expand Down

0 comments on commit a5cc086

Please sign in to comment.