Skip to content

ci: bump ci-images to use updated wasm image

Cheng Shao requested to merge type-dance/ghc:fix-wasm-tests into master

This MR bumps ci-images to use updated wasm image built at ci-images!139 (merged). This bump is not yak shaving and it's strictly necessary for ghc-wasm-meta to deliver usable wasm bindists to end users of the ghc wasm backend. The detailed reason is:

  • The ci-images before this bump contains a slightly outdated wasi-sdk which contains pthread.h in its wasi-libc sysroot, and consequently, recent wasm bindists produced by our nightly pipeline bake in this assumption with #define HAVE_PTHREAD_H 1 in its ghcautoconf.h.
  • Upstream wasi-libc has recently separated the global include directory for different targets and ensured pthread.h only exists for the wasm32-wasi-threaded target, not wasm32-wasi as we use right now. This is the right thing to do, but unfortunately, once we update our wasi-sdk (to bring in other bugfixes and improvements as well), the new wasi-sdk artifacts can't work with the recent wasm bindists, things will fail with <pthread.h> not found error.
  • Instead of inserting a stub pthread.h in the wasm32-wasi include directory, it makes more sense to just bump the wasi-sdk toolchain that we use in our wasm image.
  • To avoid this kind of annoying breakage in the future, our wasi-sdk CI logic now tests the x86_64-linux artifact against 1. compiling/testing ghc from source 2. testing a recent ghc wasm bindist.

Merge request reports