From 752511bfca2a9a72868c1ecec28cbd7a31bdf538 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Fri, 17 Jan 2025 17:38:36 +0100 Subject: [PATCH 01/14] Move default AOT properties to a common props file --- .../android/build/AndroidBuild.targets | 34 ++----------------- .../sample/Android/AndroidSampleApp.csproj | 22 ------------ .../AotCompilerTask/MonoAOTCompiler.props | 22 +++++++----- 3 files changed, 16 insertions(+), 62 deletions(-) diff --git a/src/mono/msbuild/android/build/AndroidBuild.targets b/src/mono/msbuild/android/build/AndroidBuild.targets index 6774939f2fba4e..f5422d31f560a5 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.targets @@ -7,9 +7,8 @@ false - + + @@ -112,33 +111,11 @@ <_AotOutputType>ObjectFile - - <_Triple Condition="'$(TargetArchitecture)' == 'arm'">armv7-linux-gnueabi - <_Triple Condition="'$(TargetArchitecture)' == 'arm64'">aarch64-linux-android - <_Triple Condition="'$(TargetArchitecture)' == 'x86'">i686-linux-android - <_Triple Condition="'$(TargetArchitecture)' == 'x64'">x86_64-linux-android - - - - <_AsOptions>-target $(_Triple) -c -x assembler - <_LdName>clang - <_LdOptions>-fuse-ld=lld - <_AsName>clang - - + - - - - - - - - - @@ -150,11 +127,6 @@ 21 - - <_AsPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_AsPrefixPath)')) - <_ToolPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_ToolPrefixPath)')) - - <_AotInputAssemblies Include="@(_AssembliesToBundleInternal)" Condition="'%(_AssembliesToBundleInternal._InternalForceInterpret)' != 'true'"> diff --git a/src/mono/sample/Android/AndroidSampleApp.csproj b/src/mono/sample/Android/AndroidSampleApp.csproj index 573b44ee710530..3d4bec9423a299 100644 --- a/src/mono/sample/Android/AndroidSampleApp.csproj +++ b/src/mono/sample/Android/AndroidSampleApp.csproj @@ -19,9 +19,6 @@ AssemblyFile="$(AndroidAppBuilderTasksAssemblyPath)"/> - <_MobileIntermediateOutputPath>$(IntermediateOutputPath)mobile @@ -69,25 +66,6 @@ 21 - - <_AsPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_AsPrefixPath)')) - <_ToolPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_ToolPrefixPath)')) - - - - <_Triple Condition="'$(TargetArchitecture)' == 'arm'">armv7-linux-gnueabi - <_Triple Condition="'$(TargetArchitecture)' == 'arm64'">aarch64-linux-android - <_Triple Condition="'$(TargetArchitecture)' == 'x86'">i686-linux-android - <_Triple Condition="'$(TargetArchitecture)' == 'x64'">x86_64-linux-android - - - - <_AsOptions>-target $(_Triple) -c -x assembler - <_LdName>clang - <_LdOptions>-fuse-ld=lld - <_AsName>clang - - - - @@ -15,12 +13,6 @@ - - - - - - @@ -28,7 +20,9 @@ - + + + @@ -36,4 +30,14 @@ + + <_Triple Condition="'$(TargetArchitecture)' == 'arm'">armv7-linux-gnueabi + <_Triple Condition="'$(TargetArchitecture)' == 'arm64'">aarch64-linux-android + <_Triple Condition="'$(TargetArchitecture)' == 'x86'">i686-linux-android + <_Triple Condition="'$(TargetArchitecture)' == 'x64'">x86_64-linux-android + <_AsOptions>-target $(_Triple) -c -x assembler + <_LdName>clang + <_LdOptions>-fuse-ld=lld + <_AsName>clang + From b9f09c48ac023d95fcc3b434e6d3baed314d79ae Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Sun, 19 Jan 2025 18:21:44 +0100 Subject: [PATCH 02/14] Use AndroidBuild.targets in AndroidSampleApp --- .../android/build/AndroidBuild.targets | 8 +- .../sample/Android/AndroidSampleApp.csproj | 115 +++--------------- src/mono/sample/Android/Makefile | 2 +- 3 files changed, 21 insertions(+), 104 deletions(-) diff --git a/src/mono/msbuild/android/build/AndroidBuild.targets b/src/mono/msbuild/android/build/AndroidBuild.targets index f5422d31f560a5..1e0aee61096ca8 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.targets @@ -23,6 +23,8 @@ <_MobileIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'mobile')) $(PlatformTarget) + $(AssemblyName) + False @@ -93,7 +95,7 @@ <_AOTMode Condition="'$(UseMonoJustInterp)' != 'true'">Normal <_AOTMode Condition="'$(UseMonoJustInterp)' == 'true'">JustInterp - <_AOTMode Condition="'$(ForceFullAOT)' == 'true'">Full + <_AOTMode Condition="'$(ForceAOT)' == 'true' and '$(AOTWithLibraryFiles)' != 'true'">Full <_AotOutputType>AsmOnly @@ -241,10 +243,10 @@ MonoRuntimeHeaders="$(_MonoHeaderPath)" NativeDependencies="@(_NativeDependencies)" OutputDir="$(AndroidBundleDir)" - ProjectName="$(AssemblyName)" + ProjectName="$(AppName)" RuntimeComponents="@(RuntimeComponents)" RuntimeIdentifier="$(RuntimeIdentifier)" - StripDebugSymbols="False"> + StripDebugSymbols="$(StripDebugSymbols)"> diff --git a/src/mono/sample/Android/AndroidSampleApp.csproj b/src/mono/sample/Android/AndroidSampleApp.csproj index 3d4bec9423a299..283b8011453ef6 100644 --- a/src/mono/sample/Android/AndroidSampleApp.csproj +++ b/src/mono/sample/Android/AndroidSampleApp.csproj @@ -1,123 +1,38 @@ Exe - false $(NetCoreAppCurrent) android-$(TargetArchitecture) true true Link false + $(ForceAOT) + True + HelloAndroid + $(AssemblyName).dll + true + <_UseAotDataFile>false - - - - - - <_MobileIntermediateOutputPath>$(IntermediateOutputPath)mobile - - - - - False - True - $(PublishDir)apk\ - - - - - @(MonoAOTCompilerDefaultAotArguments, ';') - @(MonoAOTCompilerDefaultProcessArguments, ';') - - + + - - - - - - - - - - - - - <_AotOutputType>Library - <_AotLibraryFormat>So - <_AotMode Condition="'$(AotMode)' == ''">Normal - - - - <_AotOutputType>AsmOnly - <_AotModulesTablePath>$(ApkDir)\modules.c - <_AotMode Condition="'$(AotMode)' == ''">Full - - - - 21 - - - - - - - - - - - - - - - + + - - - - + AfterTargets="_AfterAndroidBuild" + DependsOnTargets="$(AndroidBuildDependsOn)" > diff --git a/src/mono/sample/Android/Makefile b/src/mono/sample/Android/Makefile index 64f5e13a5e89a6..040162250fe67a 100644 --- a/src/mono/sample/Android/Makefile +++ b/src/mono/sample/Android/Makefile @@ -29,7 +29,7 @@ run: /p:ForceAOT=$(AOT) \ /p:AOTWithLibraryFiles=$(AOT_WITH_LIBRARY_FILES) \ /p:MonoForceInterpreter=$(INTERP) \ - /p:UseLLVM=$(USE_LLVM) \ + /p:MonoEnableLLVM=$(USE_LLVM) \ /p:RunActivity=false \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' clean: From 5800ff8827826e50689160ea7e810c98eb8766fb Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Mon, 20 Jan 2025 09:45:37 +0100 Subject: [PATCH 03/14] Adding a comment on usage of UseAotDataFile opt --- src/mono/sample/Android/AndroidSampleApp.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mono/sample/Android/AndroidSampleApp.csproj b/src/mono/sample/Android/AndroidSampleApp.csproj index 283b8011453ef6..421aed5dbfd68e 100644 --- a/src/mono/sample/Android/AndroidSampleApp.csproj +++ b/src/mono/sample/Android/AndroidSampleApp.csproj @@ -12,7 +12,8 @@ HelloAndroid $(AssemblyName).dll true - <_UseAotDataFile>false + + <_UseAotDataFile Condition="'$(RunAOTCompilation)' == 'true'">false From a071826af98118450ee6245a228bd81a3430fd20 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Tue, 21 Jan 2025 13:33:53 +0100 Subject: [PATCH 04/14] Relocate MonoAOTCompiler.props and ship it as part of LibraryBuilder.nupkg --- Directory.Build.props | 1 - src/mono/msbuild/android/build/AndroidBuild.props | 1 + src/mono/msbuild/android/build/AndroidBuild.targets | 2 -- src/mono/msbuild/apple/build/AppleBuild.props | 5 +++-- .../msbuild/common}/MonoAOTCompiler.props | 0 .../Microsoft.NET.Runtime.LibraryBuilder.Sdk.pkgproj | 1 + src/mono/sample/mbr/apple/AppleDelta.csproj | 2 +- src/tasks/AotCompilerTask/MonoAOTCompiler.csproj | 5 ----- 8 files changed, 6 insertions(+), 11 deletions(-) rename src/{tasks/AotCompilerTask => mono/msbuild/common}/MonoAOTCompiler.props (100%) diff --git a/Directory.Build.props b/Directory.Build.props index 79ec992824c389..7abb6c120479ee 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -63,7 +63,6 @@ - src/mono/msbuild/apple/build/AppleBuild.targets - src/installer/pkg/sfx/bundle/shared-framework-distribution-template-x64.xml - src/installer/pkg/sfx/bundle/shared-framework-distribution-template-arm64.xml - - src/tasks/AotCompilerTask/MonoAOTCompiler.props - src/tasks/AppleAppBuilder/Xcode.cs - src/tasks/MobileBuildTasks/Apple/AppleProject.cs - https://github.com/dotnet/sdk repo > src/Installer/redist-installer/targets/GeneratePKG.targets diff --git a/src/mono/msbuild/android/build/AndroidBuild.props b/src/mono/msbuild/android/build/AndroidBuild.props index 9263ef8a7c82d2..15f6489aea2207 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.props +++ b/src/mono/msbuild/android/build/AndroidBuild.props @@ -30,4 +30,5 @@ + \ No newline at end of file diff --git a/src/mono/msbuild/android/build/AndroidBuild.targets b/src/mono/msbuild/android/build/AndroidBuild.targets index 1e0aee61096ca8..a308be96f03186 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.targets @@ -7,8 +7,6 @@ false - - diff --git a/src/mono/msbuild/apple/build/AppleBuild.props b/src/mono/msbuild/apple/build/AppleBuild.props index 6625f122c63efb..90fac465ea343e 100644 --- a/src/mono/msbuild/apple/build/AppleBuild.props +++ b/src/mono/msbuild/apple/build/AppleBuild.props @@ -44,6 +44,7 @@ <_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common')) - - + + + \ No newline at end of file diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.props b/src/mono/msbuild/common/MonoAOTCompiler.props similarity index 100% rename from src/tasks/AotCompilerTask/MonoAOTCompiler.props rename to src/mono/msbuild/common/MonoAOTCompiler.props diff --git a/src/mono/nuget/Microsoft.NET.Runtime.LibraryBuilder.Sdk/Microsoft.NET.Runtime.LibraryBuilder.Sdk.pkgproj b/src/mono/nuget/Microsoft.NET.Runtime.LibraryBuilder.Sdk/Microsoft.NET.Runtime.LibraryBuilder.Sdk.pkgproj index 8d9a5f20f6e83d..587f7590b31235 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.LibraryBuilder.Sdk/Microsoft.NET.Runtime.LibraryBuilder.Sdk.pkgproj +++ b/src/mono/nuget/Microsoft.NET.Runtime.LibraryBuilder.Sdk/Microsoft.NET.Runtime.LibraryBuilder.Sdk.pkgproj @@ -17,6 +17,7 @@ + diff --git a/src/mono/sample/mbr/apple/AppleDelta.csproj b/src/mono/sample/mbr/apple/AppleDelta.csproj index 716fd9b61c64fe..12706ebedeb0fc 100644 --- a/src/mono/sample/mbr/apple/AppleDelta.csproj +++ b/src/mono/sample/mbr/apple/AppleDelta.csproj @@ -27,7 +27,7 @@ - - + diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj index 35e3f5892c3d40..2a5fce2048862e 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj @@ -23,11 +23,6 @@ - - - PreserveNewest - - From d44d25e5cf45c72ebdc5077d8f9c5ce66977e347 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Tue, 21 Jan 2025 16:47:38 +0100 Subject: [PATCH 05/14] Add functional test for Android library mode --- ..._Emulator.LibraryMode_Aot_Llvm.Test.csproj | 25 +++++++++++++++++++ .../ILLink.Descriptors.xml | 7 ++++++ .../LibraryMode_AOT_LLVM/Program.cs | 20 +++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Android.Device_Emulator.LibraryMode_Aot_Llvm.Test.csproj create mode 100644 src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/ILLink.Descriptors.xml create mode 100644 src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Program.cs diff --git a/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Android.Device_Emulator.LibraryMode_Aot_Llvm.Test.csproj b/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Android.Device_Emulator.LibraryMode_Aot_Llvm.Test.csproj new file mode 100644 index 00000000000000..7a80fe0814e636 --- /dev/null +++ b/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Android.Device_Emulator.LibraryMode_Aot_Llvm.Test.csproj @@ -0,0 +1,25 @@ + + + Exe + false + true + true + $(NetCoreAppCurrent) + Android.Device_Emulator.LibraryMode_Aot_Llvm.Test.dll + 42 + true + true + true + shared + true + + + + + + + + + + + diff --git a/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/ILLink.Descriptors.xml b/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/ILLink.Descriptors.xml new file mode 100644 index 00000000000000..96491444910b04 --- /dev/null +++ b/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/ILLink.Descriptors.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Program.cs b/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Program.cs new file mode 100644 index 00000000000000..916d1f1aa03b80 --- /dev/null +++ b/src/tests/FunctionalTests/Android/Device_Emulator/LibraryMode_AOT_LLVM/Program.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.InteropServices; + +public static class Program +{ + [UnmanagedCallersOnly(EntryPoint = nameof(SayHello))] + public static void SayHello() + { + Console.WriteLine("Called from native! Hello!"); + } + + public static int Main() + { + Console.WriteLine("Hello, Android!"); // logcat + return 42; + } +} From 597de8487f64f081cbffa9be72a4a57f7d97169a Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Tue, 21 Jan 2025 16:50:04 +0100 Subject: [PATCH 06/14] We need the comment as we are referring to OS versions in the AOT compiler props --- Directory.Build.props | 1 + 1 file changed, 1 insertion(+) diff --git a/Directory.Build.props b/Directory.Build.props index 7abb6c120479ee..3b5514b9bf96d6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -63,6 +63,7 @@ - src/mono/msbuild/apple/build/AppleBuild.targets - src/installer/pkg/sfx/bundle/shared-framework-distribution-template-x64.xml - src/installer/pkg/sfx/bundle/shared-framework-distribution-template-arm64.xml + - src/mono/msbuild/common/MonoAOTCompiler.props - src/tasks/AppleAppBuilder/Xcode.cs - src/tasks/MobileBuildTasks/Apple/AppleProject.cs - https://github.com/dotnet/sdk repo > src/Installer/redist-installer/targets/GeneratePKG.targets From 80486c8154b9091c198ed7c9d0311897ab78d077 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Wed, 22 Jan 2025 11:24:05 +0100 Subject: [PATCH 07/14] Disable the library mode tests --- src/libraries/tests.proj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 76f22763eac181..a71adb42e82b3e 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -256,6 +256,14 @@ + + + + + + + + From 60bb3da6b32082511cf64b61749e705a7aad4a1e Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Fri, 24 Jan 2025 14:52:13 +0100 Subject: [PATCH 08/14] Do not force UseMonoRuntime in AndroidBuild.props --- src/mono/msbuild/android/build/AndroidBuild.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mono/msbuild/android/build/AndroidBuild.props b/src/mono/msbuild/android/build/AndroidBuild.props index 15f6489aea2207..43189afb340adc 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.props +++ b/src/mono/msbuild/android/build/AndroidBuild.props @@ -1,7 +1,7 @@ $(TargetOS)-$(TargetArchitecture.ToLowerInvariant()) - true + true true <_HostOS Condition="$([MSBuild]::IsOSPlatform('Windows'))">windows @@ -28,7 +28,7 @@ <_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common')) - - - + + + \ No newline at end of file From 156cc0e8bdc200fa6a9b92e0c5c202975cc3143b Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Fri, 24 Jan 2025 17:15:35 +0100 Subject: [PATCH 09/14] Avoid using CoreCLR properties when building mono runtime tests --- src/tests/Common/dir.common.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/Common/dir.common.props b/src/tests/Common/dir.common.props index afac3e7ae459cf..abbff7f85c2361 100644 --- a/src/tests/Common/dir.common.props +++ b/src/tests/Common/dir.common.props @@ -1,5 +1,6 @@ - + + + false + true + true <_HostOS Condition="$([MSBuild]::IsOSPlatform('Windows'))">windows <_HostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx <_HostOS Condition="'$(_HostOS)' == ''">linux - <_IsLibraryMode Condition="'$(UseNativeAOTRuntime)' != 'true' and '$(NativeLib)' != ''">true - <_ReadRuntimeComponentsManifestTargetName Condition="'$(UseNativeAOTRuntime)' != 'true'">_MonoReadAvailableComponentsManifest + <_IsLibraryMode Condition="'$(UseMonoRuntime)' == 'true' and '$(UseNativeAOTRuntime)' != 'true' and '$(NativeLib)' != ''">true + <_ReadRuntimeComponentsManifestTargetName Condition="'$(UseMonoRuntime)' == 'true' and '$(UseNativeAOTRuntime)' != 'true'">_MonoReadAvailableComponentsManifest Publish - + $(_ReadRuntimeComponentsManifestTargetName); _InitializeCommonProperties; _BeforeAndroidBuild; @@ -23,6 +27,13 @@ _AndroidGenerateAppBundle; _AfterAndroidBuild + + _InitializeCommonProperties; + _BeforeAndroidBuild; + _AndroidResolveReferences; + _AndroidGenerateAppBundle; + _AfterAndroidBuild + <_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common')) diff --git a/src/mono/msbuild/android/build/AndroidBuild.targets b/src/mono/msbuild/android/build/AndroidBuild.targets index a308be96f03186..142adb39af0481 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.targets @@ -37,10 +37,11 @@ $([MSBuild]::NormalizeDirectory('$(OutDir)', 'Bundle')) $(AndroidBundleDir) - <_MonoHeaderPath>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include', 'mono-2.0')) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include', 'mono-2.0')) + $(CoreClrProjectRoot)hosts\inc - + @@ -218,8 +219,7 @@ - @@ -227,7 +227,14 @@ <_NativeDependencies Include="$(LibraryOutputPath)" /> + + + <_RuntimeFlavor>Mono + <_RuntimeFlavor Condition="'$(UseMonoRuntime)' == 'false' and '$(UseNativeAOTRuntime)' != 'true'">CoreCLR + + true $(TargetOS)-$(TargetArchitecture.ToLowerInvariant()) - true + true true false @@ -44,7 +44,7 @@ <_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common')) - - - + + + \ No newline at end of file From d242a8c6d7f08421a8c8770c568394d4e309e296 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Tue, 28 Jan 2025 12:22:49 +0100 Subject: [PATCH 13/14] Use RuntimeHeaders everywhere --- src/mono/msbuild/apple/build/AppleBuild.targets | 4 ++-- src/mono/msbuild/common/LibraryBuilder.targets | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mono/msbuild/apple/build/AppleBuild.targets b/src/mono/msbuild/apple/build/AppleBuild.targets index 0aafe5b5612d09..d14a4c7b79a069 100644 --- a/src/mono/msbuild/apple/build/AppleBuild.targets +++ b/src/mono/msbuild/apple/build/AppleBuild.targets @@ -54,7 +54,7 @@ $([MSBuild]::NormalizeDirectory('$(OutDir)', 'Bundle')) $(AppleBundleDir) - <_MonoHeaderPath Condition="'$(UseMonoRuntime)' != 'false' and '$(UseNativeAOTRuntime)' != 'true'">$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include', 'mono-2.0')) + $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include', 'mono-2.0')) <_AotModuleTablePath>$(AppleBundleDir)\modules.m $(AssemblyName) @@ -324,7 +324,7 @@ InvariantGlobalization="$(InvariantGlobalization)" IsLibraryMode="$(_IsLibraryMode)" MainLibraryFileName="$(MainLibraryFileName)" - MonoRuntimeHeaders="$(_MonoHeaderPath)" + MonoRuntimeHeaders="$(RuntimeHeaders)" NativeMainSource="$(NativeMainSource)" NativeDependencies="@(NativeDependencies)" Optimized="$(Optimized)" diff --git a/src/mono/msbuild/common/LibraryBuilder.targets b/src/mono/msbuild/common/LibraryBuilder.targets index 9ea4a4562ee1e9..bb93a3b8ca54f0 100644 --- a/src/mono/msbuild/common/LibraryBuilder.targets +++ b/src/mono/msbuild/common/LibraryBuilder.targets @@ -33,7 +33,7 @@ ExtraLinkerArguments="@(_ExtraLinkerArgs)" ExtraSources="@(_ExtraLibrarySources)" IsSharedLibrary="$(_IsSharedLibrary)" - MonoRuntimeHeaders="$(_MonoHeaderPath)" + MonoRuntimeHeaders="$(RuntimeHeaders)" Name="$(AssemblyName)" OutputDirectory="$(BundleDir)" RuntimeIdentifier="$(RuntimeIdentifier)" From bac92ad4ee89ec94053b1e8363027c701ddedd1a Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Tue, 28 Jan 2025 19:07:03 +0100 Subject: [PATCH 14/14] Link issues for TODOs --- src/mono/msbuild/android/build/AndroidBuild.props | 5 ++--- src/mono/msbuild/android/build/AndroidBuild.targets | 3 ++- src/mono/msbuild/apple/build/AppleBuild.props | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mono/msbuild/android/build/AndroidBuild.props b/src/mono/msbuild/android/build/AndroidBuild.props index fef75f690c87bb..de95c1d581efbb 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.props +++ b/src/mono/msbuild/android/build/AndroidBuild.props @@ -1,9 +1,8 @@ $(TargetOS)-$(TargetArchitecture.ToLowerInvariant()) - + false true true diff --git a/src/mono/msbuild/android/build/AndroidBuild.targets b/src/mono/msbuild/android/build/AndroidBuild.targets index 142adb39af0481..b5c2a588962631 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.targets @@ -228,7 +228,8 @@ - + <_RuntimeFlavor>Mono <_RuntimeFlavor Condition="'$(UseMonoRuntime)' == 'false' and '$(UseNativeAOTRuntime)' != 'true'">CoreCLR diff --git a/src/mono/msbuild/apple/build/AppleBuild.props b/src/mono/msbuild/apple/build/AppleBuild.props index 52f042614e3201..c1e8952f835e76 100644 --- a/src/mono/msbuild/apple/build/AppleBuild.props +++ b/src/mono/msbuild/apple/build/AppleBuild.props @@ -12,6 +12,8 @@ true $(TargetOS)-$(TargetArchitecture.ToLowerInvariant()) + true true