Skip to content

Commit

Permalink
[NativeAOT] Don't publish any *.o files that comes from NativeAOT. (#…
Browse files Browse the repository at this point in the history
…18904)

If anything we're supposed to link with *.o files, not publish them, but
since we're currently not handling any *.o files, just explicitly remove them
from the build. This avoids a warning where ComputeBundleLocation would issue
a warning about not knowing what to do with them.

Contributes towards #18629.

---------

Co-authored-by: Ivan Povazan <55002338+ivanpovazan@users.noreply.github.com>
  • Loading branch information
rolfbjarne and ivanpovazan committed Sep 5, 2023
1 parent d7b97ab commit 50071c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,18 @@
"
/>

<!-- There's no need to ship any *.o files shipped by NativeAOT -->
<!-- We need to remove these from ResolvedFileToPublish before calling ComputeBundleLocation, because otherwise we get warnings about not knowing what to do with these files -->
<ResolvedFileToPublish
Remove="@(ResolvedFileToPublish)"
Condition=" '%(ResolvedFileToPublish.AssetType)' == 'native' And
'%(ResolvedFileToPublish.RuntimeIdentifier)' == '$(RuntimeIdentifier)' And
'%(ResolvedFileToPublish.Extension)' == '.o' And
'%(ResolvedFileToPublish.NuGetPackageId)' == '$(_MonoNugetPackageId)' And
'$(_UseNativeAot)' == 'true'
"
/>

<!-- Put the 'createdump' executable in the expected location in the app bundle when using CoreCLR -->
<!-- Ref: https://github.com/xamarin/xamarin-macios/issues/11432 -->
<_CreateDumpExecutable
Expand Down

6 comments on commit 50071c3

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.