Skip to content

Commit

Permalink
Restructure based on dotnet#111552
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed Jan 17, 2025
1 parent 2347338 commit 8f72b07
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
6 changes: 6 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v$(NETCoreAppMaximumVersion)" DisplayName=".NET $(NETCoreAppMaximumVersion)" Alias="net$(NETCoreAppMaximumVersion)" />
</ItemGroup>

<PropertyGroup>
<!-- Define properties that depend on the host SDK RID here. -->
<BuildHostTools Condition="'$(DotNetBuildOrchestrator)' == 'true' and '$(OutputRID)' != '$(NETCoreSdkRuntimeIdentifier)'">true</BuildHostTools>
<BuildHostILTools Condition="'$(BuildHostTools)' == 'true' and $([MSBuild]::IsOsPlatform(Windows))">true</BuildHostILTools>
</PropertyGroup>

<!-- The Default behavior in VS is to show files for the first target framework in TargetFrameworks property.
This is required to show all the files corresponding to all target frameworks in VS. -->
<ItemGroup Condition="'$(DefaultLanguageSourceExtension)' != '' and
Expand Down
16 changes: 7 additions & 9 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@
<TargetCxxLibraryProperties Condition="'$(TargetCxxAbiLibrary)' != ''">$(TargetCxxLibraryProperties);CxxAbiLibrary=$(TargetCxxAbiLibrary)</TargetCxxLibraryProperties>
</PropertyGroup>

<PropertyGroup>
<BuildHostTools Condition="'$(DotNetBuildOrchestrator)' == 'true' and '$(OutputRID)' != '$(NETCoreSdkRuntimeIdentifier)'">true</BuildHostTools>
</PropertyGroup>

<ItemGroup>
<!-- CoreClr -->
<SubsetName Include="Clr" Description="The full CoreCLR runtime. Equivalent to: $(DefaultCoreClrSubsets)" />
Expand Down Expand Up @@ -317,15 +313,17 @@
<_BuildAnyCrossArch Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(EnableNativeSanitizers)' != ''">true</_BuildAnyCrossArch>
<_BuildCrossComponents Condition="$(_subset.Contains('+clr.crossarchtools+'))">true</_BuildCrossComponents>
<_BuildCrossComponents Condition="'$(ClrRuntimeBuildSubsets)' != '' and ('$(PrimaryRuntimeFlavor)' == 'CoreCLR' or '$(TargetsMobile)' == 'true')">true</_BuildCrossComponents>
<BuildHostILTools Condition="'$(BuildHostTools)' == 'true' and $([MSBuild]::IsOsPlatform(Windows))">true</BuildHostILTools>
<_CrossToolProperties Condition="'$(_BuildCrossComponents)' == 'true'">$(_CrossToolProperties);ClrCrossComponentsSubset=true</_CrossToolProperties>
<_CrossToolProperties Condition="'$(BuildHostILTools)' == 'true'">$(_CrossToolProperties);ClrILToolsSubset=true</_CrossToolProperties>
</PropertyGroup>

<ItemGroup Condition="'$(_BuildAnyCrossArch)' == 'true' and '$(_CrossToolProperties)' != ''">
<ItemGroup>
<_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true'" Include="ClrCrossComponentsSubset=true" />
<_CrossToolSubset Condition="'$(BuildHostILTools)' == 'true'" Include="ClrILToolsSubset=true" />
</ItemGroup>

<ItemGroup Condition="'$(_BuildAnyCrossArch)' == 'true' and '@(_CrossToolSubset)' != ''">
<ProjectToBuild
Include="$(CoreClrProjectRoot)runtime.proj"
AdditionalProperties="%(AdditionalProperties);$(_CrossToolProperties);
AdditionalProperties="%(AdditionalProperties);@(_CrossToolSubset);
HostArchitecture=$(BuildArchitecture);
HostCrossOS=$(HostOS);
PgoInstrument=false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup Condition="'$(BuildHostILTools)' == 'true'">
<BuildHostTargetingPackage>true</BuildHostTargetingPackage>
<PropertyGroup>
<IsILToolPackage>true</IsILToolPackage>
</PropertyGroup>
<ItemGroup>
<!-- identity project, runtime specific projects are included by props above -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.Build.Traversal">
<PropertyGroup Condition="'$(BuildHostILTools)' == 'true'">
<BuildHostTargetingPackage>true</BuildHostTargetingPackage>
<PropertyGroup>
<IsILToolPackage>true</IsILToolPackage>
</PropertyGroup>
<ItemGroup>
<!-- identity project, runtime specific projects are included by props above -->
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/.nuget/builds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup Condition="'$(BuildIdentityPackage)' == 'true'">
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == ''" />
</ItemGroup>
<ItemGroup Condition="'$(BuildHostTargetingPackage)' == 'true'">
<ItemGroup Condition="'$(BuildHostILTools)' == 'true' and '$(IsILToolPackage)' == 'true'">
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(NETCoreSdkRuntimeIdentifier)'" AdditionalProperties="%(Project.AdditionalProperties);PackCrossComponent=true" />
</ItemGroup>

Expand Down

0 comments on commit 8f72b07

Please sign in to comment.