aboutsummaryrefslogtreecommitdiff
path: root/src/link/Elf.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-10-31 20:29:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-12-06 12:15:04 -0700
commit28514476ef8c824c3d189d98f23d0f8d23e496ea (patch)
tree537631080e7c99fb582738d3be96ac48c5941bb7 /src/link/Elf.zig
parentbf316e550671cc71eb498b3cf799493627bb0fdc (diff)
downloadzig-28514476ef8c824c3d189d98f23d0f8d23e496ea.tar.gz
zig-28514476ef8c824c3d189d98f23d0f8d23e496ea.zip
remove `-fstage1` option
After this commit, the self-hosted compiler does not offer the option to use stage1 as a backend anymore.
Diffstat (limited to 'src/link/Elf.zig')
-rw-r--r--src/link/Elf.zig23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
index f98e33e58b..b7968b3f1c 100644
--- a/src/link/Elf.zig
+++ b/src/link/Elf.zig
@@ -328,8 +328,7 @@ pub fn createEmpty(gpa: Allocator, options: link.Options) !*Elf {
.page_size = page_size,
};
const use_llvm = build_options.have_llvm and options.use_llvm;
- const use_stage1 = build_options.have_stage1 and options.use_stage1;
- if (use_llvm and !use_stage1) {
+ if (use_llvm) {
self.llvm_object = try LlvmObject.create(gpa, options);
}
return self;
@@ -1228,25 +1227,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v
// If there is no Zig code to compile, then we should skip flushing the output file because it
// will not be part of the linker line anyway.
- const module_obj_path: ?[]const u8 = if (self.base.options.module) |module| blk: {
- // stage1 puts the object file in the cache directory.
- if (self.base.options.use_stage1) {
- const obj_basename = try std.zig.binNameAlloc(arena, .{
- .root_name = self.base.options.root_name,
- .target = self.base.options.target,
- .output_mode = .Obj,
- });
- switch (self.base.options.cache_mode) {
- .incremental => break :blk try module.zig_cache_artifact_directory.join(
- arena,
- &[_][]const u8{obj_basename},
- ),
- .whole => break :blk try fs.path.join(arena, &.{
- fs.path.dirname(full_out_path).?, obj_basename,
- }),
- }
- }
-
+ const module_obj_path: ?[]const u8 = if (self.base.options.module != null) blk: {
try self.flushModule(comp, prog_node);
if (fs.path.dirname(full_out_path)) |dirname| {