diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-24 10:41:59 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-24 10:41:59 -0700 |
| commit | 156b968ad85d6b2f6146d66f1a3a3c48b34193da (patch) | |
| tree | eb180ea03fe2320cf94e3588f4cf773bad9ea14c /src/link/Elf.zig | |
| parent | e8cf15236d3b3f6d337858ad076f3ed11fca626b (diff) | |
| download | zig-156b968ad85d6b2f6146d66f1a3a3c48b34193da.tar.gz zig-156b968ad85d6b2f6146d66f1a3a3c48b34193da.zip | |
stage2: remove dead code; rename crtbegin_dir to gcc_dir
Diffstat (limited to 'src/link/Elf.zig')
| -rw-r--r-- | src/link/Elf.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/link/Elf.zig b/src/link/Elf.zig index 8e02f5d2c6..599d6fa2bf 100644 --- a/src/link/Elf.zig +++ b/src/link/Elf.zig @@ -3310,7 +3310,7 @@ const CsuObjects = struct { .static_pie => result.set( "crt0.o", "crti.o", "crtbeginT.o", "crtendS.o", "crtn.o" ), // zig fmt: on }, - .openbsd => switch(mode) { + .openbsd => switch (mode) { // zig fmt: off .dynamic_lib => result.set( null, null, "crtbeginS.o", "crtendS.o", null ), .dynamic_exe, @@ -3352,24 +3352,24 @@ const CsuObjects = struct { if (result.crtend) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ crt_dir_path, gccv, obj.* }); }, .haiku => { - const crtbegin_dir_path = lci.crtbegin_dir orelse return error.LibCInstallationMissingCRTDir; + const gcc_dir_path = lci.gcc_dir orelse return error.LibCInstallationMissingCRTDir; if (result.crt0) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ crt_dir_path, obj.* }); if (result.crti) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ crt_dir_path, obj.* }); if (result.crtn) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ crt_dir_path, obj.* }); - if (result.crtbegin) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ crtbegin_dir_path, obj.* }); - if (result.crtend) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ crtbegin_dir_path, obj.* }); + if (result.crtbegin) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ gcc_dir_path, obj.* }); + if (result.crtend) |*obj| obj.* = try fs.path.join(arena, &[_][]const u8{ gcc_dir_path, obj.* }); }, else => { - inline for (std.meta.fields(@TypeOf(result))) |f,i| { + inline for (std.meta.fields(@TypeOf(result))) |f, i| { if (@field(result, f.name)) |*obj| { obj.* = try fs.path.join(arena, &[_][]const u8{ crt_dir_path, obj.* }); } } - } + }, } } else { - inline for (std.meta.fields(@TypeOf(result))) |f,i| { + inline for (std.meta.fields(@TypeOf(result))) |f, i| { if (@field(result, f.name)) |*obj| { if (comp.crt_files.get(obj.*)) |crtf| { obj.* = crtf.full_object_path; |
