aboutsummaryrefslogtreecommitdiff
path: root/src/libc_installation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-01-02 14:11:27 -0800
committerGitHub <noreply@github.com>2024-01-02 14:11:27 -0800
commit289ae45c1b58e952867c4fa1e246d0ef7bc2ff64 (patch)
tree5dd034143a2354b7b44496e684f1c764e2f9664c /src/libc_installation.zig
parentc89bb3e141ee215add0b52930d48bffd8dae8342 (diff)
parentc546ddb3edc557fae4b932e5239b9dcb66117832 (diff)
downloadzig-289ae45c1b58e952867c4fa1e246d0ef7bc2ff64.tar.gz
zig-289ae45c1b58e952867c4fa1e246d0ef7bc2ff64.zip
Merge pull request #18160 from ziglang/std-build-module
Move many settings from being per-Compilation to being per-Module
Diffstat (limited to 'src/libc_installation.zig')
-rw-r--r--src/libc_installation.zig13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libc_installation.zig b/src/libc_installation.zig
index 48b505d935..0901194dd8 100644
--- a/src/libc_installation.zig
+++ b/src/libc_installation.zig
@@ -41,7 +41,7 @@ pub const LibCInstallation = struct {
pub fn parse(
allocator: Allocator,
libc_file: []const u8,
- target: std.zig.CrossTarget,
+ target: std.Target,
) !LibCInstallation {
var self: LibCInstallation = .{};
@@ -95,24 +95,23 @@ pub const LibCInstallation = struct {
return error.ParseError;
}
- const os_tag = target.getOsTag();
+ const os_tag = target.os.tag;
if (self.crt_dir == null and !target.isDarwin()) {
log.err("crt_dir may not be empty for {s}\n", .{@tagName(os_tag)});
return error.ParseError;
}
- const abi = target.getAbi();
- if (self.msvc_lib_dir == null and target.isWindows() and abi == .msvc) {
+ if (self.msvc_lib_dir == null and os_tag == .windows and target.abi == .msvc) {
log.err("msvc_lib_dir may not be empty for {s}-{s}\n", .{
@tagName(os_tag),
- @tagName(abi),
+ @tagName(target.abi),
});
return error.ParseError;
}
- if (self.kernel32_lib_dir == null and target.isWindows() and abi == .msvc) {
+ if (self.kernel32_lib_dir == null and os_tag == .windows and target.abi == .msvc) {
log.err("kernel32_lib_dir may not be empty for {s}-{s}\n", .{
@tagName(os_tag),
- @tagName(abi),
+ @tagName(target.abi),
});
return error.ParseError;
}