aboutsummaryrefslogtreecommitdiff
path: root/src/link
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-24 10:41:59 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-24 10:41:59 -0700
commit156b968ad85d6b2f6146d66f1a3a3c48b34193da (patch)
treeeb180ea03fe2320cf94e3588f4cf773bad9ea14c /src/link
parente8cf15236d3b3f6d337858ad076f3ed11fca626b (diff)
downloadzig-156b968ad85d6b2f6146d66f1a3a3c48b34193da.tar.gz
zig-156b968ad85d6b2f6146d66f1a3a3c48b34193da.zip
stage2: remove dead code; rename crtbegin_dir to gcc_dir
Diffstat (limited to 'src/link')
-rw-r--r--src/link/Elf.zig14
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;