Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use OutputRid when creating .nupkgs, instead of PackageRID
  • Loading branch information
am11 authored and ViktorHofer committed Jul 5, 2021
commit 7d7e19d43586aafe5106791816aff9ee1c82d2c6
4 changes: 2 additions & 2 deletions src/coreclr/.nuget/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<ItemGroup>
<!-- Ensure we have a RID-specific package for the current build, even if it isn't in our official set, but
don't build the RID-specific package if we're in an unsupported os family -->
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
<BuildRID Include="$(PackageRID)"
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(OutputRid)"/>
<BuildRID Include="$(OutputRid)"
Condition="'$(_isSupportedOSGroup)' == 'true'">
<Platform Condition="'$(TargetArchitecture)' == 'x64'">amd64</Platform>
<Platform Condition="'$(TargetArchitecture)' != 'x64'">$(TargetArchitecture)</Platform>
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/.nuget/builds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<Target Name="FilterProjects" BeforeTargets="Build;Pack">
<Error Condition="'$(PackageRID)' == ''" Text="'PackageRID' property must be specified."/>
<Error Condition="'$(OutputRid)' == ''" Text="'OutputRid' property must be specified."/>

<!-- Only build packages for current RID or non-RID-specific -->
<ItemGroup>
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(PackageRID)'" />
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(OutputRid)'" />
</ItemGroup>

<ItemGroup Condition="'$(BuildIdentityPackage)' == 'true'">
Expand All @@ -22,4 +22,4 @@
<ProjectReference Include="@(_projectsToBuild)" />
</ItemGroup>
</Target>
</Project>
</Project>
4 changes: 2 additions & 2 deletions src/libraries/pkg/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
We'll add a RID for the current platform even if it isn't in the officially supported set -->
<ItemGroup Condition="'@(OfficialBuildRID)' != ''">
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
<BuildRID Include="$(PackageRID)">
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(OutputRid)"/>
<BuildRID Include="$(OutputRid)">
<Platform Condition="'$(TargetArchitecture)' == 'x64'">amd64</Platform>
<Platform Condition="'$(TargetArchitecture)' != 'x64'">$(TargetArchitecture)</Platform>
</BuildRID>
Expand Down
8 changes: 4 additions & 4 deletions src/libraries/pkg/dir.traversal.targets
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@

<PropertyGroup>
<TraversalBuildDependsOn>
FilterProjectsPackageRID;
FilterProjectsOutputRid;
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
</PropertyGroup>

<!-- When @(BuildRID) is set, filter the set of projects down to only those applicable to $(PackageRID) -->
<Target Name="FilterProjectsPackageRID" Condition="'@(BuildRID)' != ''">
<!-- When @(BuildRID) is set, filter the set of projects down to only those applicable to $(OutputRid) -->
<Target Name="FilterProjectsOutputRid" Condition="'@(BuildRID)' != ''">
<ItemGroup>
<!-- Build identity package, when SkipBuildIdentityPackage is not set -->
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '' and '$(SkipBuildIdentityPackage)' != 'true'" />
<!-- Build packages for current RID, when SkipBuildRuntimePackage is not set -->
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(PackageRID)' and '$(SkipBuildRuntimePackage)' != 'true'" />
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(OutputRid)' and '$(SkipBuildRuntimePackage)' != 'true'" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup Condition="'$(PackageTargetRuntime)' == 'linux-arm' or '$(PackageTargetRuntime)' == 'linux-arm64' or '$(PackageTargetRuntime)' == 'linux-x64' or '$(PackageTargetRuntime)' == 'osx-x64' or '$(PackageTargetRuntime)' == 'freebsd-x64'">
<File Include="$(NativeBinDir)$(LibPrefix)System.IO.Ports.Native$(LibSuffix)" >
<TargetPath>runtimes/$(PackageRID)/native</TargetPath>
<TargetPath>runtimes/$(OutputRid)/native</TargetPath>
</File>
</ItemGroup>
<ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
Expand Down