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.
This commit is contained in:
Andrew Kelley 2025-01-14 20:31:39 -08:00
parent 9ddb1c5092
commit 50d053f31c

View file

@ -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;
}