Skip to content

Conversation

jkurdek
Copy link
Contributor

@jkurdek jkurdek commented Dec 4, 2024

Android NDK 27 does not ship with an assembler. The recommendation is to use clang. This PR makes MonoAOT compiler use clang assembler when building android.

Related PR bumping version of NDK to 27: dotnet/dotnet-buildtools-prereqs-docker#1278

Changes were verified here: #110196

Copy link
Contributor

Tagging subscribers to this area: @akoeplinger, @matouskozak
See info in area-owners.md if you want to be subscribed.

@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 5, 2024

/azp run runtime-android, runtime-androidemulator

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 5, 2024

/azp run runtime-android, runtime-androidemulator

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

<AndroidLibraryMinApiLevel Condition="'$(AndroidLibraryMinApiLevel)' == ''">21</AndroidLibraryMinApiLevel>
</PropertyGroup>

<NdkToolFinderTask
Copy link
Member

Choose a reason for hiding this comment

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

Did you happen to test library mode with this change?

Copy link
Member

Choose a reason for hiding this comment

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

+1 :) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had an offline discussion with @steveisok about this. We agree that this should be handled as a follow up: #110757

@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 13, 2024

Android fails are unrelated :)

Comment on lines 115 to 126
<PropertyGroup>
<_Triple Condition="'$(TargetArchitecture)' == 'arm'">armv7-linux-gnueabi</_Triple>
<_Triple Condition="'$(TargetArchitecture)' == 'arm64'">aarch64-linux-android</_Triple>
<_Triple Condition="'$(TargetArchitecture)' == 'x86'">i686-linux-android</_Triple>
<_Triple Condition="'$(TargetArchitecture)' == 'x64'">x86_64-linux-android</_Triple>
</PropertyGroup>

<PropertyGroup>
<_LdName>clang</_LdName>
<_LdOptions>-fuse-ld=lld</_LdOptions>
<_AsName>clang</_AsName>
</PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

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

Can we extract these settings to a common .props file so that we don't specify them in the AndroidSampleApp again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

<AndroidLibraryMinApiLevel Condition="'$(AndroidLibraryMinApiLevel)' == ''">21</AndroidLibraryMinApiLevel>
</PropertyGroup>

<NdkToolFinderTask
Copy link
Member

Choose a reason for hiding this comment

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

+1 :) ?

@ivanpovazan
Copy link
Member

When testing, did we run runtime-extra-platforms?
Just want to make sure that running runtime-android and runtime-androidemulator have the same coverage?

@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 16, 2024

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 18, 2024

/azp run runtime-extra-platforms, runtime-android, runtime-androidemulator

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@ivanpovazan ivanpovazan left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

PS Having a sample app reuse AndroidBuild.targets configuration can be done in a separate PR

@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 18, 2024

/ba-g test failures unrelated, android lines pass

@jkurdek jkurdek merged commit 5e52384 into dotnet:main Dec 18, 2024
198 of 210 checks passed
@jkurdek
Copy link
Contributor Author

jkurdek commented Dec 18, 2024

/backport to release/9.0-staging

Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12395728413

Copy link
Contributor

github-actions bot commented Jan 7, 2025

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12652267420

@jkurdek
Copy link
Contributor Author

jkurdek commented Jan 21, 2025

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/12889807952

@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2025
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