authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-14 20:31:39-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-15 15:11:37-08:00
log50d053f31c8fc391be613b27e4971ee85a418e5b
tree7d6143174f711ec2af3b70486c33fc669d17a5f0
parent9ddb1c50928ad202991369a87b58ce65f40428f2

test/wasm/infer-features: update to expected behavior

I intentionally simplified the target features functionality to use the target features that are explicitly specified to the linker and ignore the "tooling conventions" this makes the wasm linker behave the same as ELF, COFF, and MachO.

1 files changed, 3 insertions(+), 20 deletions(-)

test/link/wasm/infer-features/build.zig+3-20
......@@ -37,27 +37,10 @@ pub fn build(b: *std.Build) void {
3737 lib.use_lld = false;
3838 lib.root_module.addObject(c_obj);
3939
40 // Verify the result contains the features from the C Object file.
41 const check = lib.checkObject();
42 check.checkInHeaders();
43 check.checkExact("name target_features");
44 check.checkExact("features 14");
45 check.checkExact("+ atomics");
46 check.checkExact("+ bulk-memory");
47 check.checkExact("+ exception-handling");
48 check.checkExact("+ extended-const");
49 check.checkExact("+ half-precision");
50 check.checkExact("+ multimemory");
51 check.checkExact("+ multivalue");
52 check.checkExact("+ mutable-globals");
53 check.checkExact("+ nontrapping-fptoint");
54 check.checkExact("+ reference-types");
55 check.checkExact("+ relaxed-simd");
56 check.checkExact("+ sign-ext");
57 check.checkExact("+ simd128");
58 check.checkExact("+ tail-call");
40 lib.expect_errors = .{ .contains = "error: object requires atomics but specified target features exclude atomics" };
41 _ = lib.getEmittedBin();
5942
6043 const test_step = b.step("test", "Run linker test");
61 test_step.dependOn(&check.step);
44 test_step.dependOn(&lib.step);
6245 b.default_step = test_step;
6346}