Skip to content

[CoreCLR] link app native runtime/library statically #9938

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

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
47645e6
Package CLR host static archives
grendello Mar 19, 2025
ae6d47b
Package NDK redistributables into our runtime packs
grendello Mar 19, 2025
7e5a9ab
Build's broken atm, tbc tomorrow
grendello Mar 19, 2025
80b5563
Builds now
grendello Mar 20, 2025
0bd1fbf
More archives to package
grendello Mar 20, 2025
321f436
Builds now
grendello Mar 20, 2025
6961f10
Nope. Not here.
grendello Mar 20, 2025
0fc60ca
Symbol preservation tweaks
grendello Mar 20, 2025
a9538f7
Better. Next step, dotnet/runtime libs (not in runtime pack, alas)
grendello Mar 20, 2025
64c8d23
Some progress, still ways to go.
grendello Mar 21, 2025
4260d5a
Enable a bunch of p/invokes
grendello Mar 24, 2025
284063e
Fix archive path
grendello Mar 24, 2025
12cf7f0
Make clr hack use configurable build config
grendello Mar 25, 2025
22b0920
Package actual NDK libs instead of stubs
grendello Mar 26, 2025
b62b4de
[WIP] reshaping linking
grendello Mar 27, 2025
36b8d1c
Remove TODO and add a debug message
grendello Mar 27, 2025
e001488
Strip debug symbols again
grendello Mar 27, 2025
860415c
Some must-have flags
grendello Mar 28, 2025
1d7a1c2
Fix after rebase
grendello Mar 28, 2025
0c94c91
Fix indentation
grendello Mar 28, 2025
7132aa3
Use NativeLinker for libxamarin-app.so too
grendello Mar 31, 2025
c90f569
Use MonoAndroidHelper.RunProcess
grendello Mar 31, 2025
b9fb57d
Fix typo
grendello Apr 1, 2025
b0d090b
Quote response file path
grendello Apr 1, 2025
baba387
Remove library stubs
grendello Apr 1, 2025
2a77027
Fix after rebase
grendello Apr 9, 2025
9a257d2
Post-rebase fixlet
grendello Apr 9, 2025
e5d0531
Fix a typo
grendello Apr 9, 2025
0108731
Link `libcoreclrpal.a` whole, just like upstream does
grendello Apr 9, 2025
0da459c
Update after the recent timing changes
grendello Apr 22, 2025
7d5d43e
Fix after rebase
grendello Apr 24, 2025
6c304f1
Post-rebase fixes
grendello Apr 24, 2025
f114167
Add support for -Bsymbolic
grendello Apr 24, 2025
ad282f3
Fix after rebase
grendello Apr 25, 2025
93ce0f1
Fixes after 'main' branch changes
grendello Apr 25, 2025
6bf2b72
Fix after rebase
grendello Apr 30, 2025
52e45bf
Rebase on `main` and fix NRT errors
grendello May 6, 2025
468b5b7
Fix after rebase
grendello May 12, 2025
33515b0
Fix after rebase
grendello May 13, 2025
36a8933
Use the new `libcoreclr_static.a` library
grendello May 13, 2025
9327572
oops
grendello May 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@
AndroidRuntime="CoreCLR" />
</ItemGroup>

<!-- These properties serve the purpose of not duplicating the strings between xaprepare and
package creation tools -->
<PropertyGroup>
<_MonoRuntimeFlavorDirName>mono</_MonoRuntimeFlavorDirName>
<_CLRRuntimeFlavorDirName>clr</_CLRRuntimeFlavorDirName>
<_RuntimeRedistDirName>redist</_RuntimeRedistDirName>
</PropertyGroup>

