[wasm] Use response files for emcc invocations#51530
Conversation
|
/cc @pranavkm |
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsThis would avoid running into command max length issues on windows.
Fixes #51437 .
|
|
I think you should consider the rsp files as build artifacts and split them up appropriately. I'm not sure a separate task is needed. |
This adds response file for the linker command line, which will be the longest one. And it uses a known name for the response file. In future, once we have dependency checking, we can use such response files for that too. Fixes dotnet#51437 .
|
radekdoulik
left a comment
There was a problem hiding this comment.
LGTM.
I was curious about the multiline response file. Tried to use it with emcc on windows and noticed the response file needs to be entered with full path. That is the case here, so I think it should work fine on windows. (<_EmccLinkerResponseFile>$(_WasmIntermediateOutputPath)emcc-link.rsp</_EmccLinkerResponseFile> , here the _WasmIntermediateOutputPath is normalized msbuild path)
Having the arguments one per line, also means that we don't have to quote the file paths. And it is more readable.
|
Failing test on |
Suggested by Pranavkm: ``` .. their format does require whitespaces to be quoted: https://github.com/emscripten-core/emscripten/blob/main/tools/response_file.py#L16-L53. ```
lewing
left a comment
There was a problem hiding this comment.
Assuming this solves the immediate cmd length issue and the quoting works again this looks ok to me.
Added snippet of the what the rsp looks like to the description. |
|
/backport to release/6.0-preview4 |
|
Started backporting to release/6.0-preview4: https://github.com/dotnet/runtime/actions/runs/772410348 |
This would avoid running into command max length issues on windows.
Fixes #51437 .