We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__wasm_apply_data_relocs
1 parent 3d3dd2e commit 60f40bdCopy full SHA for 60f40bd
builder/ghc-for-component-wrapper.nix
@@ -133,9 +133,13 @@ let
133
ln -s $wrappedGhc/bin/${ghcCommand}-iserv-prof $wrappedGhc/bin/ghc-iserv-prof
134
''
135
# These scripts break if symlinked (they check import.meta.filename against args)
136
+ # Also for some reason `libdl.so` is missing `__wasm_apply_data_relocs`
137
+ lib.optionalString (stdenv.hostPlatform.isWasm) ''
138
rm $wrappedGhc/lib/*.mjs
139
cp $unwrappedGhc/lib/*.mjs $wrappedGhc/lib/
140
+ substituteInPlace $wrappedGhc/lib/dyld.mjs \
141
+ --replace-fail "instance.exports.__wasm_apply_data_relocs();" \
142
+ "if(instance.exports.__wasm_apply_data_relocs) instance.exports.__wasm_apply_data_relocs(); else {}"
143
144
# Wrap haddock, if the base GHC provides it.
145
+ ''
0 commit comments