-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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 .
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 .