Skip to content

Commit

Permalink
[wasm] Do not use link flags for bitcode compilation
Browse files Browse the repository at this point in the history
Backport of (dotnet#101397)

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]

This should helps with known build error dotnet#104827
where the warning can hide another errors
  • Loading branch information
radekdoulik committed Oct 14, 2024
1 parent 760832a commit e898a13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mono/wasm/build/WasmApp.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,11 @@

<Target Name="_WasmWriteRspForCompilingBitcode">
<ItemGroup>
<_BitcodeLDFlags Include="@(_EmccLDFlags)" />
<_BitcodeLDFlags Include="$(EmccExtraBitcodeLDFlags)" />
<_BitcodeCompileFlags Include="$(EmccLinkOptimizationFlag)" />
<_BitcodeCompileFlags Include="@(_EmccCommonFlags)" />
<_BitcodeCompileFlags Include="$(EmccExtraBitcodeLDFlags)" />
</ItemGroup>
<WriteLinesToFile Lines="@(_BitcodeLDFlags)" File="$(_EmccCompileBitcodeRsp)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<WriteLinesToFile Lines="@(_BitcodeCompileFlags)" File="$(_EmccCompileBitcodeRsp)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<ItemGroup>
<FileWrites Include="$(_EmccCompileBitcodeRsp)" />
</ItemGroup>
Expand Down

0 comments on commit e898a13

Please sign in to comment.