[wasm] Fix a race condition in adding payloads for helix (#65995)
* [wasm] Fix a race condition in adding payloads for helix The issue shows up only in Wasm.Build.Tests for the `TestUsingWorkloads!=true` case, as `clang --version` failing with: ``` /datadisks/disk1/work/A0100914/p/build/emsdk/upstream/bin/clang: error while loading shared libraries: libLLVM-13git.so: cannot open shared object file: No such file or directory (TaskId:231) ``` For this non-workloads testing case, we copy `emscripten` from the system copy to the git checkout. And then use that directory for the payload. The build logs show that the missing file (`libLLVM-13git.so`) does get copied as part of copying `/usr/local/emscripten/emsdk` to `$(RepoRoot)/src/mono/wasm/emsdk`. But the file, and a few others seem to be missing in the final helix payload. We add `emsdk` to the payload for target path `build/emsdk`. But a recent change also added `node` for this case with a target path `build/emsdk/node`, with an overlapping path with `build/emsdk`. I believe this is causing an issue where these directories are being processed in parallel, and cause some files get missed. This commit: 1. Add `node` only when needed (skip WBT for example); 2. Use a non-overlapping path for `node`, `build/emsdk-node`. Fixes https://github.com/dotnet/runtime/issues/65956 * Change `_HelixLocalNodePath` evaluation order Co-authored-by: NRadek Doulik <radekdoulik@gmail.com>
Showing
想要评论请 注册 或 登录