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] resolve llvm versioning in AOT toolchain #49644

Closed
lewing opened this issue Mar 15, 2021 · 11 comments
Closed

[wasm] resolve llvm versioning in AOT toolchain #49644

lewing opened this issue Mar 15, 2021 · 11 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Milestone

Comments

@lewing
Copy link
Member

lewing commented Mar 15, 2021

Right now mono-aot-cross is built with llvm 9.0.x(+mono patches) from packages produced out of https://github.com/dotnet/llvm-project. Then the bitcode the mono-aot-cross produces is consumed by the llvm12.0.x bundled with emsdk. This currently works because the 9.x vs 12.x bit code we product has remained compatible but we should aim to use the same llvm version across the entire toolchain and avoid breakage if that changes.

Emscripten uses a fairly stock llvm build now. It looks like the packaging parts happen
as part of https://github.com/WebAssembly/waterfall/blob/master/src/build.py
But it doesn't look like there is enough there to compile the cross compilers.

Since the browser cross compiler doesn't actually need the mono patches one possibility is that we could start producing llvm 12.0.x builds along side the 9.0.x builds in dotnet/llvm-project without forward porting the patches and start using those versions for the browser mono-aot-cross.

@lewing lewing added arch-wasm WebAssembly architecture area-Codegen-AOT-mono labels Mar 15, 2021
@lewing lewing added this to the 6.0.0 milestone Mar 15, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 15, 2021
@ghost
Copy link

ghost commented Mar 15, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Right now mono-aot-cross is built with llvm 9.0.x(+mono patches) from packages produced out of https://github.com/dotnet/llvm-project. Then the bitcode the mono-aot-cross produces is consumed by the llvm12.0.x bundled with emsdk. This currently works because the 9.x vs 12.x bit code we product has remained compatible but we should aim to use the same llvm version across the entire toolchain and avoid breakage if that changes.

Emscripten uses a fairly stock llvm build now. It looks like the packaging parts happen
as part of https://github.com/WebAssembly/waterfall/blob/master/src/build.py
But it doesn't look like there is enough there to compile the cross compilers.

Since the browser cross compiler doesn't actually need the mono patches one possibility is that we could start producing llvm 12.0.x builds along side the 9.0.x builds in dotnet/llvm-project without forward porting the patches and start using those versions for the browser mono-aot-cross.

Author: lewing
Assignees: -
Labels:

arch-wasm, area-Codegen-AOT-mono

Milestone: 6.0.0

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Mar 15, 2021
@marek-safar
Copy link
Contributor

@steveisok could you please handle this as part of emsdk packaging.

@directhex
Copy link
Contributor

MonoAOTBundleLLVMOptimizer in mono.proj needs to be false on Browser, then

@lewing
Copy link
Member Author

lewing commented Mar 24, 2021

#50132 removed llc and opt from the browser cross packages

@lewing
Copy link
Member Author

lewing commented May 13, 2021

I think there is work bumping to llvm11 underway now?

cc @SamMonoRT @imhameed

@imhameed
Copy link
Contributor

There is work bumping to LLVM 11 underway now. There's a tracking issue here: #51312

I still need to test patched-LLVM-11 on CI. LLVM 12 (patched or otherwise) should not be much more work to support.

If we do build and distribute a vanilla copy of the LLVM 12 static libraries via nuget (???) it should be named something other than "runtime.$(MonoLLVMHostOS)-$(MonoLLVMTargetArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk", so that we don't conflate patched-LLVM-12 with vanilla-LLVM-12.

@SamMonoRT
Copy link
Member

@lewing @akoeplinger @directhex - do we need anymore work here ?

@lewing lewing modified the milestones: 6.0.0, 7.0.0 Jul 9, 2021
@lewing
Copy link
Member Author

lewing commented Jul 9, 2021

@SamMonoRT 11 is a lot better, I'd like to try to come up with a long term plan here but I think we're good for 6, moving to 7

@ilonatommy
Copy link
Member

@lewing, succeeded in preparing a long-term plan?

@lewing
Copy link
Member Author

lewing commented Jul 25, 2022

Mono is at 11 still, there is work to move to 14.x in #72272 but we've pushed this work to 8 now.

@lewing lewing modified the milestones: 7.0.0, 8.0.0 Jul 25, 2022
@akoeplinger akoeplinger removed their assignment Aug 9, 2022
@lewing
Copy link
Member Author

lewing commented Jul 21, 2023

Fixed in the latest builds

@lewing lewing closed this as completed Jul 21, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Projects
None yet
Development

No branches or pull requests

7 participants