Skip to content
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] Do not use link flags for bitcode compilation #101397

Merged
merged 4 commits into from
Apr 23, 2024

Conversation

radekdoulik
Copy link
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]
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
Copy link
Member

kg commented Apr 24, 2024

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
Member Author

/backport to release/8.0

Copy link
Contributor

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/11293690685

@github-actions github-actions bot unlocked this conversation Oct 11, 2024
Copy link
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!

Copy link
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants