commit d37cb6062163e45bee8d95890a2f94fb477c8547 (tree)
parent ce88df497c096f5a35200d975de855ba4502a4d8
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Wed, 13 Sep 2023 20:11:23 +0200
elf: re-enable linking compiler_rt
Diffstat:
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
@@ -1082,10 +1082,9 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node
if (comp.compiler_rt_obj) |x| break :blk x.full_object_path;
break :blk null;
};
- _ = compiler_rt_path;
- // if (compiler_rt_path) |path| {
- // try positionals.append(.{ .path = path });
- // }
+ if (compiler_rt_path) |path| {
+ try positionals.append(.{ .path = path });
+ }
for (positionals.items) |obj| {
const in_file = try std.fs.cwd().openFile(obj.path, .{});
diff --git a/src/link/Elf/file.zig b/src/link/Elf/file.zig
@@ -84,7 +84,7 @@ pub const File = union(enum) {
pub fn markLive(file: File, elf_file: *Elf) void {
switch (file) {
- .zig_module, .linker_defined => {},
+ .zig_module, .linker_defined => unreachable,
inline else => |x| x.markLive(elf_file),
}
}