Skip to content

JS: widen emsdk version compatibility

Luite Stegeman requested to merge luite/ghc:emsdk-offsets into master

This patch improves support for a wider version range of emsdk, avoiding breakage if struct layouts change.

  • This removes hardcoded offsets from h$base_fillStat in base/jsbits/base.js, relying instead of values computed by the C compiler and inserted into HsBaseConfig.h
  • This adds a version check for emsdk, in particular ensuring that the emsdk version on a user system is the same as the version a bindist was booted with

Note: there is currently no upper bound on the emsdk version. If we get all the data layouts from the C compiler, future breakage should be unlikely (hopefully, haha). There are lots of emsdk releases and not allowing anything newer than the GHC release would be rather inconvenient for users.

Edited by Luite Stegeman

Merge request reports