mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 00:53:18 +00:00
link: avoid creating stage2 llvm module when using stage1
This commit is contained in:
parent
ff66a18555
commit
b6d6152e65
@ -409,7 +409,10 @@ pub fn createEmpty(gpa: Allocator, options: link.Options) !*Coff {
|
||||
},
|
||||
.ptr_width = ptr_width,
|
||||
};
|
||||
if (build_options.have_llvm and options.use_llvm) {
|
||||
|
||||
const use_llvm = build_options.have_llvm and options.use_llvm;
|
||||
const use_stage1 = build_options.is_stage1 and options.use_stage1;
|
||||
if (use_llvm and !use_stage1) {
|
||||
self.llvm_object = try LlvmObject.create(gpa, options);
|
||||
}
|
||||
return self;
|
||||
|
||||
@ -304,7 +304,9 @@ pub fn createEmpty(gpa: Allocator, options: link.Options) !*Elf {
|
||||
},
|
||||
.ptr_width = ptr_width,
|
||||
};
|
||||
if (build_options.have_llvm and options.use_llvm) {
|
||||
const use_llvm = build_options.have_llvm and options.use_llvm;
|
||||
const use_stage1 = build_options.is_stage1 and options.use_stage1;
|
||||
if (use_llvm and !use_stage1) {
|
||||
self.llvm_object = try LlvmObject.create(gpa, options);
|
||||
}
|
||||
return self;
|
||||
|
||||
@ -396,7 +396,9 @@ pub fn createEmpty(gpa: Allocator, options: link.Options) !*MachO {
|
||||
.needs_prealloc = needs_prealloc,
|
||||
};
|
||||
|
||||
if (build_options.have_llvm and options.use_llvm) {
|
||||
const use_llvm = build_options.have_llvm and options.use_llvm;
|
||||
const use_stage1 = build_options.is_stage1 and options.use_stage1;
|
||||
if (use_llvm and !use_stage1) {
|
||||
self.llvm_object = try LlvmObject.create(gpa, options);
|
||||
}
|
||||
|
||||
|
||||
@ -145,7 +145,9 @@ pub fn createEmpty(gpa: Allocator, options: link.Options) !*Wasm {
|
||||
.allocator = gpa,
|
||||
},
|
||||
};
|
||||
if (build_options.have_llvm and options.use_llvm) {
|
||||
const use_llvm = build_options.have_llvm and options.use_llvm;
|
||||
const use_stage1 = build_options.is_stage1 and options.use_stage1;
|
||||
if (use_llvm and !use_stage1) {
|
||||
self.llvm_object = try LlvmObject.create(gpa, options);
|
||||
}
|
||||
return self;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user