Commit d37cb60621

Jakub Konka <kubkon@jakubkonka.com>
2023-09-13 20:11:23
elf: re-enable linking compiler_rt
1 parent ce88df4
Changed files (2)
src
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),
         }
     }
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, .{});