stage2: update to new LibCInstallation API

master
Andrew Kelley 2020-09-15 18:08:29 -07:00
parent 16bd0c63b4
commit da0fde59b6
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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);

View File

@ -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