Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArPow stage 1: local source-build infrastructure #53294

Merged
merged 50 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1054536
Initial arcade-powered source-build infra
dagood Feb 4, 2021
7d0c956
Add patches, fixup from 5.0
dagood Feb 4, 2021
376c10c
Rename patches to match 6.0-p1 work
dagood Feb 4, 2021
8a4c258
Add source-build specific build script
dseefeld Jan 15, 2020
9d474ce
Incorporate build-source-build.sh, into eng/
dagood Feb 4, 2021
06f1d5e
Run inner build script, through coreclr
dagood Feb 8, 2021
0e4d155
Initial source-build args based on live build (not props file)
dagood Feb 8, 2021
cc4124f
Cleanup: add RID comments, rm empty/absolute args
dagood Feb 8, 2021
59fb50e
Fix subsets
dagood Feb 8, 2021
ad4201b
Disable sourcelink in env, not args
dagood Feb 8, 2021
1c87b39
Fix CI NZEC
dagood Feb 8, 2021
c4f711d
Revert "Use same code to DetectCiphersuiteConfiguration for portable …
dagood Feb 8, 2021
479c95a
Fix portability
dagood Feb 8, 2021
2565431
Fix AllJits build
dagood Feb 8, 2021
cd313cd
Fix missing crossgen2 for non-portable RID
dagood Feb 12, 2021
2b5307d
Create supplemental intermediate nupkgs
dagood Feb 12, 2021
d7546c5
Tweak category names
dagood Feb 16, 2021
d6602eb
Use centralized supplemental nupkg infra
dagood Feb 16, 2021
843caa7
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons Apr 27, 2021
a7d8b95
Add additional 6.0 patches
MichaelSimons Apr 27, 2021
18d9616
Patch updates after merging in main
MichaelSimons Apr 27, 2021
f8e8475
SourceBuild.props cleanup
MichaelSimons Apr 27, 2021
aa13d3c
Fix issue with incorrect patch merge
MichaelSimons May 3, 2021
38cea15
Patch updates
MichaelSimons May 4, 2021
f5445ee
Edit clr.tools patch
MichaelSimons May 14, 2021
4d94fd4
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons May 14, 2021
0a8059d
patch updates
MichaelSimons May 14, 2021
9b2c5b3
Revert patch integration
MichaelSimons May 14, 2021
1b2d9b1
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons May 25, 2021
23e4735
Patch updates
MichaelSimons May 26, 2021
5a12eaf
Edits per code review feedback
MichaelSimons Jun 8, 2021
e0c3357
ILAsm workaround
MichaelSimons Jun 8, 2021
658dea4
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons Jun 8, 2021
de586df
patch updates
MichaelSimons Jun 8, 2021
e9b7fe4
Move logic to set ILAsmToolPath for source-build
MichaelSimons Jun 8, 2021
469f6a1
Update eng/SourceBuild.props
MichaelSimons Jun 9, 2021
6c2e477
Remove libraries specific patches
ViktorHofer Jun 14, 2021
1c97495
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons Jun 14, 2021
e6f5d8f
Patch updates necessary with latest main merge
MichaelSimons Jun 14, 2021
f026627
Add back libraries-packages.proj harvesting patch
MichaelSimons Jun 14, 2021
371a532
Refactor intermediate package split to be chunkier
MichaelSimons Jun 14, 2021
58bb935
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons Jun 15, 2021
309421d
Integrate patch 0017
MichaelSimons Jun 15, 2021
7230fa1
Subsets update per code review
MichaelSimons Jun 15, 2021
972035a
Remove obsolete patch
MichaelSimons Jun 15, 2021
f905b0e
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons Jun 15, 2021
0124b4f
Merge branch 'main' of https://github.com/dotnet/runtime into arpow-s…
MichaelSimons Jun 18, 2021
cf48c62
Removed patches that were integrated into main
MichaelSimons Jun 18, 2021
4211c03
Remove two additional patches
ViktorHofer Jun 21, 2021
88a1715
Remove remaining patches
ViktorHofer Jun 21, 2021
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
121 changes: 121 additions & 0 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<Project>

<PropertyGroup>
<GitHubRepositoryName>runtime</GitHubRepositoryName>
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<!-- Set up the dotnet/runtime source-build command. -->
<PropertyGroup>
<BaseInnerSourceBuildCommand>./build.sh</BaseInnerSourceBuildCommand>

<SourceBuildPortable>true</SourceBuildPortable>
<SourceBuildPortable Condition="'$(SourceBuildNonPortable)' == 'true'">false</SourceBuildPortable>

