aboutsummaryrefslogtreecommitdiff
path: root/src/link/Elf.zig
diff options
context:
space:
mode:
authorJacob G-W <jacoblevgw@gmail.com>2021-06-19 21:10:22 -0400
committerAndrew Kelley <andrew@ziglang.org>2021-06-21 17:03:03 -0700
commit9fffffb07b081858db0c2102a0680aa166b48263 (patch)
tree36caed31c5b2aaa8e08bb8e6e90e9b2c30910ff3 /src/link/Elf.zig
parentb83b3883ba0b5e965f8f7f1298c77c6d766741af (diff)
downloadzig-9fffffb07b081858db0c2102a0680aa166b48263.tar.gz
zig-9fffffb07b081858db0c2102a0680aa166b48263.zip
fix code broken from previous commit
Diffstat (limited to 'src/link/Elf.zig')
-rw-r--r--src/link/Elf.zig13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
index 84068ffeca..f046e8104f 100644
--- a/src/link/Elf.zig
+++ b/src/link/Elf.zig
@@ -1262,7 +1262,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
.target = self.base.options.target,
.output_mode = .Obj,
});
- const o_directory = self.base.options.module.?.zig_cache_artifact_directory;
+ const o_directory = module.zig_cache_artifact_directory;
const full_obj_path = try o_directory.join(arena, &[_][]const u8{obj_basename});
break :blk full_obj_path;
}
@@ -1938,6 +1938,11 @@ fn freeTextBlock(self: *Elf, text_block: *TextBlock) void {
}
fn shrinkTextBlock(self: *Elf, text_block: *TextBlock, new_block_size: u64) void {
+ if (false) {
+ self;
+ text_block;
+ new_block_size;
+ }
// TODO check the new capacity, and if it crosses the size threshold into a big enough
// capacity, insert a free list node for it.
}
@@ -2706,6 +2711,7 @@ pub fn updateDeclExports(
/// Must be called only after a successful call to `updateDecl`.
pub fn updateDeclLineNumber(self: *Elf, module: *Module, decl: *const Module.Decl) !void {
+ _ = module;
const tracy = trace(@src());
defer tracy.end();
@@ -2979,6 +2985,7 @@ fn dbgLineNeededHeaderBytes(self: Elf) u32 {
}
fn dbgInfoNeededHeaderBytes(self: Elf) u32 {
+ _ = self;
return 120;
}
@@ -3372,7 +3379,7 @@ const CsuObjects = struct {
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| {
if (@field(result, f.name)) |*obj| {
obj.* = try fs.path.join(arena, &[_][]const u8{ crt_dir_path, obj.* });
}
@@ -3380,7 +3387,7 @@ const CsuObjects = struct {
},
}
} else {
- inline for (std.meta.fields(@TypeOf(result))) |f, i| {
+ inline for (std.meta.fields(@TypeOf(result))) |f| {
if (@field(result, f.name)) |*obj| {
if (comp.crt_files.get(obj.*)) |crtf| {
obj.* = crtf.full_object_path;