[wasm] Freeze the emscripten cache (#84356)
authorRadek Doulik <radek.doulik@gmail.com>
Wed, 5 Apr 2023 16:10:52 +0000 (18:10 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Apr 2023 16:10:52 +0000 (18:10 +0200)
commitda7fbb7668d3cba3f2995675c6e8f0ad38caa8cd
treec194620129c49c08c87b12440391ff0511a6d1b4
parent66211eb2bbe05c9fc3b3191cad5d415d66ba49f5
[wasm] Freeze the emscripten cache (#84356)

This fixes https://github.com/dotnet/runtime/issues/83655

We prime the cache before packaging the emsdk cache package and also
in docker images, so we don't need to update the cache, which might be
in read-only location anyway.

The underlying issue was problem with the cache lock:

    "C:/helix/work/correlation/build/emsdk/upstream/bin\clang.exe" --version
    cache:WARNING: Accessing the Emscripten cache at "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache" (for "sanity") is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache\cache.lock" and try again. If this occurs deterministically, consider filing a bug.
    cache:WARNING: Accessing the Emscripten cache at "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache" (for "sanity") is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache\cache.lock" and try again. If this occurs deterministically, consider filing a bug.
src/mono/wasm/build/WasmApp.Native.targets