diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-13 15:19:51 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 17:51:19 -0700 |
| commit | bc4d2b646d5d09ecb86a3806886fed37e522fdc9 (patch) | |
| tree | b476088e3785c0f2820a5fc1fee3bc880310bc71 /src/arch/wasm/CodeGen.zig | |
| parent | 1642c003b4bab4a53b6094b42d10f6934896801e (diff) | |
| download | zig-bc4d2b646d5d09ecb86a3806886fed37e522fdc9.tar.gz zig-bc4d2b646d5d09ecb86a3806886fed37e522fdc9.zip | |
compiler: update references to target
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 819cc3e9a0..2319330333 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -1212,16 +1212,19 @@ pub fn generate( _ = src_loc; const mod = bin_file.comp.module.?; const func = mod.funcInfo(func_index); + const decl = mod.declPtr(func.owner_decl); + const namespace = mod.namespacePtr(decl.src_namespace); + const target = namespace.file_scope.mod.target; var code_gen: CodeGen = .{ .gpa = bin_file.allocator, .air = air, .liveness = liveness, .code = code, .decl_index = func.owner_decl, - .decl = mod.declPtr(func.owner_decl), + .decl = decl, .err_msg = undefined, .locals = .{}, - .target = bin_file.options.target, + .target = target, .bin_file = bin_file.cast(link.File.Wasm).?, .debug_output = debug_output, .func_index = func_index, |
