mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 15:43:06 +00:00
include compiler_rt and c for wasm static libraries
This commit is contained in:
parent
1951ecb228
commit
bc6904eccc
@ -922,7 +922,10 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
|
||||
try comp.work_queue.writeItem(.libcxx);
|
||||
try comp.work_queue.writeItem(.libcxxabi);
|
||||
}
|
||||
if (is_exe_or_dyn_lib and build_options.is_stage1) {
|
||||
|
||||
const needs_compiler_rt_and_c = is_exe_or_dyn_lib or
|
||||
(comp.getTarget().isWasm() and comp.bin_file.options.output_mode != .Obj);
|
||||
if (needs_compiler_rt_and_c and build_options.is_stage1) {
|
||||
try comp.work_queue.writeItem(.{ .libcompiler_rt = {} });
|
||||
if (!comp.bin_file.options.link_libc) {
|
||||
try comp.work_queue.writeItem(.{ .zig_libc = {} });
|
||||
|
||||
@ -374,7 +374,7 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation) !void {
|
||||
try argv.append(p);
|
||||
}
|
||||
|
||||
if (self.base.options.output_mode == .Exe and !self.base.options.is_compiler_rt_or_libc) {
|
||||
if (self.base.options.output_mode != .Obj and !self.base.options.is_compiler_rt_or_libc) {
|
||||
if (!self.base.options.link_libc) {
|
||||
try argv.append(comp.libc_static_lib.?.full_object_path);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user