From 5d7c0fccf53b211275179ab60894d0a5d9575499 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 22 Apr 2024 21:14:19 +0200 Subject: [PATCH 1/2] [wasm] Do not use link flags for bitcode compilation This avoids errors like: /root/helix/work/correlation/build/wasm-shared/WasmApp.Common.targets(832,5): error : emcc: warning: linker setting ignored during compilation: 'EXPORT_ES6' [-Wunused-command-line-argument] [/root/helix/work/workitem/e/publish/ProxyProjectForAOTOnHelix.proj] /root/helix/work/correlation/build/wasm-shared/WasmApp.Common.targets(832,5): error : emcc: warning: linker setting ignored during compilation: 'EXPORT_EXCEPTION_HANDLING_HELPERS' [-Wunused-command-line-argument] [/root/helix/work/workitem/e/publish/ProxyProjectForAOTOnHelix.proj] --- src/mono/wasm/build/WasmApp.Common.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/build/WasmApp.Common.targets b/src/mono/wasm/build/WasmApp.Common.targets index 7e4c7d343417f..670f42997360e 100644 --- a/src/mono/wasm/build/WasmApp.Common.targets +++ b/src/mono/wasm/build/WasmApp.Common.targets @@ -804,7 +804,7 @@ Outputs: file @(_WasmCompileBitcodeRsp --> - + From d02db0d596cffec5e0b61d3bc28d52c3c56f141c Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 23 Apr 2024 12:20:27 +0200 Subject: [PATCH 2/2] Rename _BitcodeLDFlags to _BitcodeCompileFlags Update the comment as well. _BitcodeLDFlags were used only for the BC compilation. This way we keep the possibility to add extra flags via EmccExtraBitcodeCompilationFlags and WasiClangExtraBitcodeCompileFlags. --- src/mono/browser/build/BrowserWasmApp.targets | 4 ++-- src/mono/wasi/build/WasiApp.targets | 4 ++-- src/mono/wasm/build/WasmApp.Common.targets | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mono/browser/build/BrowserWasmApp.targets b/src/mono/browser/build/BrowserWasmApp.targets index aa231c45d8b7c..484d3486c5eaa 100644 --- a/src/mono/browser/build/BrowserWasmApp.targets +++ b/src/mono/browser/build/BrowserWasmApp.targets @@ -406,8 +406,8 @@ - <_BitcodeLDFlags Include="@(_EmccLDFlags)" /> - <_BitcodeLDFlags Include="$(EmccExtraBitcodeLDFlags)" /> + <_BitcodeCompileFlags Include="@(_EmccCommonFlags)" /> + <_BitcodeCompileFlags Include="$(EmccExtraBitcodeCompilationFlags)" /> diff --git a/src/mono/wasi/build/WasiApp.targets b/src/mono/wasi/build/WasiApp.targets index 37d6d40d1f172..c5ecf84ad0c73 100644 --- a/src/mono/wasi/build/WasiApp.targets +++ b/src/mono/wasi/build/WasiApp.targets @@ -265,8 +265,8 @@ - <_BitcodeLDFlags Include="@(_WasiClangLDFlags)" /> - <_BitcodeLDFlags Include="$(WasiClangExtraBitcodeLDFlags)" /> + <_BitcodeCompileFlags Include="@(_WasiClangCommonFlags)" /> + <_BitcodeCompileFlags Include="$(WasiClangExtraBitcodeCompileFlags)" /> diff --git a/src/mono/wasm/build/WasmApp.Common.targets b/src/mono/wasm/build/WasmApp.Common.targets index 670f42997360e..f06b9a1261fe5 100644 --- a/src/mono/wasm/build/WasmApp.Common.targets +++ b/src/mono/wasm/build/WasmApp.Common.targets @@ -800,11 +800,11 @@ - +