<!-- If TargetRid not specified, detect RID based on portability. -->
<TargetRid Condition="'$(TargetRid)' == '' and '$(SourceBuildNonPortable)' == 'true'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(__DistroRid)</TargetRid>

<!-- Split e.g. 'fedora.33-x64' into 'fedora.33' and 'x64'. -->
<_targetRidPlatformIndex>$(TargetRid.LastIndexOfAny("-"))</_targetRidPlatformIndex>
<TargetRidWithoutPlatform>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)))</TargetRidWithoutPlatform>
<TargetRidPlatform>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetRidPlatform>

<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
</PropertyGroup>

<ItemGroup>
<!-- Work around issue where local clone may cause failure using non-origin remote fallback: https://github.com/dotnet/sourcelink/issues/629 -->
<InnerBuildEnv Include="EnableSourceControlManagerQueries=false" />
<InnerBuildEnv Include="EnableSourceLink=false" />
<InnerBuildEnv Include="DisableSourceLink=true" />
<InnerBuildEnv Include="DeterministicSourcePaths=false" />
</ItemGroup>

<Target Name="GetRuntimeSourceBuildCommandConfiguration"
BeforeTargets="GetSourceBuildCommandConfiguration">
<PropertyGroup>
<InnerBuildArgs>$(InnerBuildArgs) --arch $(TargetRidPlatform)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --configuration $(Configuration)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --ci</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --runtimeConfiguration $(Configuration)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --verbosity $(LogVerbosity)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --nodereuse false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --warnAsError false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:ContinuousIntegrationBuild=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:PackageRid=$(TargetRid)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:NoPgoOptimize=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:KeepNativeSymbols=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(TargetRidWithoutPlatform)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:ConfigurationGroup=$(Configuration)</InnerBuildArgs>
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved
<InnerBuildArgs>$(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildAllPackages=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildAllOOBPackages=true</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
<!-- Work around issue where libs build does not consume coreclr ILAsm build output: TODO Log issue -->
<InnerBuildArgs>$(InnerBuildArgs) /p:ILAsmToolPath=$([MSBuild]::NormalizeDirectory('$(CurrentRepoSourceBuildArtifactsDir)', 'bin', 'coreclr', 'Linux.$(TargetArchitecture).$(Configuration)'))</InnerBuildArgs>
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
</Target>

<!-- Remove once patches are integrated into the repo -->
<Target Name="ApplySourceBuildPatchFiles"
AfterTargets="PrepareInnerSourceBuildRepoRoot"
BeforeTargets="RunInnerSourceBuildCommand">

<ItemGroup>
<SourceBuildPatchFile Include="$(RepositoryEngineeringDir)source-build-patches\*.patch" />
</ItemGroup>

<Exec
Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>

<Target Name="CategorizeRuntimeSupplementalArtifacts"
BeforeTargets="GetCategorizedIntermediateNupkgContents">
<ItemGroup>
<!--
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - I logged an issue for having the ArPOW infrastructure handle large packages.

Order matters in some situations: put more specific patterns first, so
they are the ones "picked" during item-name-only deduplication.
-->
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-hostfxr-internal-*.tar.gz" Category="hostfxr-internal" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-runtime-internal-*.tar.gz" Category="runtime-internal" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-runtime-*.tar.gz" Category="runtime" />

<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-crossgen2-*.tar.gz" Category="Crossgen2Pack.Archive" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-apphost-pack-*.tar.gz" Category="HostPack.Archive" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-targeting-pack-*.tar.gz" Category="RefPack.Archive" />

<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Crossgen2.*.nupkg" Category="Crossgen2Pack" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Host.*.nupkg" Category="HostPack" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Ref.*.nupkg" Category="RefPack" />
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Runtime.*.nupkg" Category="RuntimePack" />

<IntermediateNupkgArtifactFile
Include="
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-ilverify.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NET.Sdk.IL.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\*Microsoft.NETCore.ILAsm.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\*Microsoft.NETCore.ILDAsm.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\*Microsoft.NETCore.TestHost.*.nupkg;
"
Category="CoreCLR" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to better understand why these categories are necessary? We don't have a categorization today in the repo and hard coding all the produced assets for source build isn't really maintainable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the background on this - dotnet/source-build#2034 and https://github.com/dotnet/source-build/blob/main/Documentation/planning/arcade-powered-source-build/intermediate-nupkg.md#too-large. The driving reason a single intermediate NuGet package is too large to publish.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our discussion earlier today I updated the split to be chunkier until the Arcade changes are in-place to handle splitting the artifacts automatically. There are only three packages produced now, two being the supplemental ones.

371M Microsoft.SourceBuild.Intermediate.runtime.runtime.linux-x64.6.0.0-dev.nupkg
319M Microsoft.SourceBuild.Intermediate.runtime.linux-x64.6.0.0-dev.nupkg
357M Microsoft.SourceBuild.Intermediate.runtime.Crossgen2Pack.linux-x64.6.0.0-dev.nupkg


<IntermediateNupkgArtifactFile
Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)NonShipping\Microsoft.NET.HostModel.*.nupkg;"
Category="HostLibraries" />

