Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eng/Subsets.props3
-rw-r--r--eng/liveBuilds.targets15
-rw-r--r--eng/testing/tests.singlefile.targets2
-rw-r--r--src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs2
-rw-r--r--src/coreclr/tools/aot/ILCompiler/ILCompiler.props6
-rw-r--r--src/coreclr/tools/aot/crossgen2/crossgen2.csproj49
-rw-r--r--src/coreclr/tools/aot/crossgen2/crossgen2.props10
-rw-r--r--src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj105
8 files changed, 123 insertions, 69 deletions
diff --git a/eng/Subsets.props b/eng/Subsets.props
index b556df68ea6..bd1cda47e06 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -71,8 +71,7 @@
<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
'$(BuildTargetFramework)' == '' or
'$(BuildAllConfigurations)' == 'true'">libs.native+</DefaultLibrariesSubsets>
- <DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.sfx+libs.oob</DefaultLibrariesSubsets>
- <DefaultLibrariesSubsets Condition="'$(DotNetBuildFromSource)' != 'true'">$(DefaultLibrariesSubsets)+libs.pretest</DefaultLibrariesSubsets>
+ <DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.sfx+libs.oob+libs.pretest</DefaultLibrariesSubsets>
<DefaultHostSubsets>host.native+host.tools</DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(DotNetBuildFromSource)' != 'true'">$(DefaultHostSubsets)+host.pkg+host.tests</DefaultHostSubsets>
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index a8e8fffe470..0583f48aed5 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -49,6 +49,7 @@
<CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsWindows)' == 'true'">x86</CoreCLRCrossTargetComponentDirName>
<CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsLinux)' == 'true'">x64</CoreCLRCrossTargetComponentDirName>
<CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'armel' and '$(BuildArchitecture)' != 'armel' and '$(TargetsLinux)' == 'true'">x64</CoreCLRCrossTargetComponentDirName>
+ <SingleFileHostSourcePath>$(CoreCLRArtifactsPath)/corehost/singlefilehost$(ExeSuffix)</SingleFileHostSourcePath>
</PropertyGroup>
<Target Name="ResolveRuntimeFilesFromLocalBuild">
@@ -222,4 +223,18 @@
<PropertyGroup>
<BundledRuntimeIdentifierGraphFile>$(RuntimeIdGraphDefinitionFile)</BundledRuntimeIdentifierGraphFile>
</PropertyGroup>
+
+ <Target Name="RewriteRuntimePackDir"
+ Condition="'$(RunningPublish)' == 'true'"
+ DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
+ BeforeTargets="ResolveRuntimePackAssets">
+ <ItemGroup>
+ <!-- Remove AspNetCore runtime pack since we don't build it locally -->
+ <ResolvedRuntimePack Remove="Microsoft.AspNetCore.App.Runtime.$(RuntimeIdentifier)" />
+
+ <ResolvedRuntimePack Update="Microsoft.NETCore.App.Runtime.$(RuntimeIdentifier)">
+ <PackageDirectory>$(MicrosoftNetCoreAppRuntimePackDir)</PackageDirectory>
+ </ResolvedRuntimePack>
+ </ItemGroup>
+ </Target>
</Project>
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index e5f12a683a9..f95e1957de0 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -16,8 +16,6 @@
<PublishSingleFile>true</PublishSingleFile>
<UseAppHost>true</UseAppHost>
<SelfContained>true</SelfContained>
- <SingleFileHostSourcePath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(Configuration)', 'corehost'))/singlefilehost</SingleFileHostSourcePath>
- <SingleFileHostSourcePath Condition="'$(TargetOS)' == 'windows'">$(SingleFileHostSourcePath).exe</SingleFileHostSourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(TestNativeAot)' == 'true'">
diff --git a/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs b/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs
index f6e5459a59f..f7a7074cca5 100644
--- a/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs
@@ -25,7 +25,7 @@ namespace Internal.TypeSystem.Ecma
/// </summary>
public abstract class UnmanagedPdbSymbolReader : PdbSymbolReader
{
- public static PdbSymbolReader TryOpenSymbolReaderForMetadataFile(string metadataFileName, string searchPath)
+ public static PdbSymbolReader? TryOpenSymbolReaderForMetadataFile(string metadataFileName, string searchPath)
{
return null;
}
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props
index 936823572cb..61b23fd75d1 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props
@@ -120,16 +120,18 @@
<TargetSpec>$(TargetOSComponent)_$(TargetArchitectureForLocalJitBuild)_$(TargetArchitectureForSharedLibraries)</TargetSpec>
<JitInterfaceLibraryName>$(LibPrefix)jitinterface_$(TargetArchitectureForSharedLibraries)$(LibSuffix)</JitInterfaceLibraryName>
+ <!-- This will be provided when using the liveBuild, and unset otherwise. -->
+ <CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == ''">$(RuntimeBinDir)$(CrossHostArch)</CoreCLRArtifactsPath>
</PropertyGroup>
<ItemGroup>
- <Content Include="$(RuntimeBinDir)$(CrossHostArch)/$(JitInterfaceLibraryName)"
+ <Content Include="$(CoreCLRArtifactsPath)/$(JitInterfaceLibraryName)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
Link="%(FileName)%(Extension)"
/>
- <Content Include="$(RuntimeBinDir)$(CrossHostArch)/$(LibPrefix)clrjit_*_$(TargetArchitectureForSharedLibraries)$(LibSuffix)"
+ <Content Include="$(CoreCLRArtifactsPath)/$(LibPrefix)clrjit_*_$(TargetArchitectureForSharedLibraries)$(LibSuffix)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
Link="%(FileName)%(Extension)"
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
index 7959568995a..eae4b097b62 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
@@ -1,9 +1,48 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
+
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
+
<PropertyGroup>
- <OutputPath>$(RuntimeBinDir)/crossgen2</OutputPath>
- <!-- The default value for macOS is false -->
- <UseAppHost>true</UseAppHost>
- <AppHostRuntimeIdentifier>$(Crossgen2PackageRID)</AppHostRuntimeIdentifier>
+ <OutputPath>$(RuntimeBinDir)crossgen2</OutputPath>
+ <!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 and we
+ don't want to ship using NativeAOT on MacOS -->
+ <NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true' or '$(TargetOS)' == 'osx'">false</NativeAotSupported>
+ <!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT -->
+ <PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed>
+ <RuntimeIdentifiers Condition="'$(RunningPublish)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers>
</PropertyGroup>
+
<Import Project="crossgen2.props" />
+
+ <PropertyGroup Condition="'$(NativeAotSupported)' != 'true'">
+ <PublishSingleFile>true</PublishSingleFile>
+ <PublishReadyToRun>true</PublishReadyToRun>
+ <!-- Disable crossgen on NetBSD, illumos and Solaris for now. This can be revisited when we have full support. -->
+ <PublishReadyToRun Condition="'$(TargetOS)'=='NetBSD' Or '$(TargetOS)'=='illumos' Or '$(TargetOS)'=='Solaris'">false</PublishReadyToRun>
+ <!-- Disable crossgen on FreeBSD when cross building from Linux. -->
+ <PublishReadyToRun Condition="'$(TargetOS)'=='FreeBSD' and '$(CrossBuild)'=='true'">false</PublishReadyToRun>
+ <PublishReadyToRunComposite>true</PublishReadyToRunComposite>
+ </PropertyGroup>
+
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
+
+ <PropertyGroup Condition="'$(NativeAotSupported)' == 'true'">
+ <IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
+ <IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
+ <CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">clang-9</CppCompilerAndLinker>
+ <SysRoot Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
+ <IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
+ <IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
+ <IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath>
+ <IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath>
+ <TrimmerSingleWarn>false</TrimmerSingleWarn>
+
+ <!-- Forced by ILLink targets; we should fix the SDK -->
+ <SelfContained Condition="'$(RunningPublish)' == 'true'">true</SelfContained>
+ </PropertyGroup>
+
+ <Import Project="$(R2ROverridePath)" Condition="'$(R2ROverridePath)' != ''" />
+ <Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.targets"
+ Condition="'$(NativeAotSupported)' == 'true' and '$(RunningPublish)' == 'true'" />
+
</Project>
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.props b/src/coreclr/tools/aot/crossgen2/crossgen2.props
index a0d31077248..d544530d813 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.props
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.props
@@ -68,16 +68,18 @@
<TargetSpec>$(TargetOSComponent)_$(TargetArchitectureForLocalJitBuild)_$(TargetArchitectureForSharedLibraries)</TargetSpec>
<JitInterfaceLibraryName>$(LibPrefix)jitinterface_$(TargetArchitectureForSharedLibraries)$(LibSuffix)</JitInterfaceLibraryName>
+ <!-- This will be provided when using the liveBuild, and unset otherwise. -->
+ <CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == ''">$(RuntimeBinDir)$(CrossHostArch)</CoreCLRArtifactsPath>
</PropertyGroup>
<ItemGroup>
- <Content Include="$(RuntimeBinDir)$(CrossHostArch)/$(JitInterfaceLibraryName)"
+ <Content Include="$(CoreCLRArtifactsPath)/$(JitInterfaceLibraryName)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
Link="%(FileName)%(Extension)"
/>
- <Content Include="$(RuntimeBinDir)$(CrossHostArch)/$(LibPrefix)clrjit_*_$(TargetArchitectureForSharedLibraries)$(LibSuffix)"
+ <Content Include="$(CoreCLRArtifactsPath)/$(LibPrefix)clrjit_*_$(TargetArchitectureForSharedLibraries)$(LibSuffix)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"
Link="%(FileName)%(Extension)"
@@ -104,7 +106,9 @@
<DiaSymReaderTargetArch>$(TargetArchitectureForSharedLibraries)</DiaSymReaderTargetArch>
<DiaSymReaderTargetArch Condition="'$(DiaSymReaderTargetArch)' == 'x64'">amd64</DiaSymReaderTargetArch>
<DiaSymReaderTargetArchFileName>Microsoft.DiaSymReader.Native.$(DiaSymReaderTargetArch).dll</DiaSymReaderTargetArchFileName>
- <DiaSymReaderTargetArchPath>$(PkgMicrosoft_DiaSymReader_Native)\runtimes\win\native\$(DiaSymReaderTargetArchFileName)</DiaSymReaderTargetArchPath>
+ <DiaSymReaderTargetArchPath Condition="'$(PkgMicrosoft_DiaSymReader_Native)' != ''">$(PkgMicrosoft_DiaSymReader_Native)\runtimes\win\native\$(DiaSymReaderTargetArchFileName)</DiaSymReaderTargetArchPath>
+ <!-- When publishing we won't have the NuGet packages, so use the copy from the build artifacts directory. -->
+ <DiaSymReaderTargetArchPath Condition="'$(PkgMicrosoft_DiaSymReader_Native)' == ''">$(CoreCLRArtifactsPath)crossgen2/$(DiaSymReaderTargetArchFileName)</DiaSymReaderTargetArchPath>
</PropertyGroup>
<ItemGroup Condition="'$(TargetOS)' == 'windows'">
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
index 2dbe486d053..8841f1ab9b3 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
@@ -3,8 +3,9 @@
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.SharedFramework.Sdk" />
<PropertyGroup>
- <SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</SkipBuild>
- <PlatformPackageType>RuntimePack</PlatformPackageType>
+ <!-- Crossgen is not used for Mono, and does not currently create freebsd packages -->
+ <SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono' or '$(RuntimeIdentifier)' == 'freebsd-x64'">true</SkipBuild>
+ <PlatformPackageType>ToolPack</PlatformPackageType>
<SharedFrameworkName>$(SharedFrameworkName).Crossgen2</SharedFrameworkName>
<PgoSuffix Condition="'$(PgoInstrument)' != ''">.PGO</PgoSuffix>
<OverridePackageId>$(SharedFrameworkName)$(PgoSuffix).$(RuntimeIdentifier)</OverridePackageId>
@@ -13,56 +14,65 @@
<!-- Build this pack for any RID if building from source. Otherwise, only build select RIDs. -->
<RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers>
<GenerateInstallers>false</GenerateInstallers>
- <GetSharedFrameworkFilesForReadyToRunDependsOn>
- AddRuntimeFilesToPackage;
- AddFrameworkFilesToPackage
- </GetSharedFrameworkFilesForReadyToRunDependsOn>
- <PublishReadyToRun>true</PublishReadyToRun>
- <!-- Disable crossgen on NetBSD, illumos and Solaris for now. This can be revisited when we have full support. -->
- <PublishReadyToRun Condition="'$(TargetOS)'=='NetBSD' Or '$(TargetOS)'=='illumos' Or '$(TargetOS)'=='Solaris'">false</PublishReadyToRun>
- <!-- Disable crossgen on FreeBSD when cross building from Linux. -->
- <PublishReadyToRun Condition="'$(TargetOS)'=='FreeBSD' and '$(CrossBuild)'=='true'">false</PublishReadyToRun>
<HostJsonTargetPath>tools/</HostJsonTargetPath>
<PermitDllAndExeFilesLackingFileVersion>true</PermitDllAndExeFilesLackingFileVersion>
+ <!-- Publishing as single-file or NativeAOT means we can't examine the interior DLLs -->
+ <ShouldVerifyClosure>false</ShouldVerifyClosure>
</PropertyGroup>
- <PropertyGroup>
- <TargetOSComponent>unix</TargetOSComponent>
- <TargetOSComponent Condition="'$(TargetOS)' == 'windows'">win</TargetOSComponent>
- <TargetSpec>$(TargetOSComponent)-$(TargetArchitecture)</TargetSpec>
- </PropertyGroup>
+ <Target Name="PublishCrossgen"
+ BeforeTargets="GetFilesToPackage">
- <ItemGroup>
- <NativeRuntimeAsset Include="$(CoreCLRCrossgen2Dir)crossgen2$(ExeSuffix)" TargetPath="tools/" />
- <Reference Include="$(CoreCLRCrossgen2Dir)crossgen2.dll" />
- <Reference Include="$(CoreCLRCrossgen2Dir)ILCompiler*.dll" />
- <Reference Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(CoreCLRCrossgen2Dir)Microsoft.DiaSymReader.dll" />
- <NativeRuntimeAsset Include="$(CoreCLRCrossgen2Dir)$(LibPrefix)jitinterface_$(TargetArchitecture)$(LibSuffix)" TargetPath="tools/" />
- <NativeRuntimeAsset Include="$(CoreCLRCrossgen2Dir)$(LibPrefix)clrjit_win_x86_$(TargetArchitecture)$(LibSuffix)" TargetPath="tools/" />
- <NativeRuntimeAsset Include="$(CoreCLRCrossgen2Dir)$(LibPrefix)clrjit_universal_arm_$(TargetArchitecture)$(LibSuffix)" TargetPath="tools/" />
- <NativeRuntimeAsset Condition="'$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'x64'" Include="$(CoreCLRCrossgen2Dir)$(LibPrefix)clrjit_win_x64_$(TargetArchitecture)$(LibSuffix)" TargetPath="tools/" />
- <NativeRuntimeAsset Condition="'$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'x64'" Include="$(CoreCLRCrossgen2Dir)$(LibPrefix)clrjit_unix_x64_$(TargetArchitecture)$(LibSuffix)" TargetPath="tools/" />
- <NativeRuntimeAsset Condition="'$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'x64'" Include="$(CoreCLRCrossgen2Dir)$(LibPrefix)clrjit_universal_arm64_$(TargetArchitecture)$(LibSuffix)" TargetPath="tools/" />
- <!-- Include the native hosting layer -->
- <NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)hostfxr$(LibSuffix)" TargetPath="tools/" />
- <NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)hostpolicy$(LibSuffix)" TargetPath="tools/" />
- </ItemGroup>
+ <!-- Copy System.Private.CoreLib from the coreclr bin directory to the runtime pack directory,
+ as we always need the copy of System.Private.CoreLib that matches exactly with the runtime. -->
+ <Copy SourceFiles="$(CoreCLRArtifactsPath)System.Private.CoreLib.dll"
+ DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
+ SkipUnchangedFiles="true" />
+
+ <MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
+ Properties="RunningPublish=true
+ ;RuntimeIdentifier=$(RuntimeIdentifier)
+ ;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
+ ;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets"
+ Targets="Restore;Publish;PublishItemsOutputGroup">
+ <Output TaskParameter="TargetOutputs"
+ ItemName="_RawCrossgenPublishFiles" />
+ </MSBuild>
- <Target Name="AddRuntimeFilesToPackage" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<ItemGroup>
- <CrossgenFile Include="@(RuntimeFiles)" Condition="'%(Filename)' == 'crossgen'" />
- <OptimizationDataFile Include="@(RuntimeFiles)" Condition="'%(Filename)' == 'StandardOptimizationData'" />
- <ReferenceCopyLocalPaths Include="@(RuntimeFiles)" Exclude="@(CrossgenFile);@(OptimizationDataFile)" />
- <ReferenceCopyLocalPaths TargetPath="tools/" />
+ <_CrossgenPublishFiles Include="@(_RawCrossgenPublishFiles->'%(OutputPath)')"
+ KeepMetadata="REMOVE_ALL" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(NativeAotSupported)' != 'true'">
+ <FilesToPackage Include="@(_CrossgenPublishFiles)"
+ Exclude="*.pdb;*.h;*.lib"
+ TargetPath="tools/" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(NativeAotSupported)' == 'true'">
+ <!-- Treat all native aot assets as native runtime assets -->
+ <FilesToPackage Include="@(_CrossgenPublishFiles->Distinct())"
+ Condition="'%(Extension)' != '.pdb'"
+ TargetPath="tools/" />
</ItemGroup>
</Target>
- <Target Name="AddFrameworkFilesToPackage" DependsOnTargets="ResolveLibrariesFromLocalBuild">
- <ItemGroup>
- <ReferenceCopyLocalPaths Include="@(LibrariesRuntimeFiles)" TargetPath="tools/" />
- </ItemGroup>
+ <Target Name="RunPublishedCrossgen" AfterTargets="PublishCrossgen"
+ Condition="'$(TargetOs)' == '$(HostOs)' and '$(TargetArchitecture)' == '$(BuildArchitecture)'">
+ <!-- Run the published crossgen if we're not cross-compiling -->
+ <Exec Command="@(FilesToPackage) $(CoreCLRArtifactsPath)IL/System.Private.CoreLib.dll --out $(IntermediateOutputPath)S.P.C.tmp" Condition="'%(FileName)%(Extension)' == 'crossgen2$(ExeSuffix)'"
+ ConsoleToMsBuild="true">
+ <Output TaskParameter="ConsoleOutput" PropertyName="CrossgenOutput" />
+ <Output TaskParameter="ExitCode" PropertyName="CrossgenExitCode" />
+ </Exec>
+ <Error Text="Crossgen failed with code $(CrossgenExitCode), output: $(CrossgenOutput)" Condition="$(CrossgenExitCode) != 0" />
</Target>
+ <PropertyGroup>
+ <TargetOSComponent>unix</TargetOSComponent>
+ <TargetOSComponent Condition="'$(TargetOS)' == 'windows'">win</TargetOSComponent>
+ <TargetSpec>$(TargetOSComponent)-$(TargetArchitecture)</TargetSpec>
+ </PropertyGroup>
+
<Target Name="AddCrossgen2SymbolFilesToPackage" BeforeTargets="GetFilesToPackage">
<ItemGroup>
<_Crossgen2SymbolFilesToPackage Include="@(Reference->'$(CoreCLRArtifactsPath)PDB\%(FileName).pdb')" />
@@ -75,22 +85,8 @@
</ItemGroup>
</Target>
- <PropertyGroup Condition="'$(TargetOS)' == 'windows'">
- <!-- DiaSymReader for the target architecture, which is placed into the package -->
- <_diaSymTargetArch>$(TargetArchitecture)</_diaSymTargetArch>
- <_diaSymTargetArch Condition="'$(TargetArchitecture)' == 'x64'">amd64</_diaSymTargetArch>
- <_diaSymReaderTargetArchPath>$(PkgMicrosoft_DiaSymReader_Native)/runtimes/win/native/Microsoft.DiaSymReader.Native.$(_diaSymTargetArch).dll</_diaSymReaderTargetArchPath>
- </PropertyGroup>
-
- <ItemGroup Condition="Exists('$(_diaSymReaderTargetArchPath)')">
- <NativeRuntimeAsset Include="$(_diaSymReaderTargetArchPath)" TargetPath="tools/" />
- </ItemGroup>
-
- <Import Project="$(Crossgen2SdkOverridePropsPath)" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.SharedFramework.Sdk" />
- <Import Project="$(Crossgen2SdkOverrideTargetsPath)" />
- <Import Project="ReadyToRun.targets" />
<Target Name="GetFilesToPublish">
<MSBuild Projects="$(MSBuildProjectFullPath)"
@@ -106,4 +102,5 @@
TargetPath="" />
</ItemGroup>
</Target>
+
</Project>