commit da0fde59b6ffde5d505f664aa27b728aa2b1cc2a (tree)
parent 16bd0c63b4a8b1313bc05cb32b31e5345e467db3
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 15 Sep 2020 18:08:29 -0700
stage2: update to new LibCInstallation API
Diffstat:
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/BRANCH_TODO b/BRANCH_TODO
@@ -33,7 +33,6 @@
* incremental compilation - implement detection of which source files changed
* improve the cache hash logic for c objects with respect to extra flags and file parameters
* LLVM codegen backend: put a sub-arch in the triple in some cases
- * rework libc_installation.zig abstraction to use std.log instead of taking a stderr stream
* implement an LLVM backend for stage2
* implement outputting dynamic libraries in self-hosted linker
* implement outputting static libraries (archive files) in self-hosted linker
diff --git a/src-self-hosted/main.zig b/src-self-hosted/main.zig
@@ -1086,7 +1086,7 @@ pub fn buildOutputType(
defer if (libc_installation) |*l| l.deinit(gpa);
if (libc_paths_file) |paths_file| {
- libc_installation = LibCInstallation.parse(gpa, paths_file, io.getStdErr().writer()) catch |err| {
+ libc_installation = LibCInstallation.parse(gpa, paths_file) catch |err| {
fatal("unable to parse libc paths file: {}", .{@errorName(err)});
};
}
@@ -1269,8 +1269,7 @@ pub fn cmdLibC(gpa: *Allocator, args: []const []const u8) !void {
}
}
if (input_file) |libc_file| {
- const stderr = std.io.getStdErr().writer();
- var libc = LibCInstallation.parse(gpa, libc_file, stderr) catch |err| {
+ var libc = LibCInstallation.parse(gpa, libc_file) catch |err| {
fatal("unable to parse libc file: {}", .{@errorName(err)});
};
defer libc.deinit(gpa);
diff --git a/src-self-hosted/stage2.zig b/src-self-hosted/stage2.zig
@@ -12,7 +12,7 @@ const ArrayListSentineled = std.ArrayListSentineled;
const Target = std.Target;
const CrossTarget = std.zig.CrossTarget;
const self_hosted_main = @import("main.zig");
-const DepTokenizer = @import("dep_tokenizer.zig").Tokenizer;
+const DepTokenizer = @import("DepTokenizer.zig");
const assert = std.debug.assert;
const LibCInstallation = @import("libc_installation.zig").LibCInstallation;
@@ -21,7 +21,7 @@ var stderr: fs.File.OutStream = undefined;
var stdout: fs.File.OutStream = undefined;
comptime {
- _ = @import("dep_tokenizer.zig");
+ _ = @import("DepTokenizer.zig");
}
// ABI warning