JS: Improve compatibility with recent emsdk
The JavaScript code in libraries/base/jsbits/base.js had some hardcoded offsets for fields in structs, because we expected the layout of the data structures to remain unchanged. Emsdk 3.1.42 changed the layout of the stat struct, breaking this assumption, and causing code in .hsc files accessing the stat struct to fail. This patch improves compatibility with recent emsdk by removing the assumption that data layouts stay unchanged: 1. offsets of fields in structs used by JavaScript code are now computed by the configure script, so both the .js and .hsc files will automatically use the new layout if anything changes. 2. the distrib/configure script checks that the emsdk version on a user's system is the same version that a bindist was booted with, to avoid data layout inconsistencies See #23641
Showing
- configure.ac 7 additions, 0 deletionsconfigure.ac
- distrib/configure.ac.in 4 additions, 0 deletionsdistrib/configure.ac.in
- libraries/base/System/Posix/Internals.hs 2 additions, 2 deletionslibraries/base/System/Posix/Internals.hs
- libraries/base/aclocal.m4 26 additions, 0 deletionslibraries/base/aclocal.m4
- libraries/base/configure.ac 39 additions, 0 deletionslibraries/base/configure.ac
- libraries/base/jsbits/base.js 73 additions, 72 deletionslibraries/base/jsbits/base.js
- m4/emsdk_version.m4 42 additions, 0 deletionsm4/emsdk_version.m4
Loading