mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
wasm: fix object extension to standard .o from .o.wasm
This should offer more compatibility with external tooling when cross-compiling to wasm with zig.
This commit is contained in:
parent
fbd96907c9
commit
bd325d1bd9
@ -1259,9 +1259,6 @@ pub const Target = struct {
|
||||
}
|
||||
|
||||
pub fn oFileExt_cpu_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) [:0]const u8 {
|
||||
if (cpu_arch.isWasm()) {
|
||||
return ".o.wasm";
|
||||
}
|
||||
switch (abi) {
|
||||
.msvc => return ".obj",
|
||||
else => return ".o",
|
||||
@ -1289,9 +1286,6 @@ pub const Target = struct {
|
||||
}
|
||||
|
||||
pub fn staticLibSuffix_cpu_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) [:0]const u8 {
|
||||
if (cpu_arch.isWasm()) {
|
||||
return ".wasm";
|
||||
}
|
||||
switch (abi) {
|
||||
.msvc => return ".lib",
|
||||
else => return ".a",
|
||||
|
||||
@ -698,7 +698,7 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation) !void {
|
||||
|
||||
if (link_in_crt) {
|
||||
// TODO work out if we want standard crt, a reactor or a command
|
||||
try argv.append(try comp.get_libc_crt_file(arena, "crt.o.wasm"));
|
||||
try argv.append(try comp.get_libc_crt_file(arena, "crt.o"));
|
||||
}
|
||||
|
||||
if (!is_obj and self.base.options.link_libc) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user