Commit graph Crafter.Build/tests/WasmSysrootKey
Author SHA1 Message Date
a7aa22220b
test(wasm): a configuration is the same with its WASI sysroot named or not
WasmSysrootKey makes two wasm32 configurations that differ in one thing:
one names no sysroot and the other names the toolchain's WASI sysroot.
They have to be one configuration: the same VariantId, PcmDir and
BuildDir, the same std module key, and the same compile command, which
names the WASI sysroot. A third, with a sysroot of its own, has another
VariantId.

It then builds two programs for the host in one pass, each on the same
wasm32 library, which names no sysroot. The library carries
-fno-exceptions, which a wasm build is refused for before it makes a
directory, so the case does not depend on the machine having a WASI
sysroot. The library's PcmDir has to be the same after the first
program's build as before it, and the pass has to hold the library
once.

Against the engine as it was before the fix the test fails on each of
the three: the two configurations have different VariantIds, the
library's PcmDir changes with the first build, and the pass holds the
library twice.
2026-11-14 23:42:47 +01:00