commit 50d053f31c8fc391be613b27e4971ee85a418e5b (tree) parent 9ddb1c50928ad202991369a87b58ce65f40428f2 Author: Andrew Kelley <andrew@ziglang.org> Date: Tue, 14 Jan 2025 20:31:39 -0800 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. Diffstat:
| M | test/link/wasm/infer-features/build.zig | | | 23 | +++-------------------- |
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/test/link/wasm/infer-features/build.zig b/test/link/wasm/infer-features/build.zig @@ -37,27 +37,10 @@ pub fn build(b: *std.Build) void { lib.use_lld = false; lib.root_module.addObject(c_obj); - // Verify the result contains the features from the C Object file. - const check = lib.checkObject(); - check.checkInHeaders(); - check.checkExact("name target_features"); - check.checkExact("features 14"); - check.checkExact("+ atomics"); - check.checkExact("+ bulk-memory"); - check.checkExact("+ exception-handling"); - check.checkExact("+ extended-const"); - check.checkExact("+ half-precision"); - check.checkExact("+ multimemory"); - check.checkExact("+ multivalue"); - check.checkExact("+ mutable-globals"); - check.checkExact("+ nontrapping-fptoint"); - check.checkExact("+ reference-types"); - check.checkExact("+ relaxed-simd"); - check.checkExact("+ sign-ext"); - check.checkExact("+ simd128"); - check.checkExact("+ tail-call"); + lib.expect_errors = .{ .contains = "error: object requires atomics but specified target features exclude atomics" }; + _ = lib.getEmittedBin(); const test_step = b.step("test", "Run linker test"); - test_step.dependOn(&check.step); + test_step.dependOn(&lib.step); b.default_step = test_step; }