<IntermediateNupkgArtifactFile
Include="
$(CurrentRepoSourceBuildArtifactsPackagesDir)NonShipping\Microsoft.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\System.*.nupkg;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\runtime.*.runtime.native.System.*.nupkg;
"
Category="Libraries" />
</ItemGroup>
</Target>

</Project>
5 changes: 5 additions & 0 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<UsageData>
<IgnorePatterns>
<UsagePattern IdentityGlob="*/*" />
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
</IgnorePatterns>
</UsageData>
6 changes: 5 additions & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<PropertyGroup>
<DefaultSubsets>clr+mono+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsMobile)' == 'true'">mono+libs+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(DotNetBuildFromSource)' == 'true'">clr+libs+host+packs</DefaultSubsets>
<!-- On Windows mono is supported for x86/x64 only -->
<DefaultSubsets Condition="'$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64'">clr+libs+host+packs</DefaultSubsets>
</PropertyGroup>
Expand All @@ -43,13 +44,14 @@

<PropertyGroup>
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(DotNetBuildFromSource)' == 'true'">clr.tools+clr.runtime+clr.corelib+clr.nativecorelib+clr.packages+clr.jit+clr.alljits</DefaultCoreClrSubsets>
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved

<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages</DefaultMonoSubsets>

<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
'$(BuildTargetFramework)' == '' or
'$(BuildAllConfigurations)' == 'true'">libs.native+</DefaultLibrariesSubsets>
Expand All @@ -58,9 +60,11 @@
<DefaultHostSubsets>host.native+host.pkg+host.tools+host.tests</DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(RuntimeFlavor)' == 'Mono'"></DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true'">host.native</DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(DotNetBuildFromSource)' == 'true'">host.native+host.tools</DefaultHostSubsets>

<DefaultPacksSubsets>packs.product</DefaultPacksSubsets>
<DefaultPacksSubsets Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'">$(DefaultPacksSubsets)+packs.tests</DefaultPacksSubsets>
<DefaultPacksSubsets Condition="'$(DotNetBuildFromSource)' == 'true'">packs.product+packs.installers</DefaultPacksSubsets>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21304.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21304.1">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 7ad6f5dc44092c47cee1af32be0f6a061b8abb7c Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Fri, 24 Jan 2020 19:01:58 +0000
Subject: [PATCH] Add trailing path separator to repo_root

---
eng/common/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/common/build.sh b/eng/common/build.sh
index 55b298f16cc..1b250d16018 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -202,7 +202,7 @@ function Build {
MSBuild $_InitializeToolset \
$bl \
/p:Configuration=$configuration \
- /p:RepoRoot="$repo_root" \
+ /p:RepoRoot="$repo_root/" \
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
/p:Restore=$restore \
/p:Build=$build \
/p:Rebuild=$rebuild \
--
2.25.4

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From ea2f8aed39d650f3a9a5791eb0858fe5ece3331c Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Wed, 25 Mar 2020 15:22:44 +0000
Subject: [PATCH] Temporarily default nopgooptimize in build scripts until
https://github.com/dotnet/runtime/issues/34069 is fixed.

---
src/coreclr/build-runtime.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/coreclr/build-runtime.sh b/src/coreclr/build-runtime.sh
index 25cf3e06ea6..cfc466fbed0 100755
--- a/src/coreclr/build-runtime.sh
+++ b/src/coreclr/build-runtime.sh
@@ -173,7 +173,7 @@ __CrossBuild=0
__DistroRid=""
__PgoInstrument=0
__PgoOptDataPath=""
-__PgoOptimize=1
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved
+__PgoOptimize=0
__PortableBuild=1
__ProjectDir="$__ProjectRoot"
__RootBinDir="$__RepoRootDir/artifacts"
@@ -184,7 +184,7 @@ __SkipCrossArchNative=0
__SkipGenerateVersion=0
__SkipManaged=0
__SkipRestore=""
-__SkipRestoreOptData=0
+__SkipRestoreOptData=1
__SourceDir="$__ProjectDir/src"
__StaticAnalyzer=0
__UnprocessedBuildArgs=
--
2.25.4

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 42bb5cf46bbc21011822afeabda30eaee72d25cd Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Mon, 20 Apr 2020 15:09:58 +0000
Subject: [PATCH] Remove import of PackageVersionProps from eng/Vervsions.props
It should be imported by Arcade SDK

---
eng/Versions.props | 2 --
1 file changed, 2 deletions(-)

diff --git a/eng/Versions.props b/eng/Versions.props
index cc4a7b62914..cef8de452b4 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -167,6 +167,4 @@
<MicrosoftNETRuntimeEmscripten2021Nodewinx64Version>6.0.0-preview.6.21275.1</MicrosoftNETRuntimeEmscripten2021Nodewinx64Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETRuntimeEmscripten2021Nodewinx64Version)</MicrosoftNETRuntimeEmscriptenVersion>
</PropertyGroup>
- <!-- Override isolated build dependency versions with versions from Repo API. -->
- <Import Project="$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != ''" />
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
</Project>
--
2.25.4

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From b0080bd8a32d77a59b4c970d0107f98ec7a159ed Mon Sep 17 00:00:00 2001
From: dseefeld <dseefeld@microsoft.com>
Date: Thu, 11 Jun 2020 12:15:06 -0400
Subject: [PATCH] Include netcorapp5.0 versions in libraries nupkgs

