Skip to content

Commit

Permalink
Pushed skipping unnecessary pkgproj into installer/pkg area
Browse files Browse the repository at this point in the history
Added cross and include into the native part of the runtime pack

Addressed feedback
  • Loading branch information
Steve Pfister committed Mar 31, 2020
1 parent 5c6f78f commit f3b3b0a
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 55 deletions.
16 changes: 1 addition & 15 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,11 @@
<ProjectToBuild Include="@(DepprojProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-pkgproj-')) and '$(TargetOS)' != 'iOS'">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-pkgproj-'))">
<PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.pkgproj" SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-pkgproj-')) and '$(TargetOS)' == 'iOS'">
<!-- For iOS we only need to construct runtime packs-->
<PkgprojProjectToBuild
Include="$(InstallerProjectRoot)pkg\projects\netcoreapp\pkg\Microsoft.NETCore.App.Runtime.pkgproj"
SignPhase="MsiFiles" BuildInParallel="false" />
<PkgprojProjectToBuild
Include="$(InstallerProjectRoot)pkg\projects\netcoreapp\pkg\legacy\**\*.pkgproj"
SignPhase="MsiFiles" BuildInParallel="false" />
<PkgprojProjectToBuild
Include="$(InstallerProjectRoot)pkg\projects\netcoreapp\pkg\workaround\**\*.pkgproj"
SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-bundle-'))">
<BundleProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.bundleproj" SignPhase="BundleInstallerFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(BundleProjectToBuild)" />
Expand Down
31 changes: 18 additions & 13 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsLinux)' == 'true'">x64</CoreCLRCrossTargetComponentDirName>
</PropertyGroup>

<Target Name="ResolveVMFilesFromLocalBuild">
<Target Name="ResolveRuntimeFilesFromLocalBuild">
<Error Condition="!Exists('$(CoreCLRArtifactsPath)') and '$(RuntimeFlavor)' == 'CoreCLR'" Text="The CoreCLR artifacts path does not exist '$(CoreCLRArtifactsPath)'. The CoreCLR subset category must be built before building this project." />
<Error Condition="!Exists('$(MonoArtifactsPath)') and '$(RuntimeFlavor)' == 'Mono'" Text="The Mono artifacts path does not exist '$(MonoArtifactsPath)'. The Mono subset category must be built before building this project." />

Expand All @@ -97,25 +97,25 @@
</PropertyGroup>

<ItemGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR'">
<VMFiles Include="$(CoreCLRSharedFrameworkDir)*.*" />
<RuntimeFiles Include="$(CoreCLRSharedFrameworkDir)*.*" />
<CoreCLRCrossTargetFiles Condition="'$(CoreCLRCrossTargetComponentDir)' != ''" Include="$(CoreCLRCrossTargetComponentDir)*.*" IsNative="true" />
<VMFiles Include="$(CoreCLRArtifactsPath)Redist/**/*.dll" />
<VMFiles>
<RuntimeFiles Include="$(CoreCLRArtifactsPath)Redist/**/*.dll" />
<RuntimeFiles>
<IsNative>true</IsNative>
</VMFiles>
</RuntimeFiles>
<_systemPrivateCoreLib Include="$(CoreCLRArtifactsPath)System.Private.CoreLib.dll"
Condition="Exists('$(CoreCLRArtifactsPath)System.Private.CoreLib.dll')" />
<_systemPrivateCoreLib Include="$(CoreCLRArtifactsPath)IL/System.Private.CoreLib.dll"
Condition="Exists('$(CoreCLRArtifactsPath)IL/System.Private.CoreLib.dll') and '@(_systemPrivateCoreLib)' == ''" />
<VMFiles Include="@(_systemPrivateCoreLib)" />
<VMFiles
<RuntimeFiles Include="@(_systemPrivateCoreLib)" />
<RuntimeFiles
Include="
$(CoreCLRSharedFrameworkDir)PDB/*.pdb;
$(CoreCLRSharedFrameworkDir)PDB/*.dbg;
$(CoreCLRSharedFrameworkDir)PDB/*.dwarf" />
<VMFiles
<RuntimeFiles
Include="$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.pdb;" />
<VMFiles Condition="Exists('$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.ni.pdb')"
<RuntimeFiles Condition="Exists('$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.ni.pdb')"
Include="$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.ni.pdb" />
<CoreCLRCrossTargetFiles Condition="'$(CoreCLRCrossTargetComponentDir)' != ''"
Include="
Expand All @@ -128,13 +128,18 @@
</CoreCLRCrossTargetFiles>
</ItemGroup>
<ItemGroup Condition="'$(RuntimeFlavor)' == 'Mono'">
<VMFiles Include="$(MonoArtifactsPath)\*.*" />
<VMFiles>
<RuntimeFiles Include="$(MonoArtifactsPath)\*.*" />
<RuntimeFiles>
<IsNative>true</IsNative>
</VMFiles>
</RuntimeFiles>

<MonoCrossFiles Condition="'$(TargetOS)' == 'iOS'"
Include="$(MonoArtifactsPath)\cross\*.*" />
<MonoIncludeFiles Condition="'$(TargetOS)' == 'iOS'"
Include="$(MonoArtifactsPath)\include\**\*.*" />
</ItemGroup>

<Error Condition="'@(VMFiles)' == ''" Text="The $(RuntimeFlavor) subset category must be built before building this project." />
<Error Condition="'@(RuntimeFiles)' == ''" Text="The $(RuntimeFlavor) subset category must be built before building this project." />
</Target>

<Target Name="EnsureLocalArtifactsExist">
Expand Down
17 changes: 17 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,23 @@ stages:
- Windows_NT_arm
- Windows_NT_arm64

#
# Installer Build for platforms using Mono
#
- template: /eng/pipelines/installer/installer-matrix.yml
parameters:
jobParameters:
liveRuntimeBuildConfig: release
liveLibrariesBuildConfig: Release
isOfficialBuild: ${{ variables.isOfficialBuild }}
useOfficialAllConfigurations: true
buildFullPlatformManifest: true
runtimeFlavor: mono
platforms:
- iOS_arm
- iOS_arm64
- iOS_x64

- ${{ if eq(variables.isOfficialBuild, true) }}:
- template: /eng/pipelines/official/stages/publish.yml
parameters:
Expand Down
10 changes: 5 additions & 5 deletions eng/referenceFromRuntime.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<Target Name="GetFilesFromRuntime" Returns="@(RuntimeFiles)" DependsOnTargets="GetFilesFromCoreClr;GetFilesFromMono">
<ItemGroup>
<RuntimeFiles Include="@(VMFiles)" />
<RuntimeFiles Include="@(RuntimeFiles)" />
</ItemGroup>
</Target>

Expand All @@ -43,13 +43,13 @@
-->
<Target Name="GetFilesFromCoreCLR"
Condition="'$(RuntimeFlavor)' != 'Mono'"
Returns="@(VMFiles)"
DependsOnTargets="ResolveVMFilesFromLocalBuild" />
Returns="@(RuntimeFiles)"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" />

<Target Name="GetFilesFromMono"
Condition="'$(RuntimeFlavor)' == 'Mono'"
Returns="@(VMFiles)"
DependsOnTargets="ResolveVMFilesFromLocalBuild" />
Returns="@(RuntimeFiles)"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" />

<Target Name="FilterReferenceFromRuntime"
AfterTargets="ResolveProjectReferences"
Expand Down
6 changes: 3 additions & 3 deletions src/installer/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<OutputRid Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'Linux'">linux-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'iOS'">iOS-$(TargetArchitecture)</OutputRid>
<OutputRid Condition="'$(TargetOS)' == 'iOS'">ios-$(TargetArchitecture)</OutputRid>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -130,7 +130,7 @@
<DisableCrossgen>false</DisableCrossgen>
<DisableCrossgen Condition="'$(RuntimeFlavor)' == 'Mono'">true</DisableCrossgen>
<!-- Disable cross-gen on FreeBSD for now. This can be revisited when we have full support. -->
<DisableCrossgen Condition="'$(TargetOS)'=='FreeBSD'">true</DisableCrossgen>
<DisableCrossgen Condition="'$(TargetOS)'=='FreeBSD'">true</DisableCrossgen>
<OutputVersionBadge>$(AssetOutputPath)sharedfx_$(OutputRid)_$(Configuration)_version_badge.svg</OutputVersionBadge>
</PropertyGroup>

Expand Down Expand Up @@ -189,7 +189,7 @@
<TargetsUnix>true</TargetsUnix>
</PropertyGroup>
</When>
<When Condition="$(OutputRid.StartsWith('iOS'))">
<When Condition="$(OutputRid.StartsWith('ios'))">
<PropertyGroup>
<TargetsiOS>true</TargetsiOS>
<TargetsUnix>true</TargetsUnix>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionProp>AppHostVersion</VersionProp>
</PropertyGroup>

<Import Project="$(MSBuildProjectName).props" />
<Import Project="$(MSBuildProjectName).props" Condition="'$(TargetOS)' != 'iOS'" />

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import
Condition="'$(PackageTargetRuntime)' != ''"
Condition="'$(PackageTargetRuntime)' != '' and '$(TargetOS)' != 'iOS'"
Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildThisFile)" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
</ItemGroup>
</Target>

<Import Condition="'$(PackageTargetRuntime)' != ''" Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildProjectName).props" />
<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<Import Condition="'$(PackageTargetRuntime)' != '' and '$(TargetOS)' != 'iOS'" Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildProjectName).props" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<Dependency Include="Microsoft.NETCore.DotNetHostResolver" VersionProp="HostResolverVersion" />
</ItemGroup>

<Import Project="$(MSBuildProjectName).props" />
<Import Project="$(MSBuildProjectName).props" Condition="'$(TargetOS)' != 'iOS'" />

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
</ItemGroup>
</Target>

<Import Project="$(MSBuildProjectName).props" />
<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<Import Project="$(MSBuildProjectName).props" Condition="'$(TargetOS)' != 'iOS'" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@

</Target>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@
<CrossArchSdkMsiInstallerArch Include="x64;x86" />
</ItemGroup>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
<File Include="PackageOverrides.txt" TargetPath="data/" />
</ItemGroup>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

</Project>
21 changes: 15 additions & 6 deletions src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,24 @@

<Target Name="GetDependencyVersionFiles" />

<Target Name="AddRuntimeFilesToPackage" DependsOnTargets="ResolveVMFilesFromLocalBuild" BeforeTargets="GetFilesFromPackageResolve">
<Target Name="AddRuntimeFilesToPackage" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" BeforeTargets="GetFilesFromPackageResolve">
<ItemGroup>
<VMFiles>
<RuntimeFiles>
<TargetPath>runtimes/$(PackageRID)/native</TargetPath>
</VMFiles>
</RuntimeFiles>

<VMFiles Condition="'%(FileName)' == 'crossgen'">
<RuntimeFiles Condition="'%(FileName)' == 'crossgen'">
<TargetPath>tools</TargetPath>
</VMFiles>
</RuntimeFiles>

<RuntimeFiles Condition="'$(TargetOS)' == 'iOS'"
Include="@(MonoCrossFiles)">
<TargetPath>runtimes/$(PackageRID)/native/cross</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(TargetOS)' == 'iOS'"
Include="@(MonoIncludeFiles)">
<TargetPath>runtimes/$(PackageRID)/native/include/%(RecursiveDir)</TargetPath>
</RuntimeFiles>

<CoreCLRCrossTargetFiles Condition="'%(FileName)' == 'clrjit' or '%(FileName)' == 'libclrjit'">
<TargetPath>runtimes/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)/native</TargetPath>
Expand All @@ -79,7 +88,7 @@
<CoreCLRCrossTargetFiles Condition="'%(FileName)%(Extension)' == 'mscordbi.dll' and '$(TargetsWindows)' == 'true'">
<TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
</CoreCLRCrossTargetFiles>
<ReferenceCopyLocalPaths Include="@(VMFiles);@(CoreCLRCrossTargetFiles)" />
<ReferenceCopyLocalPaths Include="@(RuntimeFiles);@(CoreCLRCrossTargetFiles);" />
</ItemGroup>
</Target>

Expand Down
14 changes: 7 additions & 7 deletions src/libraries/restore/runtime/runtime.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@
</Target>

<Target Name="OverrideRuntimeCoreCLR"
DependsOnTargets="ResolveVMFilesFromLocalBuild"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
AfterTargets="AfterResolveReferences;FilterNugetPackages"
Condition="'$(RuntimeFlavor)' != 'Mono'">
<ItemGroup>
<!-- CoreRun is not used for testing anymore, but we still use it for benchmarking and profiling -->
<VMFiles Include="$(CoreCLRArtifactsPath)/corerun*" />
<VMFiles Include="$(CoreCLRArtifactsPath)/PDB/corerun*" />
<ReferenceCopyLocalPaths Include="@(VMFiles)" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)/corerun*" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)/PDB/corerun*" />
<ReferenceCopyLocalPaths Include="@(RuntimeFiles)" />
</ItemGroup>
</Target>

<Target Name="OverrideRuntimeMono"
DependsOnTargets="ResolveVMFilesFromLocalBuild"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
AfterTargets="AfterResolveReferences;FilterNugetPackages"
Condition="'$(RuntimeFlavor)' == 'Mono'">
<ItemGroup>
<ReferenceCopyLocalPaths Include="@(VMFiles)" />
<ReferenceCopyLocalPaths Include="@(RuntimeFiles)" />
</ItemGroup>
</Target>

<Target Name="GetCoreCLRILFiles" DependsOnTargets="ResolveVMFilesFromLocalBuild">
<Target Name="GetCoreCLRILFiles" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<ItemGroup>
<CoreCLRILFiles Include="$(CoreCLRArtifactsPath)/IL/*.*" />
</ItemGroup>
Expand Down

0 comments on commit f3b3b0a

Please sign in to comment.