Skip to content

[wasm] Do not use link flags for bitcode compilation - #101397

Merged
radekdoulik merged 4 commits into
dotnet:mainfrom
radekdoulik:pr-wasm-fix-bc-compilation
Apr 23, 2024
Merged

[wasm] Do not use link flags for bitcode compilation#101397
radekdoulik merged 4 commits into
dotnet:mainfrom
radekdoulik:pr-wasm-fix-bc-compilation

Conversation

@radekdoulik

Copy link
Copy Markdown
Member

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 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]
Comment thread src/mono/wasm/build/WasmApp.Common.targets Outdated
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.
@kg

kg commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

This seems like it may have caused an increase in file size for AOT and a resulting regression in AOT startup time. The regression is bigger for cold start than warm start, but both of them got worse around the time this landed

matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
* [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]

* 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.
michaelgsharp pushed a commit to michaelgsharp/runtime that referenced this pull request May 9, 2024
* [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]

* 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.
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 2024
@radekdoulik

Copy link
Copy Markdown
Member Author

/backport to release/8.0

@github-actions

Copy link
Copy Markdown
Contributor
@github-actions github-actions Bot unlocked this conversation Oct 11, 2024
@github-actions

Copy link
Copy Markdown
Contributor

@radekdoulik backporting to release/8.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: [wasm] Do not use link flags for bitcode compilation
Using index info to reconstruct a base tree...
A	src/mono/wasm/build/WasmApp.Common.targets
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): src/mono/wasm/build/WasmApp.Common.targets deleted in HEAD and modified in [wasm] Do not use link flags for bitcode compilation. Version [wasm] Do not use link flags for bitcode compilation of src/mono/wasm/build/WasmApp.Common.targets left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 [wasm] Do not use link flags for bitcode compilation
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions

Copy link
Copy Markdown
Contributor

@radekdoulik an error occurred while backporting to release/8.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

3 participants