Assets for netcoreapp3.0 are not built in source-build because we don't
have references for past netcoreapp versions. That leaves the packages
built by the libraries build with a placeholder for netcoreapp3.0, which
causes issues with consumption of these packages in dependent repos.
Packages for netcoreapp5.0 are built but not packaged by design. This
patch includes these assets in the packages built by the libraries
build, only for the source-build build.
---
src/libraries/Directory.Build.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index 0548b4468af..7460e44616b 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -230,7 +230,7 @@
</ItemGroup>

<PropertyGroup>
- <ExcludeFromPackage Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)')) and '$(ExcludeCurrentNetCoreAppFromPackage)' == 'true'">true</ExcludeFromPackage>
+ <ExcludeFromPackage Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)')) and '$(ExcludeCurrentNetCoreAppFromPackage)' == 'true' and '$(DotNetBuildFromSource)' != 'true'">true</ExcludeFromPackage>
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<PropertyGroup Condition="'$(IsCrossTargetingBuild)' != 'true' and '$(DotnetBuildFromSource)' == 'true' and '$(IsPackable)' == 'true' and !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)')) and '$(TargetFrameworkIdentifier)' != '.NETStandard' and '$(TargetFrameworkVersion)' != 'v2.0'">
--
2.25.4

30 changes: 30 additions & 0 deletions eng/source-build-patches/0013-Remove--Browser-TFM.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From d7b8db6b071bf7bf30ff8ae54c08e5cb6aebc2ec Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Wed, 2 Sep 2020 08:24:20 -0500
Subject: [PATCH] Remove -Browser TFM

This gets treated the same as net5.0 for some reason, which causes
errors like
.dotnet/sdk/5.0.100-preview.8.20417.9/NuGet.RestoreEx.targets(10,5):
error : Invalid restore input. Duplicate frameworks found: 'net5.0, net5.0, net5.0'. Input files:
artifacts/src/runtime.bf456654f9a4f9a86c15d9d50095ff29cde5f0a4/src/libraries/Native/native-binplace.proj.
[artifacts/src/runtime.bf456654f9a4f9a86c15d9d50095ff29cde5f0a4/Build.proj]
---
.../src/System.Security.Cryptography.OpenSsl.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj b/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj
index 133c02e..ad2eadd 100644
--- a/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj
+++ b/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
--
2.25.4

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From a1d1e603e5ffc5cc0402725819ea3a29e71e6c7b Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Sat, 5 Sep 2020 02:46:44 -0500
Subject: [PATCH] Use 1.0 version of ref assemblies

---
src/libraries/pkg/test/frameworkSettings/net/settings.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libraries/pkg/test/frameworkSettings/net/settings.targets b/src/libraries/pkg/test/frameworkSettings/net/settings.targets
index e4e8ff23d68..edfeff17503 100644
--- a/src/libraries/pkg/test/frameworkSettings/net/settings.targets
+++ b/src/libraries/pkg/test/frameworkSettings/net/settings.targets
@@ -8,7 +8,7 @@
<ItemGroup>
<!-- For .NET Framework we reference this package which has the same layout as the SDK, with this package,
tests can run in any machine without having to install .NET Framework. -->
- <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" />
+ <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved

<!-- these are part of the targeting pack but not actual assemblies -->
<ExcludeReference Include="System.EnterpriseServices.Thunk;System.EnterpriseServices.Wrapper" />
--
2.25.4

Loading