Skip to content
  • Luite Stegeman's avatar
    aa07402e
    JS: Improve compatibility with recent emsdk · aa07402e
    Luite Stegeman authored
    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
    aa07402e
    JS: Improve compatibility with recent emsdk
    Luite Stegeman authored
    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
Loading