| ... | @@ -805,6 +805,7 @@ fn validateFeatures( | ... | @@ -805,6 +805,7 @@ fn validateFeatures( |
| 805 | | 805 | |
| 806 | fn checkUndefinedSymbols(wasm: *const Wasm) !void { | 806 | fn checkUndefinedSymbols(wasm: *const Wasm) !void { |
| 807 | if (wasm.base.options.output_mode == .Obj) return; | 807 | if (wasm.base.options.output_mode == .Obj) return; |
| | 808 | if (wasm.base.options.import_symbols) return; |
| 808 | | 809 | |
| 809 | var found_undefined_symbols = false; | 810 | var found_undefined_symbols = false; |
| 810 | for (wasm.undefs.values()) |undef| { | 811 | for (wasm.undefs.values()) |undef| { |
| ... | @@ -2467,6 +2468,7 @@ fn linkWithZld(wasm: *Wasm, comp: *Compilation, prog_node: *std.Progress.Node) l | ... | @@ -2467,6 +2468,7 @@ fn linkWithZld(wasm: *Wasm, comp: *Compilation, prog_node: *std.Progress.Node) l |
| 2467 | var enabled_features: [@typeInfo(types.Feature.Tag).Enum.fields.len]bool = undefined; | 2468 | var enabled_features: [@typeInfo(types.Feature.Tag).Enum.fields.len]bool = undefined; |
| 2468 | try wasm.validateFeatures(&enabled_features, &emit_features_count); | 2469 | try wasm.validateFeatures(&enabled_features, &emit_features_count); |
| 2469 | try wasm.resolveSymbolsInArchives(); | 2470 | try wasm.resolveSymbolsInArchives(); |
| | 2471 | try wasm.checkUndefinedSymbols(); |
| 2470 | | 2472 | |
| 2471 | try wasm.setupStart(); | 2473 | try wasm.setupStart(); |
| 2472 | try wasm.setupImports(); | 2474 | try wasm.setupImports(); |