Skip to content

Commit

Permalink
remove unnecessary call to std.zig.system.resolveTargetQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix committed Jun 23, 2024
1 parent 2e5a2a5 commit 9a37d38
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/DocumentStore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,17 @@ pub fn collectIncludeDirs(
var arena_allocator = std.heap.ArenaAllocator.init(allocator);
defer arena_allocator.deinit();

const target_info = try std.zig.system.resolveTargetQuery(.{});
const target_info: std.Target = .{
.cpu = .{
.arch = builtin.cpu.arch,
.model = undefined,
.features = undefined,
},
.os = builtin.target.os,
.abi = .none,
.ofmt = comptime std.Target.ObjectFormat.default(builtin.os.tag, builtin.cpu.arch),
.dynamic_linker = std.Target.DynamicLinker.none,
};
const native_paths = try std.zig.system.NativePaths.detect(arena_allocator.allocator(), target_info);

try include_dirs.ensureUnusedCapacity(allocator, native_paths.include_dirs.items.len);
Expand Down

0 comments on commit 9a37d38

Please sign in to comment.