diff options
author | Slava Gorbunov <slava@fizlesh.org.ru> | 2024-04-09 20:21:41 +0300 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2024-04-09 22:18:56 +0200 |
commit | 867727144e8ebe66dd5fdbac86a783e2f2ec5ed9 (patch) | |
tree | d3dafd8dc3dcdcd993e5ece535cebfe633b0efce /pkgs/development/compilers/ghc | |
parent | 9a82281fca88ac35821481247c128574948627ae (diff) |
pkgsCross.ghcjs.ghc: make EM_CACHE absolute
emscripten-3.1.51 fails to compile code (with cache locking problems) if
EM_CACHE is relative.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r-- | pkgs/development/compilers/ghc/common-hadrian.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 465db3a25296..b201379668b1 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -350,10 +350,10 @@ stdenv.mkDerivation ({ '*-android*|*-gnueabi*|*-musleabi*)' done '' - # Need to make writable EM_CACHE for emscripten + # Need to make writable EM_CACHE for emscripten. The path in EM_CACHE must be absolute. # https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend#configure-fails-with-sub-word-sized-atomic-operations-not-available + lib.optionalString targetPlatform.isGhcjs '' - export EM_CACHE="$(mktemp -d emcache.XXXXXXXXXX)" + export EM_CACHE="$(realpath $(mktemp -d emcache.XXXXXXXXXX))" cp -Lr ${targetCC /* == emscripten */}/share/emscripten/cache/* "$EM_CACHE/" chmod u+rwX -R "$EM_CACHE" '' |