diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2021-12-14 08:23:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 08:23:32 +0300 |
commit | 5f9a532bc4139d66d8ccdbb5a6a9973cfa421297 (patch) | |
tree | 093bbdd2ed204ee135ba190126d7f8227b0a4691 /eng/Subsets.props | |
parent | 6d23c2b60d6ebfff13b886bc6beeaaf983c5bf34 (diff) |
Add NativeAOT to build (#62569)
Diffstat (limited to 'eng/Subsets.props')
-rw-r--r-- | eng/Subsets.props | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/eng/Subsets.props b/eng/Subsets.props index b76d849cf4c..744deb94846 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -49,8 +49,13 @@ <RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">$(PrimaryRuntimeFlavor)</RuntimeFlavor> </PropertyGroup> + <!-- CLR NativeAot only builds in a subset of the matrix --> <PropertyGroup> - <DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages</DefaultCoreClrSubsets> + <NativeAotSupported Condition="('$(TargetOS)' == 'windows' or '$(TargetOS)' == 'linux' or '$(TargetOS)' == 'OSX') and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64') and ('$(TargetOS)' != 'OSX' or '$(TargetArchitecture)' != 'arm64') and ('$(__DistroRid)' != 'linux-musl-arm64')">true</NativeAotSupported> + </PropertyGroup> + + <PropertyGroup> + <DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs</DefaultCoreClrSubsets> <!-- Even on platforms that do not support the CoreCLR runtime, we still want to build ilasm/ildasm. --> <DefaultCoreClrSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets> @@ -98,6 +103,8 @@ <SubsetName Include="Clr.ILTools" Description="The CoreCLR IL tools." /> <SubsetName Include="Clr.Runtime" Description="The CoreCLR .NET runtime." /> <SubsetName Include="Clr.Native" Description="All CoreCLR native non-test components, including the runtime, jits, and other native tools." /> + <SubsetName Include="Clr.NativeAotLibs" Description="The CoreCLR native AOT CoreLib, runtime, and other low level class libraries." /> + <SubsetName Include="Clr.ObjWriter" Description="Object writer for the CoreCLR Native AOT compiler." /> <SubsetName Include="Clr.PalTests" OnDemand="true" Description="The CoreCLR PAL tests." /> <SubsetName Include="Clr.PalTestList" OnDemand="true" Description="Generate the list of the CoreCLR PAL tests. When using the command line, use Clr.PalTests instead." /> <SubsetName Include="Clr.Hosts" Description="The CoreCLR corerun test host." /> @@ -193,6 +200,10 @@ <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrILToolsSubset=true</ClrRuntimeBuildSubsets> </PropertyGroup> + <PropertyGroup Condition="$(_subset.Contains('+clr.nativeaotlibs+')) and '$(NativeAotSupported)' == 'true'"> + <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrNativeAotSubset=true</ClrRuntimeBuildSubsets> + </PropertyGroup> + <ItemGroup Condition="'$(ClrRuntimeBuildSubsets)' != '' or $(_subset.Contains('+clr.nativeprereqs+'))"> <ProjectToBuild Include="$(CoreClrProjectRoot)runtime-prereqs.proj" Category="clr" /> </ItemGroup> @@ -222,8 +233,12 @@ $(CoreClrProjectRoot)tools\tieringtest\tieringtest.csproj; $(CoreClrProjectRoot)tools\r2rdump\R2RDump.csproj; $(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo.csproj; + $(CoreClrProjectRoot)tools\aot\ILCompiler\repro\repro.csproj; $(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true'"/> <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Build.Tasks\ILCompiler.Build.Tasks.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" /> <ProjectToBuild Condition="'$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" /> <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.TypeSystem.ReadyToRun.Tests\ILCompiler.TypeSystem.ReadyToRun.Tests.csproj" @@ -242,6 +257,22 @@ <ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo-pack.proj" Pack="true" BuildInParallel="false" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(RuntimeFlavor)' != 'Mono'"/> </ItemGroup> + <ItemGroup Condition="$(_subset.Contains('+clr.nativeaotlibs+')) and '$(NativeAotSupported)' == 'true'"> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.CoreLib\src\System.Private.CoreLib.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.Reflection.Metadata\src\System.Private.Reflection.Metadata.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.TypeLoader\src\System.Private.TypeLoader.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.Interop\src\System.Private.Interop.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.Reflection.Core\src\System.Private.Reflection.Core.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.Reflection.Execution\src\System.Private.Reflection.Execution.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.DisabledReflection\src\System.Private.DisabledReflection.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\System.Private.StackTraceMetadata\src\System.Private.StackTraceMetadata.csproj" Category="clr" /> + <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\Test.CoreLib\src\Test.CoreLib.csproj" Category="clr" /> + </ItemGroup> + + <ItemGroup Condition="$(_subset.Contains('+clr.objwriter+'))"> + <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ObjWriter\objwriter.proj" Category="clr" /> + </ItemGroup> + <!-- Mono sets --> <ItemGroup Condition="$(_subset.Contains('+mono.llvm+')) or $(_subset.Contains('+mono.aotcross+')) or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'"> <ProjectToBuild Include="$(MonoProjectRoot)llvm\llvm-init.proj" Category="mono" /> |