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

[dotnet/msbuild] Add support for using LLVM to build .NET apps. Fixes #11379. #12136

Merged
merged 10 commits into from
Jul 22, 2021

Conversation

rolfbjarne
Copy link
Member

Fixes #11379.

…er 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).
… specify output paths.

This deduplicates a little bit code to compute the output path.
@rolfbjarne rolfbjarne added not-notes-worthy Ignore for release notes run-dotnet-tests Run all the .NET tests labels Jul 16, 2021
@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (no change)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

2 tests failed, 119 tests passed.

Failed tests

  • monotouch-test/tvOS - simulator/Debug [dotnet]: Failed
  • monotouch-test/tvOS - simulator/Debug (static registrar) [dotnet]: Failed

Pipeline on Agent XAMBOT-1096.BigSur'
Merge 7514250 into dba3bf3

@@ -703,7 +705,7 @@
Condition="'$(_SdkIsSimulator)' != 'true' And '$(_PlatformName)' != 'macOS'"
DependsOnTargets="_ComputeVariables"
Inputs="@(_AssembliesToAOT)"
Outputs="@(_AssembliesToAOT -> '$(_AOTOutputDirectory)%(Arch)\%(Filename)%(Extension).o')">
Outputs="@(_AssembliesToAOT -> '%(ObjectFile)');@(_AssembliesToAOT -> '%(LLVMFile)');">
Copy link
Contributor

@emaf emaf Jul 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rolfbjarne are both ObjectFile and LLVMFile ITaskItem outputs of any task? I'm assuming those files will be produced by a task executed on macOS, so we need those to be an output prop of a task so they are copied to Windows to make the Inputs/Outputs check work, otherwise this target will always be executed from Windows.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emaf I changed this to add these files to FileWrites: d59c218, would that work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that should work!

Copy link
Contributor

@spouliot spouliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not seems to fulfill the request of having LLVM by default for release (non-debug) builds.

It might be elsewhere... I'm a bit behind on the changes :)

@rolfbjarne
Copy link
Member Author

That does not seems to fulfill the request of having LLVM by default for release (non-debug) builds.

Before we can make it the default, we have to implement it :) Making it the default once it's working is easy enough.

@spouliot
Copy link
Contributor

we have to implement it

hmm... I thought this PR was the (last) missing piece.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (no change)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

🎉 All 121 tests passed 🎉

Pipeline on Agent XAMBOT-1100.BigSur'
Merge c0a7bf5 into e968a93

@rolfbjarne
Copy link
Member Author

we have to implement it

hmm... I thought this PR was the (last) missing piece.

I've created #12147 to track making LLVM the default for release builds.

@rolfbjarne rolfbjarne merged commit 1b35720 into xamarin:main Jul 22, 2021
@rolfbjarne rolfbjarne deleted the dotnet-llvm branch July 22, 2021 13:49
@rolfbjarne
Copy link
Member Author

/sudo backport release/6.0.1xx-preview7

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch release/6.0.1xx-preview7 Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5007997 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-notes-worthy Ignore for release notes run-dotnet-tests Run all the .NET tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET: Implement support for AOT-compiling using LLVM
4 participants