Skip to content

[wasm] Investigate emscripten cache usage #55014

@pavelsavara

Description

@pavelsavara

Updated: now we have the cache in a separate nuget.

The cache nuget/pack will typically be installed in a non-user-writable location.

  • how does this affect user builds? Command line, and VS.
  • When might emcc try to write to the cache?
  • Does emsdk support a "fallback" cache that could be in a user-writable location?
  • TODO: Make the dotnet installation non-writeable when running Wasm.Build.Tests

Currently it's caching for both Debug/Release configurations into the same folder.

cache:INFO: generating system library: sysroot\lib\wasm32-emscripten\libc_rt_wasm.a... (this will be cached in "D:\runtime\src\mono\wasm\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libc_rt_wasm.a" for subsequent builds)

Questions:

  • What does emcc use as keys for the cache? Can it differentiate between Debug/Release? (path? hash?)
  • If it can't then what else do we need to split the cache on?

Proposed solution

Add --cache <dir> where dir is something like upstream\emscripten\cache-<configuration>\

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions