| author | |
| committer | |
| log | bc6904eccc53da5b4de0728c8b52e6d0e9ed522e |
| tree | d0c47226ec210cfd956b0536acf94e3b65ef9051 |
| parent | 1951ecb228d5eb9956ef4487e20be03d87a2153d |
2 files changed, 5 insertions(+), 2 deletions(-)
src/Compilation.zig+4-1| ... | ... | @@ -922,7 +922,10 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { |
| 922 | 922 | try comp.work_queue.writeItem(.libcxx); |
| 923 | 923 | try comp.work_queue.writeItem(.libcxxabi); |
| 924 | 924 | } |
| 925 | if (is_exe_or_dyn_lib and build_options.is_stage1) { | |
| 925 | ||
| 926 | const needs_compiler_rt_and_c = is_exe_or_dyn_lib or | |
| 927 | (comp.getTarget().isWasm() and comp.bin_file.options.output_mode != .Obj); | |
| 928 | if (needs_compiler_rt_and_c and build_options.is_stage1) { | |
| 926 | 929 | try comp.work_queue.writeItem(.{ .libcompiler_rt = {} }); |
| 927 | 930 | if (!comp.bin_file.options.link_libc) { |
| 928 | 931 | try comp.work_queue.writeItem(.{ .zig_libc = {} }); |
src/link/Wasm.zig+1-1| ... | ... | @@ -374,7 +374,7 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation) !void { |
| 374 | 374 | try argv.append(p); |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | if (self.base.options.output_mode == .Exe and !self.base.options.is_compiler_rt_or_libc) { | |
| 377 | if (self.base.options.output_mode != .Obj and !self.base.options.is_compiler_rt_or_libc) { | |
| 378 | 378 | if (!self.base.options.link_libc) { |
| 379 | 379 | try argv.append(comp.libc_static_lib.?.full_object_path); |
| 380 | 380 | } |