From f63a9d1e77fb0b010119c2ebaea8635941473044 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 19 Apr 2021 20:39:46 -0400 Subject: [PATCH] [wasm] Use response files for `emcc` invocations 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 #51437 . --- src/mono/wasm/build/WasmApp.targets | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 0ab461d05d837..98281e0b31790 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -486,7 +486,20 @@ - + + + <_EmccLinkerArguments>$(EmccLDFlags) + <_EmccLinkerArguments>$(_EmccLinkerArguments) @(_DotnetJSSrcFile->'--js-library "%(Identity)"', ' ') + <_EmccLinkerArguments>$(_EmccLinkerArguments) @(_BitcodeFile->'"%(Identity)"', ' ') + <_EmccLinkerArguments>$(_EmccLinkerArguments) @(_WasmObjects->'"%(Identity)"', ' ') + <_EmccLinkerArguments>$(_EmccLinkerArguments) -o "$(_WasmIntermediateOutputPath)dotnet.js" + + <_EmccLinkerResponseFile>$(_WasmIntermediateOutputPath)emcc-link.rsp + + + + +