test/link: update linker tests
Force importing symbols to show the correct functions are being imported from the host environment.
This commit is contained in:
parent
4bffe645c6
commit
8403612adc
|
@ -3443,7 +3443,7 @@ fn linkWithLLD(wasm: *Wasm, comp: *Compilation, prog_node: *std.Progress.Node) !
|
|||
try argv.append("--no-entry"); // So lld doesn't look for _start.
|
||||
}
|
||||
if (wasm.base.options.import_symbols) {
|
||||
try argv.appendSlice(&[_][]const u8{"--allow-undefined"});
|
||||
try argv.append("--allow-undefined");
|
||||
}
|
||||
try argv.appendSlice(&[_][]const u8{
|
||||
"-o",
|
||||
|
|
|
@ -10,6 +10,8 @@ pub fn build(b: *Builder) void {
|
|||
const lib = b.addSharedLibrary("lib", "lib.zig", .unversioned);
|
||||
lib.setBuildMode(mode);
|
||||
lib.setTarget(.{ .cpu_arch = .wasm32, .os_tag = .freestanding });
|
||||
lib.import_symbols = true; // import `a` and `b`
|
||||
lib.rdynamic = true; // export `foo`
|
||||
lib.install();
|
||||
|
||||
const check_lib = lib.checkObject(.wasm);
|
||||
|
|
Loading…
Reference in New Issue
Block a user