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

.NET: Implement support for AOT-compiling using LLVM #11379

Closed
rolfbjarne opened this issue Apr 29, 2021 · 5 comments · Fixed by #12136
Closed

.NET: Implement support for AOT-compiling using LLVM #11379

rolfbjarne opened this issue Apr 29, 2021 · 5 comments · Fixed by #12136
Labels
dotnet-pri0 .NET 6: required for stable release estimate-2d iOS Issues affecting Xamarin.iOS
Milestone

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented Apr 29, 2021

if ((abi & Abi.LLVM) == Abi.LLVM)
throw ErrorHelper.CreateError (99, $"Support for LLVM hasn't been implemented yet.");

This should be just a matter of copying/porting whatever mtouch does when using LLVM to dotnet-linker.

@rolfbjarne rolfbjarne added iOS Issues affecting Xamarin.iOS dotnet-pri0 .NET 6: required for stable release estimate-2d labels Apr 29, 2021
@rolfbjarne rolfbjarne added this to the .NET 6 milestone Apr 29, 2021
@marek-safar
Copy link
Contributor

Why is it conditional? I thought we discussed that only LLVM AOT will be used for net6 publishing?

@rolfbjarne
Copy link
Member Author

Why is it conditional? I thought we discussed that only LLVM AOT will be used for net6 publishing?

There's no condition, it just hasn't been implemented yet.

Although I don't see why we have to force people to use the LLVM AOT if the normal AOT they may use during debugging works for them (which doesn't mean we can't make the LLVM AOT the default).

@spouliot
Copy link
Contributor

spouliot commented Jun 4, 2021

Switching to the new AOT msbuild task (part of the workload) should be done first (or at the same time).

@SamMonoRT
Copy link

@dalexsoto @rolfbjarne @spouliot - any estimate on when this can be done ?

@rolfbjarne
Copy link
Member Author

@SamMonoRT I'm hoping to get this done for P7.

rolfbjarne added a commit that referenced this issue Jul 22, 2021
…M to build .NET apps. Fixes #11379. (#12176)

* [xharness] Add test case for running monotouch-test with LLVM on .NET on device.

* [dotnet] Parse MtouchUseLlvm.

* [tests] Add helper makefiles for building monotouch-test and MySimpleApp in .NET from the command line.

* [tools] Pass the AOTCompiler property to the ComputeAOTArguments linker steps.

So that the ComputeAOTArguments can compute the llvm-path value to pass to the AOT
compiler (the llvm-path value states where the opt and llc command-line tools are,
and they're next to the AOT compiler).

* [dotnet] Remove unused AOTCompileTaskBase.AOTData property.

* [msbuild/dotnet] Use properties on the _AssembliesToAOT item group to specify output paths.

This deduplicates a little bit code to compute the output path.

* [tools] Compute the llvm output file and pass it to the AOT compiler / native linker

* [msbuild] Remove unused CompileNativeCodeTaskBase.ObjectFiles property.

* [msbuild/dotnet] Make sure target Outputs show up in a task Output to make the build work correctly on windows.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet-pri0 .NET 6: required for stable release estimate-2d iOS Issues affecting Xamarin.iOS
Projects
None yet
4 participants