Skip to content

Commit 13c50f1

Browse files
committed
Fix EM_CACHE issue
1 parent 5006680 commit 13c50f1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

builder/comp-builder.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ let
447447
(lib.optionalString stdenv.hostPlatform.isGhcjs ''
448448
export HOME=$(mktemp -d)
449449
export EM_CACHE=$(mktemp -d)
450+
if [ -d ${pkgsBuildBuild.emscripten}/share/emscripten/cache ]; then
451+
cp -r ${pkgsBuildBuild.emscripten}/share/emscripten/cache/* $EM_CACHE/
452+
chmod +w -R $EM_CACHE
453+
fi
450454
'') +
451455
(lib.optionalString (!canCleanSource) ''
452456
echo "Cleaning component source not supported, leaving it un-cleaned"

compiler/ghc/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
435435
''
436436
) + ''
437437
export EM_CACHE=$(mktemp -d)
438+
if [ -d ${targetCC}/share/emscripten/cache ]; then
439+
cp -r ${targetCC}/share/emscripten/cache/* $EM_CACHE/
440+
chmod +w -R $EM_CACHE
441+
fi
438442
mv config.sub.ghcjs config.sub
439443
'')
440444
# GHC is a bit confused on its cross terminology, as these would normally be

0 commit comments

Comments
 (0)