<PropertyGroup>
<_RuntimeRedistDirName>redist</_RuntimeRedistDirName>
</PropertyGroup>
Expand Down
36 changes: 33 additions & 3 deletions build-tools/create-packs/Microsoft.Android.Runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,51 @@ projects that use the Microsoft.Android.Runtimes framework in .NET 6+.
DependsOnTargets="_GetLicense;_GetDefaultPackageVersion"
BeforeTargets="GetFilesToPackage" >
<PropertyGroup>
<_RuntimeFlavorDirName Condition=" '$(AndroidRuntime)' == 'CoreCLR' ">clr</_RuntimeFlavorDirName>
<_RuntimeFlavorDirName Condition=" '$(AndroidRuntime)' == 'Mono' Or '$(AndroidRuntime)' == '' ">mono</_RuntimeFlavorDirName>
<_RuntimeFlavorDirName Condition=" '$(AndroidRuntime)' == 'CoreCLR' ">$(_CLRRuntimeFlavorDirName)</_RuntimeFlavorDirName>
<_RuntimeFlavorDirName Condition=" '$(AndroidRuntime)' == 'Mono' Or '$(AndroidRuntime)' == '' ">$(_MonoRuntimeFlavorDirName)</_RuntimeFlavorDirName>
<_ClangArch Condition=" '$(AndroidRID)' == 'android-arm64' ">aarch64</_ClangArch>
<_ClangArch Condition=" '$(AndroidRID)' == 'android-arm' ">arm</_ClangArch>
<_ClangArch Condition=" '$(AndroidRID)' == 'android-x64' ">x86_64</_ClangArch>
<_ClangArch Condition=" '$(AndroidRID)' == 'android-x86' ">i686</_ClangArch>
</PropertyGroup>

<ItemGroup Condition=" '$(AndroidRuntime)' == 'CoreCLR' ">
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.debug-static-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.debug-static-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.debug.so') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.debug.so" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release-static-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release-static-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release.so') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release.so" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-common-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-common-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-common-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-common-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-java-interop-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-java-interop-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-java-interop-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-java-interop-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-lz4-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-lz4-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-lz4-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-lz4-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-shared-bits-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-shared-bits-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-shared-bits-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxa-shared-bits-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxamarin-startup-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxamarin-startup-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxamarin-startup-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxamarin-startup-release.a" />

<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeRedistDirName)\$(AndroidRID)\crtbegin_so.o" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeRedistDirName)\$(AndroidRID)\crtend_so.o" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeRedistDirName)\$(AndroidRID)\libc++_static.a" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeRedistDirName)\$(AndroidRID)\libc++abi.a" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeRedistDirName)\$(AndroidRID)\libclang_rt.builtins-$(_ClangArch)-android.a" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeRedistDirName)\$(AndroidRID)\libunwind.a" />
</ItemGroup>

<ItemGroup Condition=" '$(AndroidRuntime)' == 'Mono' ">
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libmono-android.debug.so" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libmono-android.release.so" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxamarin-debug-app-helper.so" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libxamarin-native-tracing.so" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin.a" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin-debug.a" />
<NativeRuntimeAsset Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libunwind_xamarin-release.a" />
</ItemGroup>

