forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[builds] Automatically apply dotnet/runtime#85966.
Ref: dotnet/runtime#85996
- Loading branch information
1 parent
c698d16
commit 1b3a525
Showing
3 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
From c11fa2be22891658a849b9320664057a7c433487 Mon Sep 17 00:00:00 2001 | ||
From: Filip Navara <navara@emclient.com> | ||
Date: Tue, 9 May 2023 19:20:19 +0200 | ||
Subject: [PATCH] Update ILCompiler paths to handle | ||
PublishAotUsingRuntimePack=true | ||
|
||
--- | ||
.../Microsoft.NETCore.Native.Publish.targets | 4 +-- | ||
.../Microsoft.NETCore.Native.Unix.targets | 10 +++---- | ||
.../Microsoft.NETCore.Native.targets | 27 ++++++++++++++----- | ||
3 files changed, 28 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets | ||
index 6f672918b33e0..be1fbde77efc9 100644 | ||
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets | ||
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets | ||
@@ -70,8 +70,8 @@ | ||
Text="Add a PackageReference for '$(_hostPackageName)' to allow cross-compilation for $(_targetArchitecture)" /> | ||
|
||
<!-- NativeAOT runtime pack assemblies need to be defined to avoid the default CoreCLR implementations being set as compiler inputs --> | ||
- <Error Condition="'@(PrivateSdkAssemblies)' == ''" Text="The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative" /> | ||
- <Error Condition="'@(FrameworkAssemblies)' == ''" Text="The FrameworkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative" /> | ||
+ <Error Condition="'@(PrivateSdkAssemblies)' == '' and '$(PublishAotUsingRuntimePack)' != 'true'" Text="The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative" /> | ||
+ <Error Condition="'@(FrameworkAssemblies)' == '' and '$(PublishAotUsingRuntimePack)' != 'true'" Text="The FrameworkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative" /> | ||
|
||
<ComputeManagedAssembliesToCompileToNative | ||
Assemblies="@(_ResolvedCopyLocalPublishAssets)" | ||
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets | ||
index bb457c8c166bc..6b6b59ab7967b 100644 | ||
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets | ||
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets | ||
@@ -53,11 +53,11 @@ The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
<ItemGroup> | ||
<NativeLibrary Condition="'$(IlcMultiModule)' == 'true'" Include="$(SharedLibrary)" /> | ||
- <NativeLibrary Condition="'$(NativeLib)' == '' and '$(CustomNativeMain)' != 'true'" Include="$(IlcSdkPath)libbootstrapper.a" /> | ||
- <NativeLibrary Condition="'$(NativeLib)' != '' or '$(CustomNativeMain)' == 'true'" Include="$(IlcSdkPath)libbootstrapperdll.a" /> | ||
- <NativeLibrary Include="$(IlcSdkPath)$(FullRuntimeName).a" /> | ||
- <NativeLibrary Include="$(IlcSdkPath)$(EventPipeName)$(LibFileExt)" /> | ||
- <NativeLibrary Condition="'$(LinkStandardCPlusPlusLibrary)' != 'true' and '$(StaticICULinking)' != 'true'" Include="$(IlcSdkPath)libstdc++compat.a" /> | ||
+ <NativeLibrary Condition="'$(NativeLib)' == '' and '$(CustomNativeMain)' != 'true'" Include="$(IlcFrameworkSdkPath)libbootstrapper.a" /> | ||
+ <NativeLibrary Condition="'$(NativeLib)' != '' or '$(CustomNativeMain)' == 'true'" Include="$(IlcFrameworkSdkPath)libbootstrapperdll.a" /> | ||
+ <NativeLibrary Include="$(IlcFrameworkSdkPath)$(FullRuntimeName).a" /> | ||
+ <NativeLibrary Include="$(IlcFrameworkSdkPath)$(EventPipeName)$(LibFileExt)" /> | ||
+ <NativeLibrary Condition="'$(LinkStandardCPlusPlusLibrary)' != 'true' and '$(StaticICULinking)' != 'true'" Include="$(IlcFrameworkSdkPath)libstdc++compat.a" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets | ||
index fbcadcc71b597..afa1cc1a66b9f 100644 | ||
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets | ||
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets | ||
@@ -126,26 +126,41 @@ The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
<!-- The properties below need to be defined only after we've found the correct runtime package reference --> | ||
<Target Name="SetupProperties" DependsOnTargets="$(IlcSetupPropertiesDependsOn)" BeforeTargets="Publish"> | ||
+ <ItemGroup> | ||
+ <_NETCoreAppFrameworkReference Include="@(ResolvedFrameworkReference)" Condition="'%(ResolvedFrameworkReference.RuntimePackName)' == 'Microsoft.NETCore.App.Runtime.NativeAOT.$(RuntimeIdentifier)'" /> | ||
+ </ItemGroup> | ||
+ | ||
<PropertyGroup> | ||
<!-- Define paths used in build targets to point to the runtime-specific ILCompiler implementation --> | ||
<IlcToolsPath Condition="'$(IlcToolsPath)' == ''">$(IlcHostPackagePath)\tools\</IlcToolsPath> | ||
<IlcSdkPath Condition="'$(IlcSdkPath)' == ''">$(RuntimePackagePath)\sdk\</IlcSdkPath> | ||
- <IlcFrameworkPath Condition="'$(IlcFrameworkPath)' == ''">$(RuntimePackagePath)\framework\</IlcFrameworkPath> | ||
- <IlcFrameworkNativePath Condition="'$(IlcFrameworkNativePath)' == ''">$(RuntimePackagePath)\framework\</IlcFrameworkNativePath> | ||
+ <IlcFrameworkPath Condition="'$(IlcFrameworkPath)' == '' and '$(PublishAotUsingRuntimePack)' != 'true'">$(RuntimePackagePath)\framework\</IlcFrameworkPath> | ||
+ <_NETCoreAppRuntimePackPath>%(_NETCoreAppFrameworkReference.RuntimePackPath)/runtimes/$(RuntimeIdentifier)/</_NETCoreAppRuntimePackPath> | ||
+ <IlcFrameworkNativePath Condition="'$(IlcFrameworkNativePath)' == '' and '$(PublishAotUsingRuntimePack)' == 'true'">$(_NETCoreAppRuntimePackPath)\native\</IlcFrameworkNativePath> | ||
+ <IlcFrameworkNativePath Condition="'$(IlcFrameworkNativePath)' == '' and '$(PublishAotUsingRuntimePack)' != 'true'">$(RuntimePackagePath)\framework\</IlcFrameworkNativePath> | ||
+ <IlcFrameworkSdkPath Condition="'$(IlcFrameworkSdkPath)' == '' and '$(PublishAotUsingRuntimePack)' == 'true'">$(IlcFrameworkNativePath)</IlcFrameworkSdkPath> | ||
+ <IlcFrameworkSdkPath Condition="'$(IlcFrameworkSdkPath)' == '' and '$(PublishAotUsingRuntimePack)' != 'true'">$(IlcSdkPath)</IlcFrameworkSdkPath> | ||
<IlcMibcPath Condition="'$(IlcMibcPath)' == ''">$(RuntimePackagePath)\mibc\</IlcMibcPath> | ||
</PropertyGroup> | ||
|
||
- <ItemGroup> | ||
- <PrivateSdkAssemblies Include="$(IlcSdkPath)*.dll" /> | ||
+ <ItemGroup Condition="'$(PublishAotUsingRuntimePack)' == 'true'"> | ||
+ <PrivateSdkAssemblies Include="$(IlcFrameworkSdkPath)*.dll"/> | ||
+ <FrameworkAssemblies Include="@(RuntimePackAsset)" Condition="'%(Extension)' == '.dll'" /> | ||
+ <DefaultFrameworkAssemblies Include="@(FrameworkAssemblies)" /> | ||
+ </ItemGroup> | ||
|
||
+ <ItemGroup Condition="'$(PublishAotUsingRuntimePack)' != 'true'"> | ||
+ <PrivateSdkAssemblies Include="$(IlcFrameworkSdkPath)*.dll"/> | ||
<!-- Exclude unmanaged dlls --> | ||
<FrameworkAssemblies Include="$(IlcFrameworkPath)*.dll" Exclude="$(IlcFrameworkPath)*.Native.dll;$(IlcFrameworkPath)msquic.dll" /> | ||
|
||
- <MibcFile Include="$(IlcMibcPath)*.mibc" Condition="'$(IlcPgoOptimize)' == 'true'" /> | ||
- | ||
<DefaultFrameworkAssemblies Include="@(FrameworkAssemblies)" /> | ||
<DefaultFrameworkAssemblies Include="@(PrivateSdkAssemblies)" /> | ||
</ItemGroup> | ||
+ | ||
+ <ItemGroup> | ||
+ <MibcFile Include="$(IlcMibcPath)*.mibc" Condition="'$(IlcPgoOptimize)' == 'true'" /> | ||
+ </ItemGroup> | ||
</Target> | ||
|
||
<Target Name="ComputeIlcCompileInputs" DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)" BeforeTargets="Publish"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters