commit bd325d1bd94361024f755c8bac3011a5cdffe573 (tree)
parent fbd96907c9f53f01c211e6e3bbf15e53aaeb79f0
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Fri, 21 May 2021 22:25:29 +0200
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.
Diffstat:
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/lib/std/target.zig b/lib/std/target.zig
@@ -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",
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig
@@ -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) {