<ItemGroup Condition=" '$(AndroidRuntime)' != 'NativeAOT' ">
Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/generate-pinvoke-tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HOST="$(uname | tr A-Z a-z)"
NATIVE_DIR="${MY_DIR}/../../src/native"
MONODROID_SOURCE_DIR="${NATIVE_DIR}/mono/pinvoke-override"
MONODROID_INCLUDE_DIR="${NATIVE_DIR}/mono/shared"
CLR_SOURCE_DIR="${NATIVE_DIR}/clr/host"
CLR_SOURCE_DIR="${NATIVE_DIR}/clr/pinvoke-override"
CLR_INCLUDE_DIR="${NATIVE_DIR}/clr/include/shared"
GENERATOR_SOURCE="generate-pinvoke-tables.cc"
GENERATOR_BINARY="generate-pinvoke-tables"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ static class KnownProperties
public const string AndroidToolchainDirectory = "AndroidToolchainDirectory";
public const string AutoProvision = "AutoProvision";
public const string AutoProvisionUsesSudo = "AutoProvisionUsesSudo";
public const string CLRRuntimeFlavorDirName = "_CLRRuntimeFlavorDirName";
public const string CMakePath = "CmakePath";
public const string Configuration = "Configuration";
public const string CommandLineToolsVersion = nameof (CommandLineToolsVersion);
Expand Down Expand Up @@ -46,6 +47,7 @@ static class KnownProperties
public const string MonoDarwinPackageUrl = "MonoDarwinPackageUrl";
public const string MonoRequiredMinimumVersion = "MonoRequiredMinimumVersion";
public const string MonoRequiredMaximumVersion = "MonoRequiredMaximumVersion";
public const string MonoRuntimeFlavorDirName = "_MonoRuntimeFlavorDirName";
public const string MonoSourceFullPath = "MonoSourceFullPath";
public const string NativeRuntimeOutputRootDir = "NativeRuntimeOutputRootDir";
public const string NinjaPath = "NinjaPath";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Xamarin.Android.Prepare
properties.Add (KnownProperties.AndroidToolchainDirectory, StripQuotes (@"@AndroidToolchainDirectory@"));
properties.Add (KnownProperties.AutoProvision, StripQuotes ("@AutoProvision@"));
properties.Add (KnownProperties.AutoProvisionUsesSudo, StripQuotes ("@AutoProvisionUsesSudo@"));
properties.Add (KnownProperties.CLRRuntimeFlavorDirName, StripQuotes ("@_CLRRuntimeFlavorDirName@"));
properties.Add (KnownProperties.CMakePath, StripQuotes (@"@CmakePath@"));
properties.Add (KnownProperties.Configuration, StripQuotes ("@Configuration@"));
properties.Add (KnownProperties.CommandLineToolsFolder, StripQuotes ("@CommandLineToolsFolder@"));
Expand All @@ -48,6 +49,7 @@ namespace Xamarin.Android.Prepare
properties.Add (KnownProperties.MicrosoftAndroidSdkOutDir, StripQuotes (@"@MicrosoftAndroidSdkOutDir@"));
properties.Add (KnownProperties.MonoCecilVersion, StripQuotes ("@MonoCecilVersion@"));
properties.Add (KnownProperties.MonoDarwinPackageUrl, StripQuotes ("@MonoDarwinPackageUrl@"));
properties.Add (KnownProperties.MonoRuntimeFlavorDirName, StripQuotes ("@_MonoRuntimeFlavorDirName@"));
properties.Add (KnownProperties.MonoRequiredMinimumVersion, StripQuotes ("@MonoRequiredMinimumVersion@"));
properties.Add (KnownProperties.MonoRequiredMaximumVersion, StripQuotes ("@MonoRequiredMaximumVersion@"));
properties.Add (KnownProperties.MonoSourceFullPath, StripQuotes (@"@MonoSourceFullPath@"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ public static partial class Defaults
{ "x86_64", "android-x64" },
};

public static readonly Dictionary<string, string> AbiToClangArch = new (StringComparer.Ordinal) {
{ "armeabi-v7a", "arm" },
{ "arm64-v8a", "aarch64" },
{ "x86", "i686" },
{ "x86_64", "x86_64" },
};

public static readonly List <NDKTool> NDKTools = new List<NDKTool> {
// Tools prefixed with architecture triple
new NDKTool (name: "as", prefixed: true),
Expand Down Expand Up @@ -233,6 +240,7 @@ public static partial class Paths
// Other
public static string AndroidNdkDirectory => ctx.Properties.GetRequiredValue (KnownProperties.AndroidNdkDirectory);
public static string AndroidToolchainRootDirectory => GetCachedPath (ref androidToolchainRootDirectory, () => Path.Combine (AndroidNdkDirectory, "toolchains", "llvm", "prebuilt", NdkToolchainOSTag));
public static string AndroidClangRootDirectory => GetCachedPath (ref androidClangRootDirectory, () => Path.Combine (AndroidToolchainRootDirectory, "lib", "clang"));
public static string AndroidToolchainBinDirectory => GetCachedPath (ref androidToolchainBinDirectory, () => Path.Combine (AndroidToolchainRootDirectory, "bin"));
public static string AndroidToolchainSysrootLibDirectory => GetCachedPath (ref androidToolchainSysrootLibDirectory, () => Path.Combine (AndroidToolchainRootDirectory, "sysroot", "usr", "lib"));
public static string WindowsBinutilsInstallDir => GetCachedPath (ref windowsBinutilsInstallDir, () => Path.Combine (InstallMSBuildDir, "binutils"));
Expand Down Expand Up @@ -288,6 +296,7 @@ static string GetCachedPath (ref string? variable, Func<string> creator)
static string? buildBinDir;
static string? binDir;
static string? androidToolchainRootDirectory;
static string? androidClangRootDirectory;
static string? androidToolchainBinDirectory;
static string? androidToolchainSysrootLibDirectory;
static string? installMSBuildDir;
Expand Down
35 changes: 35 additions & 0 deletions build-tools/xaprepare/xaprepare/Steps/Step_Android_SDK_NDK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,24 @@ sealed class AndroidPackage
#nullable enable

static readonly string[] CRTFiles = {
"crtbegin_so.o",
"crtend_so.o",
"libc.so",
"libdl.so",
"liblog.so",
"libm.so",
"libz.so",
};

static readonly string[] CPPAbiFiles = {
"libc++_static.a",
"libc++abi.a",
};

static readonly string[] ClangArchFiles = {
"libunwind.a",
};

bool RefreshSdk = false;
bool RefreshNdk = false;
AndroidToolchainComponentType DependencyTypeToInstall = AndroidToolchainComponentType.All;
Expand Down Expand Up @@ -189,14 +200,38 @@ bool CopyRedistributableFiles (Context context)
throw new InvalidOperationException ($"Unknown LLVM version format for '{lines[0]}'");
}

string clangLibPath = Path.Combine (
Configurables.Paths.AndroidClangRootDirectory,
llvmVersion[0],
"lib",
"linux"
);

foreach (var kvp in Configurables.Defaults.AndroidToolchainPrefixes) {
string abi = kvp.Key;
string abiDir = Path.Combine (Configurables.Paths.AndroidToolchainSysrootLibDirectory, kvp.Value);
string crtFilesPath = Path.Combine (abiDir, BuildAndroidPlatforms.NdkMinimumAPI.ToString (CultureInfo.InvariantCulture));
string clangArch = Configurables.Defaults.AbiToClangArch[abi];

foreach (string file in CRTFiles) {
CopyFile (abi, crtFilesPath, file);
}

foreach (string file in CPPAbiFiles) {
CopyFile (abi, abiDir, file);
}

CopyFile (abi, clangLibPath, $"libclang_rt.builtins-{clangArch}-android.a");

// Yay, consistency
if (String.Compare (clangArch, "i686", StringComparison.Ordinal) == 0) {
clangArch = "i386";
}
string clangArchLibPath = Path.Combine (clangLibPath, clangArch);

foreach (string file in ClangArchFiles) {
CopyFile (abi, clangArchLibPath, file);
}
}

return true;
Expand Down
2 changes: 2 additions & 0 deletions build-tools/xaprepare/xaprepare/xaprepare.targets
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
Replacements="@XA_SOURCE_ROOT@=$([System.IO.Path]::GetFullPath ('$(MSBuildThisFileDirectory)..\..\..'));@XA_PREPARE_SOURCE@=$([System.IO.Path]::GetFullPath ('$(MSBuildThisFileDirectory)\.'));@XA_PRODUCT_VERSION@=$(ProductVersion)" />

<ItemGroup>
<Replacement Include="@_CLRRuntimeFlavorDirName@=$(_CLRRuntimeFlavorDirName)" />
<Replacement Include="@_MonoRuntimeFlavorDirName@=$(_MonoRuntimeFlavorDirName)" />
<Replacement Include="@AndroidLatestStableFrameworkVersion@=$(AndroidLatestStableFrameworkVersion)" />
<Replacement Include="@AndroidCmakeUrlPrefix@=$(AndroidCmakeUrlPrefix)" />
<Replacement Include="@AndroidCmakeVersion@=$(AndroidCmakeVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ This file is imported *after* the Microsoft.NET.Sdk/Sdk.targets.
<Import Project="Microsoft.Android.Sdk.Aot.targets" Condition=" '$(AndroidApplication)' == 'true' " />
<Import Project="Microsoft.Android.Sdk.Application.targets" Condition=" '$(AndroidApplication)' == 'true' " />
<Import Project="Microsoft.Android.Sdk.AssemblyResolution.targets" />

<!-- This one must be imported after `Microsoft.Android.Sdk.AssemblyResolution.targets` -->
<Import Project="Microsoft.Android.Sdk.NativeRuntime.targets" Condition=" '$(AndroidApplication)' == 'true' And '$(_AndroidRuntime)' == 'CoreCLR' " />

<Import Project="Microsoft.Android.Sdk.ILLink.targets" />
<Import Project="Microsoft.Android.Sdk.ProjectCapabilities.targets" />
<Import Project="Microsoft.Android.Sdk.Publish.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ _ResolveAssemblies MSBuild target.
</ItemGroup>

<ProcessNativeLibraries
NativeRuntimeLinking="$(_AndroidEnableNativeRuntimeLinking)"
InputLibraries="@(_ResolvedNativeLibraries)"
ExcludedLibraries="@(_ExcludedNativeLibraries)"
Components="@(_MonoComponent->Distinct())"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ properties that determine build ordering.
_ReadAndroidManifest;
_CompileJava;
_CreateApplicationSharedLibraries;
_LinkNativeRuntime;
_CompileDex;
$(_AfterCompileDex);
_CreateBaseApk;
Expand Down
Loading
Loading