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

[Microsoft.Android.Sdk.ILLink] remove more linker sources #8572

Merged

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Dec 7, 2023

This removes various linker sources that are no longer used in xamarin-android/main and .NET 9. These shouldn't actually affect any .dll / binaries we produce, but merely reorganizes and removes files.

  • Delete unused *.cs files

  • Delete unused *.xml files

  • Move appropriate *.cs files to Microsoft.Android.Sdk.ILLink.

  • Remove appropriate #if ILLINK blocks for moved *.cs files, as this code is not shared with Xamarin.Android.Build.Tasks.csproj.

After this change, we have the following files shared (where #if ILLINK is still used):

<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AddKeepAlivesStep.cs" Link="MonoDroid.Tuner\AddKeepAlivesStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AndroidLinkConfiguration.cs" Link="MonoDroid.Tuner\AndroidLinkConfiguration.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\Extensions.cs" Link="MonoDroid.Tuner\Extensions.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\FixAbstractMethodsStep.cs" Link="MonoDroid.Tuner\FixAbstractMethodsStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\FixLegacyResourceDesignerStep.cs" Link="MonoDroid.Tuner\FixLegacyResourceDesignerStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\LinkDesignerBase.cs" Link="MonoDroid.Tuner\LinkDesignerBase.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\RemoveResourceDesignerStep.cs" Link="MonoDroid.Tuner\RemoveResourceDesignerStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\MonoDroidProfile.cs" Link="MonoDroid.Tuner\MonoDroidProfile.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\Mobile.Tuner\MobileProfile.cs" Link="Mobile.Tuner\MobileProfile.cs" />

This removes various linker sources that are no longer used in
xamarin-android/main and .NET 9. These shouldn't actually affect any
`.dll` / binaries we produce, but merely reorganizes and removes files.

* Delete unused `*.cs` files

* Delete unused `*.xml` files

* Move appropriate `*.cs` files to `Microsoft.Android.Sdk.ILLink`.

* Remove appropriate `#if ILLINK` blocks for moved `*.cs` files, as this
  code is not shared with `Xamarin.Android.Build.Tasks.csproj`.

After this change, we have the following files shared (where `#if
ILLINK` is still used):

    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AddKeepAlivesStep.cs" Link="MonoDroid.Tuner\AddKeepAlivesStep.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AndroidLinkConfiguration.cs" Link="MonoDroid.Tuner\AndroidLinkConfiguration.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\Extensions.cs" Link="MonoDroid.Tuner\Extensions.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\FixAbstractMethodsStep.cs" Link="MonoDroid.Tuner\FixAbstractMethodsStep.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\FixLegacyResourceDesignerStep.cs" Link="MonoDroid.Tuner\FixLegacyResourceDesignerStep.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\LinkDesignerBase.cs" Link="MonoDroid.Tuner\LinkDesignerBase.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\RemoveResourceDesignerStep.cs" Link="MonoDroid.Tuner\RemoveResourceDesignerStep.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\MonoDroidProfile.cs" Link="MonoDroid.Tuner\MonoDroidProfile.cs" />
    <Compile Include="..\Xamarin.Android.Build.Tasks\Linker\Mobile.Tuner\MobileProfile.cs" Link="Mobile.Tuner\MobileProfile.cs" />
Comment on lines -195 to -212
<EmbeddedResource Include="Linker\PreserveLists\Java.Interop.xml">
<LogicalName>Java.Interop.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Linker\PreserveLists\mscorlib.xml">
<LogicalName>mscorlib.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Linker\PreserveLists\System.Data.Services.Client.xml">
<LogicalName>System.Data.Services.Client.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Linker\PreserveLists\System.ServiceModel.xml">
<LogicalName>System.ServiceModel.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Linker\PreserveLists\OpenTK.xml">
<LogicalName>OpenTK.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Linker\PreserveLists\Mono.Android.xml">
<LogicalName>Mono.Android.xml</LogicalName>
</EmbeddedResource>
Copy link
Member Author

Choose a reason for hiding this comment

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

@jonathanpeppers jonathanpeppers merged commit 9d39576 into dotnet:main Dec 8, 2023
45 of 47 checks passed
@jonathanpeppers jonathanpeppers deleted the RemoveMoreLinkerSources branch December 8, 2023 19:40
grendello added a commit that referenced this pull request Dec 11, 2023
* main:
  [Microsoft.Android.Sdk.ILLink] remove more linker sources (#8572)
  [Mono.Android] Remove `AdditionalProperties` from Java.Interop tools project references. (#8573)
  LEGO: Merge pull request 8575
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants