aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-17 15:29:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-17 16:09:20 -0700
commitd5e894a9a7c63ebbfaa3c4eb6d173e15745ad39c (patch)
treecb1b68b50d9012c2c63ae2c4ad0469caeaaefef6 /src/Compilation.zig
parentab6b0ad8a4f858c8e4e5591b2383156eab8ac0e4 (diff)
downloadzig-d5e894a9a7c63ebbfaa3c4eb6d173e15745ad39c.tar.gz
zig-d5e894a9a7c63ebbfaa3c4eb6d173e15745ad39c.zip
stage2: get rid of failed_root_src_file
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index e792a9e6b6..ff50ce8d6c 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1681,8 +1681,7 @@ pub fn totalErrorCount(self: *Compilation) usize {
var total: usize = self.failed_c_objects.count() + self.misc_failures.count();
if (self.bin_file.options.module) |module| {
- total += module.failed_exports.items().len +
- @boolToInt(module.failed_root_src_file != null);
+ total += module.failed_exports.items().len;
for (module.failed_files.items()) |entry| {
if (entry.value) |_| {
@@ -1789,15 +1788,6 @@ pub fn getAllErrorsAlloc(self: *Compilation) !AllErrors {
for (module.failed_exports.items()) |entry| {
try AllErrors.add(module, &arena, &errors, entry.value.*);
}
- if (module.failed_root_src_file) |err| {
- const file_path = try module.root_pkg.root_src_directory.join(&arena.allocator, &[_][]const u8{
- module.root_pkg.root_src_path,
- });
- const msg = try std.fmt.allocPrint(&arena.allocator, "unable to read {s}: {s}", .{
- file_path, @errorName(err),
- });
- try AllErrors.addPlain(&arena, &errors, msg);
- }
}
if (errors.items.len == 0 and self.link_error_flags.no_entry_point_found) {