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:
Jakub Konka 2021-05-21 22:25:29 +02:00
parent fbd96907c9
commit bd325d1bd9
2 changed files with 1 additions and 7 deletions

View File

@ -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",

View File

@ -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) {