Cheng Shao pushed to branch wip/fix-9.12-wasm at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -11,7 +11,7 @@ variables:
    11 11
       GIT_SSL_NO_VERIFY: "1"
    
    12 12
     
    
    13 13
       # Commit of ghc/ci-images repository from which to pull Docker images
    
    14
    -  DOCKER_REV: 936715c0e4d036cac61f31387a6fd5b22006c251
    
    14
    +  DOCKER_REV: 94806d948c7263fa6318561a1af44421493d2db3
    
    15 15
     
    
    16 16
       # Sequential version number of all cached things.
    
    17 17
       # Bump to invalidate GitLab CI cache.
    

  • utils/jsffi/dyld.mjs
    ... ... @@ -784,21 +784,22 @@ class DyLD {
    784 784
             continue;
    
    785 785
           }
    
    786 786
     
    
    787
    -      // See
    
    788
    -      // https://gitlab.haskell.org/haskell-wasm/llvm-project/-/blob/release/21.x/lld/wasm/Writer.cpp#L1451,
    
    789
    -      // __wasm_apply_data_relocs is now optional so only call it if
    
    790
    -      // it exists (we know for sure it exists for libc.so though).
    
    791
    -      // There's also __wasm_init_memory (not relevant yet, we don't
    
    792
    -      // use passive segments) & __wasm_apply_global_relocs but
    
    793
    -      // those are included in the start function and should have
    
    794
    -      // been called upon instantiation, see
    
    795
    -      // Writer::createStartFunction().
    
    796
    -      if (instance.exports.__wasm_apply_data_relocs) {
    
    787
    +      const init = () => {
    
    788
    +        // See
    
    789
    +        // https://gitlab.haskell.org/haskell-wasm/llvm-project/-/blob/release/21.x/lld/wasm/Writer.cpp#L1451,
    
    790
    +        // __wasm_apply_data_relocs is now optional so only call it if
    
    791
    +        // it exists (we know for sure it exists for libc.so though).
    
    792
    +        // There's also __wasm_init_memory (not relevant yet, we don't
    
    793
    +        // use passive segments) & __wasm_apply_global_relocs but
    
    794
    +        // those are included in the start function and should have
    
    795
    +        // been called upon instantiation, see
    
    796
    +        // Writer::createStartFunction().
    
    797
    +        if (instance.exports.__wasm_apply_data_relocs) {
    
    797 798
               instance.exports.__wasm_apply_data_relocs();
    
    798 799
             }
    
    799
    -      };
    
    800 800
     
    
    801
    -      instance.exports._initialize();
    
    801
    +        instance.exports._initialize();
    
    802
    +      };
    
    802 803
     
    
    803 804
           // rts init must be deferred until ghc-internal symbols are
    
    804 805
           // exported. We hard code this hack for now.