1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

Merge branch 'main' of github.com:dotnet/runtime into feature/use-dllimport-generator

This commit is contained in:
Jeremy Koritzinsky 2021-07-29 10:44:59 -07:00
commit 108fcdb61c
No known key found for this signature in database
GPG key ID: 6E95B6A678BF68F1
3602 changed files with 177594 additions and 70149 deletions

View file

@ -15,13 +15,13 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "1.0.0-prerelease.21314.1",
"version": "1.0.0-prerelease.21370.1",
"commands": [
"xharness"
]
},
"microsoft.visualstudio.slngen.tool": {
"version": "5.0.5",
"version": "6.0.1",
"commands": [
"slngen"
]

18
.github/CODEOWNERS vendored
View file

@ -4,7 +4,7 @@
/src/libraries/Common/src/Interop/ @dotnet/platform-deps-team
/src/libraries/Common/src/System/Net/Http/aspnetcore/ @dotnet/http
/src/libraries/Common/tests/Tests/System/Net/aspnetcore/ @dotnet/http
/src/libraries/System.Text.Json/ @steveharter @layomia @Jozkee @eiriktsarpalis
/src/libraries/System.Text.Json/ @steveharter @layomia @eiriktsarpalis
# CoreCLR Code Owners
@ -19,17 +19,17 @@
/src/mono/llvm @vargaz @SamMonoRT @imhameed @EgorBo
/src/mono/mono/arch @vargaz
/src/mono/mono/eglib @vargaz @lambdageek @CoffeeFlux
/src/mono/mono/eglib @vargaz @lambdageek
/src/mono/mono/metadata @vargaz @lambdageek @thaystg @CoffeeFlux
/src/mono/mono/metadata/*-win* @lateralusX @lambdageek @CoffeeFlux
/src/mono/mono/metadata @vargaz @lambdageek @thaystg
/src/mono/mono/metadata/*-win* @lateralusX @lambdageek
/src/mono/mono/metadata/handle* @lambdageek @vargaz
/src/mono/mono/metadata/monitor* @brzvlad @vargaz
/src/mono/mono/metadata/sgen* @brzvlad @vargaz @naricc
/src/mono/mono/metadata/thread* @lateralusX @lambdageek
/src/mono/mono/metadata/w32* @lateralusX @lambdageek @CoffeeFlux
/src/mono/mono/metadata/w32* @lateralusX @lambdageek
/src/mono/mono/mini @vargaz @lambdageek @SamMonoRT @CoffeeFlux @imhameed
/src/mono/mono/mini @vargaz @lambdageek @SamMonoRT @imhameed
/src/mono/mono/mini/*cfgdump* @vargaz
/src/mono/mono/mini/*exceptions* @vargaz @BrzVlad @imhameed
/src/mono/mono/mini/*llvm* @vargaz @imhameed @EgorBo
@ -43,8 +43,8 @@
/src/mono/mono/profiler @BrzVlad @lambdageek
/src/mono/mono/sgen @BrzVlad @lambdageek @naricc
/src/mono/mono/utils @vargaz @lambdageek @CoffeeFlux
/src/mono/mono/utils/*-win* @lateralusX @lambdageek @CoffeeFlux
/src/mono/mono/utils @vargaz @lambdageek
/src/mono/mono/utils/*-win* @lateralusX @lambdageek
/src/mono/mono/utils/atomic* @vargaz
/src/mono/mono/utils/mono-hwcap* @vargaz
/src/mono/mono/utils/mono-mem* @vargaz
@ -53,5 +53,3 @@
/src/mono/mono/utils/mono-threads* @lambdageek @vargaz
/src/mono/dlls @thaystg @lambdageek
/src/mono/netcore @marek-safar @akoeplinger @vargaz @steveisok

View file

@ -1,53 +0,0 @@
---
name: API proposal
about: Propose a change to the public API surface
title: ''
labels: api-suggestion
assignees: ''
---
## Background and Motivation
<!--
We welcome API proposals! We have a process to evaluate the value and shape of new API. There is an overview of our process [here](https://github.com/dotnet/runtime/blob/main/docs/project/api-review-process.md). This template will help us gather the information we need to start the review process.
First, please describe the purpose and value of the new API here.
-->
## Proposed API
<!--
Please provide the specific public API signature diff that you are proposing. For example:
```diff
namespace System.Collections.Generic
{
- public class HashSet<T> : ICollection<T>, ISet<T> {
+ public class HashSet<T> : ICollection<T>, ISet<T>, IReadOnlySet<T> {
}
```
You may find the [Framework Design Guidelines](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/framework-design-guidelines-digest.md) helpful.
-->
## Usage Examples
<!--
Please provide code examples that highlight how the proposed API additions are meant to be consumed.
This will help suggest whether the API has the right shape to be functional, performant and useable.
You can use code blocks like this:
``` C#
// some lines of code here
```
-->
## Alternative Designs
<!--
Were there other options you considered, such as alternative API shapes?
How does this compare to analogous APIs in other ecosystems and libraries?
-->
## Risks
<!--
Please mention any risks that to your knowledge the API proposal might entail, such as breaking changes, performance regressions, etc.
-->

View file

@ -0,0 +1,66 @@
name: API Suggestion
description: Propose a change to the public API surface
title: "[API Proposal]: "
labels: [api-suggestion]
body:
- type: markdown
attributes:
value: |
We welcome API proposals! We have a process to evaluate the value and shape of new API. There is an overview of our process [here](https://github.com/dotnet/runtime/blob/main/docs/project/api-review-process.md). This template will help us gather the information we need to start the review process.
- type: textarea
id: background
attributes:
label: Background and motivation
description: Please describe the purpose and value of the new API here.
placeholder: Purpose
validations:
required: true
- type: textarea
id: api-proposal
attributes:
label: API Proposal
description: |
Please provide the specific public API signature diff that you are proposing.
You may find the [Framework Design Guidelines](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/framework-design-guidelines-digest.md) helpful.
placeholder: API declaration (no method bodies)
value: |
```C#
namespace System.Collections.Generic
{
public class MyFancyCollection<T> : IEnumerable<T>
{
public void Fancy(T item);
}
}
```
validations:
required: true
- type: textarea
id: api-usage
attributes:
label: API Usage
description: |
Please provide code examples that highlight how the proposed API additions are meant to be consumed. This will help suggest whether the API has the right shape to be functional, performant and useable.
placeholder: API usage
value: |
```C#
// Fancy the value
var c = new MyFancyCollection<int>();
c.Fancy(42);
// Getting the values out
foreach (var v in c)
Console.WriteLine(v);
```
validations:
required: true
- type: textarea
id: risks
attributes:
label: Risks
description: |
Please mention any risks that to your knowledge the API proposal might entail, such as breaking changes, performance regressions, etc.
placeholder: Risks
validations:
required: false

View file

@ -1,52 +1,54 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.SDK",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.Component.FSharp",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.Component.MSBuild",
"Microsoft.Net.Component.4.5.2.TargetingPack",
"Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
"Microsoft.VisualStudio.Component.SQL.CLR",
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.Net.Component.4.8.SDK",
"Microsoft.Net.Component.4.7.2.TargetingPack",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
"Microsoft.VisualStudio.Component.SQL.CLR",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.VisualStudio.Component.ManagedDesktop.Core",
"Microsoft.Net.Component.4.5.2.TargetingPack",
"Microsoft.Net.Component.4.5.TargetingPack",
"Microsoft.VisualStudio.Component.IntelliCode",
"Microsoft.Net.Component.4.TargetingPack",
"Microsoft.Net.Component.4.5.1.TargetingPack",
"Microsoft.Net.Component.4.6.TargetingPack",
"Microsoft.Net.ComponentGroup.TargetingPacks.Common",
"Microsoft.VisualStudio.Component.DiagnosticTools",
"Microsoft.Net.Component.4.6.2.TargetingPack",
"Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools",
"Microsoft.Net.Component.4.7.TargetingPack",
"Microsoft.Net.ComponentGroup.4.7.DeveloperTools",
"Microsoft.NetCore.Component.SDK",
"Microsoft.VisualStudio.Component.FSharp",
"Microsoft.ComponentGroup.ClickOnce.Publish",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.Net.Component.4.8.TargetingPack",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.VisualStudio.Component.DiagnosticTools",
"Microsoft.VisualStudio.Component.IntelliCode",
"Microsoft.Net.Component.4.6.2.TargetingPack",
"Microsoft.Net.Component.4.7.TargetingPack",
"Microsoft.VisualStudio.Component.ClassDesigner",
"Microsoft.VisualStudio.Component.GraphDocument",
"Microsoft.VisualStudio.Component.CodeMap",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.ComponentGroup.Blend",
"Microsoft.VisualStudio.Component.FSharp.Desktop",
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.VC.CLI.Support",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.VC.Tools.ARM",
"Microsoft.Net.ComponentGroup.TargetingPacks.Common",
"Microsoft.Net.Component.4.6.TargetingPack",
"Microsoft.VisualStudio.Component.Git",
"Microsoft.VisualStudio.Component.LinqToSql",
"Microsoft.NetCore.Component.Runtime.3.1",
"Microsoft.NetCore.Component.Runtime.5.0",
"Microsoft.Net.Component.4.6.2.SDK",
"Microsoft.Net.Component.4.7.SDK"
]

View file

@ -10,13 +10,15 @@
</PropertyGroup>
<PropertyGroup Label="CalculateTargetOS">
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('SOLARIS'))">Solaris</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSUnixLike())">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('WINDOWS'))">windows</TargetOS>
<_hostOS>Linux</_hostOS>
<_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">OSX</_hostOS>
<_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</_hostOS>
<_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</_hostOS>
<_hostOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</_hostOS>
<_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">Solaris</_hostOS>
<_hostOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows</_hostOS>
<_hostOS Condition="'$(TargetOS)' == 'Browser'">Browser</_hostOS>
<TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>
@ -44,6 +46,7 @@
<NetCoreAppCurrentIdentifier>.NETCoreApp</NetCoreAppCurrentIdentifier>
<NetCoreAppCurrentTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppCurrentVersion)</NetCoreAppCurrentTargetFrameworkMoniker>
<NetCoreAppCurrent>net$(NetCoreAppCurrentVersion)</NetCoreAppCurrent>
<NetCoreAppMinimum>netcoreapp3.1</NetCoreAppMinimum>
<AspNetCoreAppCurrent>net$(AspNetCoreAppCurrentVersion)</AspNetCoreAppCurrent>
<NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
<NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
@ -56,6 +59,7 @@
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'coreclr'))</CoreClrProjectRoot>
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'installer'))</InstallerProjectRoot>
<WorkloadsProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'workloads'))</WorkloadsProjectRoot>
<SharedNativeRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'native'))</SharedNativeRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tasks'))</RepoTasksDir>
@ -70,8 +74,10 @@
<AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
<WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
<WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
<WorkloadBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WorkloadBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WorkloadBuildTasksDir>
<MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
<RuntimeConfigParserDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'RuntimeConfigParser', 'Debug', '$(NetCoreAppToolCurrent)'))</RuntimeConfigParserDir>
<JsonToItemsTaskFactoryDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'JsonToItemsTaskFactory', 'Debug', '$(NetCoreAppToolCurrent)'))</JsonToItemsTaskFactoryDir>
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', 'Debug', '$(NetCoreAppToolCurrent)', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', 'Debug', 'net461', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
@ -81,8 +87,11 @@
<AndroidAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll'))</AndroidAppBuilderTasksAssemblyPath>
<WasmAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll'))</WasmAppBuilderTasksAssemblyPath>
<WasmBuildTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll'))</WasmBuildTasksAssemblyPath>
<WorkloadBuildTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WorkloadBuildTasksDir)', 'WorkloadBuildTasks.dll'))</WorkloadBuildTasksAssemblyPath>
<MonoAOTCompilerTasksAssemblyPath>$([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll'))</MonoAOTCompilerTasksAssemblyPath>
<RuntimeConfigParserTasksAssemblyPath>$([MSBuild]::NormalizePath('$(RuntimeConfigParserDir)', 'RuntimeConfigParser.dll'))</RuntimeConfigParserTasksAssemblyPath>
<JsonToItemsTaskFactoryTasksAssemblyPath>$([MSBuild]::NormalizePath('$(JsonToItemsTaskFactoryDir)', 'JsonToItemsTaskFactory.dll'))</JsonToItemsTaskFactoryTasksAssemblyPath>
<ILAsmToolPath Condition="'$(DotNetBuildFromSource)' == 'true'">$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(Configuration)'))</ILAsmToolPath>
</PropertyGroup>
<PropertyGroup Label="CalculateConfiguration">
@ -113,16 +122,13 @@
the build system to use browser/ios/android as the _runtimeOS for produced package RIDs. -->
<_runtimeOS Condition="'$(TargetsMobile)' == 'true'">$(TargetOS.ToLowerInvariant())</_runtimeOS>
<_runtimeOSVersionIndex>$(_runtimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(_runtimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
<_portableOS>linux</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl</_portableOS>
<_portableOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(_runtimeOS)' == 'win' or '$(TargetOS)' == 'windows'">win</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'Solaris'">solaris</_portableOS>
<_portableOS Condition="'$(_hostOS)' == 'OSX'">osx</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'win' or '$(TargetOS)' == 'windows'">win</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'FreeBSD' or '$(TargetOS)' == 'FreeBSD'">freebsd</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'illumos' or '$(TargetOS)' == 'illumos'">illumos</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'Solaris' or '$(TargetOS)' == 'Solaris'">solaris</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'Browser'">browser</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'maccatalyst'">maccatalyst</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'ios'">ios</_portableOS>
@ -133,16 +139,12 @@
<_runtimeOS Condition="$(_runtimeOS.StartsWith('tizen'))">linux</_runtimeOS>
<_runtimeOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)</_runtimeOS>
<!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
<_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl' and '$(_runtimeOSFamily)' != 'illumos' and '$(_runtimeOSFamily)' != 'Solaris'">linux</_portableOS>
</PropertyGroup>
<PropertyGroup Label="CalculateRID">
<_toolRuntimeRID Condition="'$(CrossBuild)' == 'true'">$(_hostOS.ToLowerInvariant)-$(_hostArch)</_toolRuntimeRID>
<_toolRuntimeRID Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_runtimeOS)-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="'$(_toolRuntimeRID)' == ''">$(_runtimeOS)-$(_hostArch)</_toolRuntimeRID>
<!-- We build linux-musl-arm on a ubuntu container, so we can't use the toolset build for alpine runtime. We need to use portable linux RID for our toolset in order to be able to use it. -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(TargetArchitecture.StartsWith('arm')) and !$(_hostArch.StartsWith('arm'))">linux-x64</_toolRuntimeRID>
<!-- There are no WebAssembly tools, so use the default ones -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser'">linux-x64</_toolRuntimeRID>
@ -162,26 +164,12 @@
<MicrosoftNetCoreIlasmPackageRuntimeId Condition="'$(MicrosoftNetCoreIlasmPackageRuntimeId)' == ''">$(_toolRuntimeRID)</MicrosoftNetCoreIlasmPackageRuntimeId>
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</_packageRID>
<_packageRID Condition="'$(CrossBuild)' == 'true'">$(_hostOS.ToLowerInvariant)-$(TargetArchitecture)</_packageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(_packageRID)</PackageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(_runtimeOS)-$(TargetArchitecture)</PackageRID>
<_outputRID Condition="'$(TargetOS)' == 'windows'">win-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Linux'">linux-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'NetBSD'">netbsd-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'illumos'">illumos-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Solaris'">solaris-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'MacCatalyst'">maccatalyst-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'iOS'">ios-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'iOSSimulator'">iossimulator-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'tvOS'">tvos-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'tvOSSimulator'">tvossimulator-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Android'">android-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Browser'">browser-$(TargetArchitecture)</_outputRID>
<OutputRid Condition="'$(OutputRid)' == ''">$(PackageRID)</OutputRid>
<OutputRid Condition="'$(PortableBuild)' == 'true'">$(_outputRID)</OutputRid>
<OutputRid Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</OutputRid>
</PropertyGroup>
<PropertyGroup Label="CalculateTargetOSName" Condition="'$(SkipInferTargetOSName)' != 'true'">
@ -202,6 +190,17 @@
<TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix>
</PropertyGroup>
<PropertyGroup>
<MicrosoftNetCoreAppRefPackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.ref'))</MicrosoftNetCoreAppRefPackDir>
<MicrosoftNetCoreAppRefPackRefDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'ref', '$(NetCoreAppCurrent)'))</MicrosoftNetCoreAppRefPackRefDir>
<MicrosoftNetCoreAppRefPackDataDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'data'))</MicrosoftNetCoreAppRefPackDataDir>
<MicrosoftNetCoreAppRuntimePackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.runtime.$(PackageRID)', '$(LibrariesConfiguration)'))</MicrosoftNetCoreAppRuntimePackDir>
<MicrosoftNetCoreAppRuntimePackRidDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackDir)', 'runtimes', '$(PackageRID)'))</MicrosoftNetCoreAppRuntimePackRidDir>
<MicrosoftNetCoreAppRuntimePackRidLibTfmDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackRidDir)', 'lib', '$(NetCoreAppCurrent)'))</MicrosoftNetCoreAppRuntimePackRidLibTfmDir>
<MicrosoftNetCoreAppRuntimePackNativeDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackRidDir)', 'native'))</MicrosoftNetCoreAppRuntimePackNativeDir>
</PropertyGroup>
<!--Feature switches -->
<PropertyGroup>
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and ('$(Configuration)' == 'Release' or '$(Configuration)' == 'Checked')">true</EnableNgenOptimization>
@ -281,6 +280,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<!-- By default the SDK produces ref assembly for 5.0 or later -->
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<!-- We have very special projects that don't always contain default references. We also build MSBuild Tasks
and there are some implicit namespaces that clash, i.e System.Threading.Tasks. -->
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>
<PropertyGroup>

View file

@ -55,7 +55,9 @@
<PackageDescription Condition="'$(PackageDescription)' == '' and '$(UseRuntimePackageDisclaimer)' == 'true'">$(RuntimePackageDisclaimer)</PackageDescription>
<!-- Keep in sync as required by the Packaging SDK in Arcade. -->
<Description>$(PackageDescription)</Description>
<!-- BeforePack hook should be removed after porting all the projects to dotnet pack. -->
<BeforePack>$(BeforePack);AddNETStandardCompatErrorFileForPackaging</BeforePack>
<GenerateNuspecDependsOn>AddNETStandardCompatErrorFileForPackaging;$(GenerateNuspecDependsOn)</GenerateNuspecDependsOn>
</PropertyGroup>
<!-- Remove when https://github.com/NuGet/Home/issues/10405 is implemented and consumed. -->
@ -77,8 +79,7 @@
<Target Name="AddNETStandardCompatErrorFileForPackaging"
Condition="'@(NETStandardCompatError)' != ''"
Inputs="%(NETStandardCompatError.Identity)"
Outputs="unused"
BeforeTargets="GetFiles">
Outputs="unused">
<PropertyGroup>
<_NETStandardCompatErrorFilePath>$(BaseIntermediateOutputPath)netstandardcompaterrors\%(NETStandardCompatError.Identity)\$(PackageId).targets</_NETStandardCompatErrorFilePath>
<_NETStandardCompatErrorFileTarget>NETStandardCompatError_$(PackageId.Replace('.', '_'))_$([System.String]::new('%(NETStandardCompatError.Supported)').Replace('.', '_'))</_NETStandardCompatErrorFileTarget>

View file

@ -17,6 +17,8 @@
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
<!-- Used for dotnet pack task -->
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
<!-- Used for the Rich Navigation indexing task -->
<add key="richnav" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
<!-- Used for DllImportGenerator -->

View file

@ -680,7 +680,7 @@ worldwide. This software is distributed without any warranty.
See <http://creativecommons.org/publicdomain/zero/1.0/>.
License for fastmod (https://github.com/lemire/fastmod)
License for fastmod (https://github.com/lemire/fastmod) and ibm-fpgen (https://github.com/nigeltao/parse-number-fxx-test-data)
--------------------------------------
Copyright 2018 Daniel Lemire

View file

@ -9,8 +9,9 @@ Note: Editing this file doesn't update the mapping used by the `@msftbot` issue
| Area | Lead | Owners (area experts to tag in PR's and issues) | Notes |
|------------------------------------------------|---------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| area-AssemblyLoader-coreclr | @agocke | @agocke @vitek-karas @vsadov | |
| area-AssemblyLoader-mono | @SamMonoRT | @CoffeeFlux | |
| area-AssemblyLoader-mono | @SamMonoRT | @lambdageek | |
| area-Build-mono | @steveisok | @akoeplinger | |
| area-Codeflow | @dotnet/dnr-codeflow | @dotnet/dnr-codeflow | Used for automated PR's that ingest code from other repos |
| area-Codegen-AOT-mono | @SamMonoRT | @vargaz | |
| area-CodeGen-coreclr | @JulieLeeMSFT | @BruceForstall @dotnet/jit-contrib | |
| area-Codegen-Interpreter-mono | @SamMonoRT | @BrzVlad | |
@ -79,6 +80,7 @@ Note: Editing this file doesn't update the mapping used by the `@msftbot` issue
| area-System.Diagnostics-mono | @lewing | @thaystg @radical | |
| area-System.Diagnostics.Activity | @tommcdon | @tarekgh | |
| area-System.Diagnostics.EventLog | @ericstj | @Anipik @ViktorHofer | |
| area-System.Diagnostics.Metric | @tommcdon | @noahfalk | |
| area-System.Diagnostics.PerformanceCounter | @ericstj | @Anipik @ViktorHofer | |
| area-System.Diagnostics.Process | @jeffhandley | @adamsitnik @carlossanlop @jozkee | |
| area-System.Diagnostics.Tracing | @tommcdon | @noahfalk @tommcdon @Anipik @ViktorHofer @tarekgh | Included: <ul><li>System.Diagnostics.DiagnosticSource</li><li>System.Diagnostics.TraceSource</li></ul> |
@ -105,7 +107,7 @@ Note: Editing this file doesn't update the mapping used by the `@msftbot` issue
| area-System.Numerics | @jeffhandley | @pgovind @tannergooding | |
| area-System.Numerics.Tensors | @jeffhandley | @pgovind @tannergooding | |
| area-System.Reflection | @jeffhandley | @buyaa-n @joperezr @krwq @steveharter | Consultants: @GrabYourPitchforks |
| area-System.Reflection-mono | @SamMonoRT | @lambdageek @CoffeeFlux | MonoVM-specific reflection and reflection-emit issues |
| area-System.Reflection-mono | @SamMonoRT | @lambdageek | MonoVM-specific reflection and reflection-emit issues |
| area-System.Reflection.Emit | @jeffhandley | @buyaa-n @joperezr @krwq @steveharter | Consultants: @GrabYourPitchforks |
| area-System.Reflection.Metadata | @jeffhandley | @buyaa-n @joperezr @krwq @steveharter | Consultants: @GrabYourPitchforks @tmat |
| area-System.Resources | @jeffhandley | @buyaa-n @joperezr @krwq | |
@ -136,7 +138,7 @@ Note: Editing this file doesn't update the mapping used by the `@msftbot` issue
| area-TypeSystem-coreclr | @mangod9 | @davidwrighton @MichalStrehovsky @janvorli @mangod9 | |
| area-UWP | @tommcdon | @jashook | UWP-specific issues including Microsoft.NETCore.UniversalWindowsPlatform and Microsoft.Net.UWPCoreRuntimeSdk |
| area-VM-coreclr | @mangod9 | @mangod9 | |
| area-VM-meta-mono | @SamMonoRT | @lambdageek @CoffeeFlux | |
| area-VM-meta-mono | @SamMonoRT | @lambdageek | |
## Operating Systems
@ -145,7 +147,7 @@ Note: Editing this file doesn't update the mapping used by the `@msftbot` issue
| os-alpine | | | |
| os-android | @steveisok | @akoeplinger | |
| os-freebsd | | | |
| os-mac-os-x | @steveisok | | |
| os-mac-os-x | | | |
| os-maccatalyst | @steveisok | | |
| os-ios | @steveisok | @vargaz | |
| os-tvos | @steveisok | @vargaz | |

View file

@ -14,6 +14,8 @@ In some occasions we may want to include a library in the shared framework, but
Libraries included in the shared framework should ensure all direct and transitive assembly references are also included in the shared framework. This will be validated as part of the build and errors raised if any dependencies are unsatisfied.
Source generators and analyzers can be included in the shared framework by specifying `IsNetCoreAppAnalyzer`. These projects should specify `AnalyzerLanguage` as mentioned [below](#analyzers--source-generators).
Removing a library from the shared framework is a breaking change and should be avoided.
## Transport package
@ -26,6 +28,8 @@ This package represents the set of libraries which are produced in dotnet/runtim
To add a library to the ASP.NETCore shared framework, that library should set the `IsAspNetCoreApp` property for its `ref` and `src` project. This is typically done in the library's `Directory.Build.props`, for example https://github.com/dotnet/runtime/blob/98ac23212e6017c615e7e855e676fc43c8e44cb8/src/libraries/Microsoft.Extensions.Logging.Abstractions/Directory.Build.props#L4.
Source generators and analyzers can be included in the ASP.NETCore shared framework by specifying `IsAspNetCoreAppAnalyzer`. These projects should specify `AnalyzerLanguage` as mentioned [below](#analyzers--source-generators).
Libraries included in this transport package should ensure all direct and transitive assembly references are also included in either the ASP.NETCore shared framework or the .NETCore shared framework. This is not validated in dotnet/runtime at the moment: https://github.com/dotnet/runtime/issues/52562
Removing a library from this transport package is a breaking change and should be avoided.

View file

@ -76,21 +76,25 @@ There is a relatively small number of entry-points to the loader. Although the s
There are usually many calls to the type loader during JITting. Consider:
object CreateClass()
{
```csharp
object CreateClass()
{
return new MyClass();
}
}
```
In the IL, MyClass is referred to using a metadata token. In order to generate a call to the `JIT_New` helper which takes care of the actual instantiation, the JIT will ask the type loader to load the type and return a handle to it. This handle will be then directly embedded in the JITted code as an immediate value. The fact that types and members are usually resolved and loaded at JIT time and not at run-time also explains the sometimes confusing behavior easily hit with code like this:
object CreateClass()
{
```csharp
object CreateClass()
{
try {
return new MyClass();
} catch (TypeLoadException) {
return null;
}
}
}
```
If `MyClass` fails to load, for example because it's supposed to be defined in another assembly and it was accidentally removed in the newest build, then this code will still throw `TypeLoadException`. The reason that the catch block did not catch it is that it never ran! The exception occurred during JITting and would only be catchable in the method that called `CreateClass` and caused it to be JITted. In addition, it may not be always obvious at which point the JITting is triggered due to inlining, so users should not expect and rely on deterministic behavior.
@ -153,14 +157,16 @@ both the same type.
When the type loader is asked to load a specified type, identified for example by a typedef/typeref/typespec **token** and a **Module** , it does not do all the work atomically at once. The loading is done in phases instead. The reason for this is that the type usually depends on other types and requiring it to be fully loaded before it can be referred to by other types would result in infinite recursion and deadlocks. Consider:
class A<T> : C<B<T>>
{ }
```csharp
class A<T> : C<B<T>>
{ }
class B<T> : C<A<T>>
{ }
class B<T> : C<A<T>>
{ }
class C<T>
{ }
class C<T>
{ }
```
These are valid types and apparently `A` depends on `B` and `B` depends on `A`.
@ -195,10 +201,12 @@ A placeholder to be substituted by another type; the `T` in the declaration of `
A type being substituted for a generic parameter; the `int` in `List<int>`. Note that a generic parameter can also be used as an argument. Consider:
List<T> GetList<T>()
{
```csharp
List<T> GetList<T>()
{
return new List<T>();
}
}
```
The method has one generic parameter `T` which is used as a generic argument for the generic list class.
@ -209,28 +217,38 @@ An optional requirement placed by generic parameters on its potential generic ar
1. Special constraints
- Reference type constraint - the generic argument must be a reference type (as opposed to a value type). The `class` keyword is used in C# to express this constraint.
```csharp
public class A<T> where T : class
```
- Value type constraint - the generic argument must be a value type different from `System.Nullable<T>`. C# uses the `struct` keyword.
```csharp
public class A<T> where T : struct
```
- Default constructor constraint - the generic argument must have a public parameterless constructor. This is expressed by `new()` in C#.
```csharp
public class A<T> where T : new()
```
2. Base type constraints - the generic argument must be derived from
(or directly be of) the given non-interface type. It obviously makes
sense to use only zero or one reference type as a base types
constraint.
```csharp
public class A<T> where T : EventArgs
```
3. Implemented interface constraints - the generic argument must
implement (or directly be of) the given interface type. Zero or more
interfaces can be given.
```csharp
public class A<T> where T : ICloneable, IComparable<T>
```
The above constraints are combined with an implicit AND, i.e. a
generic parameter can be constrained to be derived from a given type,
@ -239,11 +257,13 @@ generic parameters of the declaring type can be used to express the
constraints, introducing interdependencies among the parameters. For
example:
public class A<S, T, U>
```csharp
public class A<S, T, U>
where S : T
where T : IList<U> {
void f<V>(V v) where V : S {}
}
}
```
**Instantiation**
@ -259,7 +279,9 @@ declared. There exists exactly one typical instantiation for each
generic type and method. Usually when one talks about an open generic
type, they have the typical instantiation in mind. Example:
public class A<S, T, U> {}
```csharp
public class A<S, T, U> {}
```
The C# `typeof(A<,,>)` compiles to ldtoken A\'3 which makes the
runtime load ``A`3`` instantiated at `S` , `T` , `U`.

View file

@ -0,0 +1,310 @@
- [Background](#background)
- [Register selection heuristics](#register-selection-heuristics)
- [Impact measurement](#impact-measurement)
- [Genetic Algorithm](#genetic-algorithm)
- [Experiments](#experiments)
* [Setup](#setup)
* [Outcome](#outcome)
- [Conclusion](#conclusion)
## Background
RyuJIT's implements [linear scan register allocation](https://en.wikipedia.org/wiki/Register_allocation#Linear_scan) (LSRA) algorithm to perform the register assignment of generated code. During register selection, LSRA has various heuristics (17 to be precise) to pick the best register candidate at a given point. Each register candidate falls in one of the two categories. Either they do not contain any variable value and so are "free" to get assigned to hold a variable value. Otherwise, they already hold some variable value and hence, are "busy". If one of the busy registers is selected during assignment, the value it currently holds needs to be first stored into memory (also called "spilling the variable") before they are assigned to something else. RyuJIT's LSRA has the heuristics (14 of them) to pick one of the free registers first, and if none found, has heuristics (4 of them) to select one of the busy registers. Busy register is selected depending on which register is cheaper to spill.
We noticed that it is not always beneficial to give preference to free register candidates during register selection. Sometimes, it is better to pick a busy register and retain the free register for the future reference points that are part of hot code path. See [the generated code](https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AXEBDAzgWwB8ABABgAJiBGAOgCUBXAOwwEt8YaBhCfAB1YAbGFADKIgG6swMXAG4AsAChlxAMyUATOS7kA3svJHyygNoBZGBgAWEACYBJfoIAUlm/ad9BAeT5sIJlwaADkIByZBViZogHMASgBdVSokcmiMcgBxKzpsJjteF3j9ZQBIYgB2clJFJQBfZTN3W0dnNytWr19/VkDgsIiomKYE5KVqNOIUcgAFKAyXDPIEEoMlMoB6TcoqAE4XVbrGlQnUyhnRbGcYAEFi0o2JbChybHIAXmzc/ML8YrqZWer2An2+GDyBSK8UBwPIYDBOQhv2hsJe5DsiJ+UP+MPKcJgWOROIB+PRADMiZC/qSnujYlSUbi0a9rIySXiNuToOQXHCEGDaityAAechUUhCgDUUtWjzKQPRCHeXyR1NR5UVrwQoNV2JpnIV/IReuJBsBWpWmNN6uZmv5hJtTNpRqVlKdHIt80WysNZW9LEOwD9AYwhzAIYWgYQdkjPpgcej5MNJ39UbD2ENoZcwcB2YjefTLljhcWCdLgeTFbDCWrLmsnJO9SAA===) taken from [dotnet/runtime Issue#8846](https://github.com/dotnet/runtime/issues/8846). In this example, free registers are allocated to the variables that are out of the for-loop. During the register assignment for variables inside the loop, no free registers are available, and the algorithm spills a busy register to store their value. Astonishingly, it picks the same register for all the variables inside the loop and spill the previous variable values repeatedly. Our understanding is that it happens because of the ordering of heuristics in which we perform register selection. Perhaps, instead of having a fixed heuristics order, we should tweak the order to *sometimes* select busy registers first, before selecting from the pool of free registers. That was the inception of the idea of tuning the register selection heuristics described in [dotnet/runtime Issue# 43318](https://github.com/dotnet/runtime/issues/43318) and we wanted to conduct experiments to understand if we can do better register selection using different criteria. In this document, we will go over in detail to understand what made us pick genetic algorithm to do this experiment and what were the outcome of it.
## Register selection heuristics
Below are the heuristics implemented in RyuJIT to select a register:
| Shorthand | Name | Description |
|-----------|----------------------|---------------------------------------------------------------------------------------------------------|
| A | `FREE` | Not currently assigned to an *active* interval. |
| B | `CONST_AVAILABLE` | A constant value that is already available in a register. |
| C | `THIS_ASSIGNED` | Register already assigned to the current interval. |
| D | `COVERS` | Covers the interval's current lifetime. |
| E | `OWN_PREFERENCE` | Set of preferred registers of current interval. |
| F | `COVERS_RELATED` | Set of preferred registers of interval that is related to the current interval and covers the lifetime. |
| G | `RELATED_PREFERENCE` | Set of preferred registers of interval that is related to the current interval. |
| H | `CALLER_CALLEE` | Caller or callee-saved registers. |
| I | `UNASSIGNED` | Not currently assigned to any active or inactive interval. |
| J | `COVERS_FULL` | Covers the interval's current lifetime until the end. |
| K | `BEST_FIT` | Available range is the closest match to the full range of the interval |
| L | `IS_PREV_REG` | Register was previously assigned to the current interval |
| M | `REG_ORDER` | Tie-breaker. Just pick the 1st available "free" register. |
| N | `SPILL_COST` | Lowest spill cost of all the candidates. |
| O | `FAR_NEXT_REF` | It has farther next reference than the best candidate so far. |
| P | `PREV_REG_OPT` | The previous reference of the current assigned interval was optional. |
| Q | `REG_NUM` | Tie-breaker. Just pick the 1st available "busy" register. |
Heuristic `A` thru `M` are for selecting one of the free registers, while `N` thru `Q` are for selecting one of the busy registers. A simple demonstration of how heuristic selection worked earlier is shown below. We start with free candidates and for each heuristic, narrow those candidates. Whenever, we see that there are more than one registers to pick from, we keep trying heuristics (in the above order) until a point when there is just one register left. If we don't find any register, we continue our search using heuristic `N` to find one of the busy registers that can be spilled.
```c#
registerCandidates = 0; // bit-mask of all registers
LinearScan::allocateReg(RefPostion refPosition, Inteval* interval)
{
bool found = false;
registerCandidates = allFreeCandidates();
if (!found) {
found = applyHeuristics(FREE, FREE_Candidates());
}
if (!found) {
found = applyHeuristics(CONST_AVAILABLE_Candidates());
}
...
if (!found) {
found = applyHeuristics(REG_ORDER_Candidates());
}
// No free register was available, try to select one of
// the busy register
registerCandidates = allBusyCandidates();
if (!found) {
found = applyHeuristics(SPILL_COST_Candidates());
}
if (!found) {
found = applyHeuristics(FAR_NEXT_REF_Candidates());
}
...
}
// Filters the register candidates and returns true only there
// is one candidate.
bool applyHeuristics(selected_candidates)
{
filtered_candidates = registerCandidates & selected_candidates;
if (filtered_candidates != 0) {
registerCandidates = filtered_candidates;
return isSingleRegister(registerCandidates);
}
return false;
}
```
If we wanted to change the order of heuristics, we would have to update above code to rearrange the portion of heuristics we apply. To experiment with different heuristics ordering, it is not feasible to do such refactoring for every combination. After doing some research on which design pattern to pick for such problems, we went the old school way and moved the individual heuristics code in its own method (marked with `__forceinline`, to eliminate the throughput impact of refactoring changes). We could use function pointer to invoke one of these methods in any order we wanted. The last bit was an ability to add a way for user to specify heuristic order they want to try. We assigned a single letter to each heuristic (`Shorthand` column in above table) and we exposed `COMPlus_JitLsraOrdering` environment variable to specify the ordering. The default ordering is `"ABCDEFGHIJKLMNOPQ"` (the current order), but if given something else like `"PEHDCGAIJNLKOBFMQ"`, it would apply heuristic in that order. In this example, heuristic corresponding to `P` is `PREV_REG_OPT` and thus would apply busy register heuristics first, followed by `OWN_PREFERENCE`, `CALLER_CALLEE` and so forth. As you notice, now we will be able to apply the busy register heuristics before applying the ones for free registers.
After stitching all this together, the refactored code looked like this:
```c#
typedef void (RegisterSelection::*HeuristicFn)();
HashTable<char, HeuristicFn> ScoreMappingTable = {
{'A', try_FREE},
{'B', try_CONST_AVAILABLE},
...
{'Q', try_REG_NUM}
};
LinearScan::allocateReg(RefPostion refPosition, Inteval* interval)
{
char *ordering = Read_COMPlus_LsraOrdering();
HeuristicFn fn;
for (char order in ordering) {
if (ScoreMappingTable->Lookup(order, &fn)) {
bool found = (this->*fn)();
if (found) {
break;
}
}
}
}
bool LinearScan::try_FREE() {
...
return applyHeuristics();
}
...
bool LinearScan::try_CONST_AVAILABLE() {
...
return applyHeuristics();
}
...
bool LinearScan::try_REG_NUM() {
...
return applyHeuristics();
}
```
[dotnet/runtime #52832](https://github.com/dotnet/runtime/pull/52832) contains all the refactoring changes that are described above.
## Impact measurement
Now that rearranging the heuristic ordering is possible with `COMPlus_JitLsraOrdering`, we decided to measure the impact of the reordering by running [superpmi](https://github.com/dotnet/runtime/blob/e063533eb79eace045f43b41980cbed21c8d7365/src/coreclr/ToolBox/superpmi/readme.md) tool. `superpmi` tool JITs all the methods of a given assembly file (`*.dll` or `*.exe`) without executing the generated machine code. Given two versions of `clrjit.dll` (RyuJIT binary), it also has an ability to perform the comparison of generated code and reporting back the number of methods that got improved/regressed in terms of `CodeSize` (machine code size), `PerfScore` (instruction latency/throughput measurements), `InstructionCount` (number of instructions present), etc. We picked `PerfScore` metrics because that accurately includes the cost of register spilling. If LSRA doesn't come up with optimal register choice, we would see several `mov` instructions that load/store into memory and that would decrease the throughput, increase the latency, and hence lower the `PerfScore`. If the spilling happens inside a loop, `PerfScore` metrics accounts for that by considering the product of loop block weights and `PerfScore`. Thus, our goal would be to reduce the `PerfScore` as much possible, lower the `PerfScore`, better is the code we generated. The baseline for the comparison was the default ordering, and we wanted to compare it with an ordering specified in `COMPlus_JitLsraOrdering`. We could specify any combination of sequence `A` thru `Q` and tweak the LSRA algorithm to apply a different heuristics order. But since there are 17 heuristics, there would be **355,687,428,096,000** (17!) possibilities to try out and it will not be practical to do so. We ought to find a better way!
## Genetic Algorithm
[Genetic algorithm](https://en.wikipedia.org/wiki/Genetic_algorithm) is the perfect solution to solve these kind of problems. For those who are not familiar, here is a quick summary - The algorithm starts with a community that has few candidates whose fitness score is predetermined. Each candidate is made up of sequence of genes and all candidates have same number of genes in them. The algorithm picks a pair of fit candidates (parents) and mutate their genes to produce offsprings. The algorithm calculates the fitness of the new offsprings and add them (along with the fitness score) back to the community pool. As the community evolves, more and more candidates who has fitness score equivalent or better than the initial population are added to the community. Of course, the community cannot grow infinitely, so the least fit candidates die. When there are no more candidates that are fit than the fittest candidate, the algorithm stops, giving us a set of fit candidates.
This can be perfectly mapped to the heuristic selection ordering problem. We want to start with `"ABCDEFGHIJKLMNOPQ"` (default selection order) and each letter in this combination can be represented as a gene. Genetic algorithm would mutate the gene to produce a different order say `"ABMCDEFGHIKLNJOPQ"` and we will set that value in `COMPlus_JitLsraOrdering` variable. We would then run `superpmi.py` to produce the generated code and compare the `PerfScore` with that of the one produced by the default order. `PerfScore` represents the fitness, lower the value of that metric, more fit is the corresponding candidate, in our case, better is the heuristic ordering.
Below is the pseudo code of genetic algorithm that we experimented with to find optimal heuristic ordering.
```c#
// Maximum population per generation
int MaxPopulation = 100;
HashMap<string, float> Community = new HashMap<string, float>();
HashMap<string, float> NextGen = new HashMap<string, float>();
void GeneticAlgorithm() {
PopulateCommunity();
do {
// new generation
NextGen = new HashMap<string, float>();
candidateCount = 0;
while(candidateCount++ < MaxPopulation) {
// Use tournament selection method to pick
// 2 candidates from "Community".
// https://en.wikipedia.org/wiki/Tournament_selection
(parent1, parent2) = DoSelection();
// Mutate genes of parent1 and parent2 to produce
// 2 offsprings
(offspring0, offspring1) = MutateGenes(parent1, parent2)
// Add offsprings to the community
AddNewOffspring(offspring0)
AddNewOffspring(offspring1)
}
Community = NextGen;
// Loop until there are unique candidates are being produced in the
// community
} while (uniqueCandidates);
}
// Populate the community with random candidates
void PopulateCommunity() {
candidateCount = 0;
while(candidateCount < MaxPopulation) {
newCandidate = GetRandomCombination("ABCDEFGHIJKLMNOPQ")
AddNewOffspring(newCandidate)
}
}
// Trigger superpmi tool and read back the PerfScore
void ComputeFitness(candidate) {
perfScore = exec("superpmi.py asmdiffs -base_jit_path default\clrjit.dll -diff_jit_path other\clrjit.dll -diff_jit_option JitLsraOrdering=" + candidate)
return perfScore
}
// Compuate fitness for both offsprings
// and add them to the community
void AddNewOffspring(candidate) {
Community[candidate] = ComputeFitness(candidate)
// Evict less fit candidate
if (Community.Count > MaxPopulation) {
weakCandidate = CandidateWithHighestPerfScore(Community);
Community.Remove(weakCandidate)
}
}
// Perform crossover and mutation techniques
void MutateGenes(offspring0, offspring1) {
assert(offspring0.Length == offspring1.Length)
// crossover
crossOverPoint = random(0, offspring0.Length)
i = 0
while (i++ < crossOverPoint) {
char c = offspring0[i]
offspring0[i] = offspring1[i]
offspring1[i] = c
}
// mutation
randomIndex = random(0, offspring0.Length)
char c = offspring0[randomIndex]
offspring0[randomIndex] = offspring1[randomIndex]
offspring1[randomIndex] = c
return offspring0, offspring1
}
```
With genetic algorithm in place, we were ready to perform some experiments to find an optimal heuristic order.
## Experiments
With `superpmi`, we have an ability to run JIT against all the methods present in .NET libraries and [Microbenchmarks](https://github.com/dotnet/performance/tree/main/src/Benchmarks/micro). We also need to conduct this experiment for all OS/architecture that we support - Windows/x64, Windows/arm64, Linux/x64, Linux/arm and Linux/arm64.
### Setup
To conduct experiments, we made few changes to the way superpmi gathers `PerfScore` and reports it back.
1. `superpmi.exe` was modified to aggregate **relative** `PerfScore` difference of code generated by default and modified LSRA ordering. When `superpmi.exe` is run in parallel (which is by default), this number was reported back on the console by each parallel process.
2. `superpmi.py` was modified to further aggregate the relative `PerfScore` differences of parallel `superpmi.exe` processes and report back the final relative `PerfScore` difference.
3. LSRA has many asserts throughout the codebase. They assume that during register selection, all the free registers are tried first before checking for busy registers. Since we wanted to understand the impact of preferring busy registers as well, we had to disable those asserts.
4. `superpmi.exe asmdiffs` takes two versions of `clrjit.dll` that you want to compare. Both must be from different location. In our case, we only wanted to experiment with different heuristic ordering by passing different values for `COMPlus_JitLsraOrdering`, we made a copy of `clrjit.dll` -> `copy_clrjit.dll` and passed various ordering to the copied `copy_clrjit.dll`.
Here is the sample invocation of `superpmi.py` that genetic algorithm invoked to get the `PerfScore` (fitness score) of each experimented ordering:
```
python superpmi.py asmdiffs -f benchmarks -base_jit_path clrjit.dll -diff_jit_path copy_clrjit.dll -target_os windows -target_arch x64 -error_limit 10 -diff_jit_option JitLsraOrdering=APCDEGHNIOFJKLBMQ -log_file benchmarks_APCDEGHNIOFJKLBMQ.log
```
All the above changes are in the private branch [lsra-refactoring branch](https://github.com/kunalspathak/runtime/tree/lsra-refactoring).
### Outcome
Below are the heuristic ordering that genetic algorithm came up with for different configuration (scenarios/OS/architectures). The `PerfScore` column represent the aggregate of relative difference of `PerfScore` of all the methods. We preferred relative difference rather than absolute difference of `PerfScore` because we didn't want a dominant method's numbers hide the impact of other smaller methods.
| Configuration | Ordering | PerfScore |
|-------------------------|--------------------|-------------|
| windows-x64 Benchmarks | `EHPDGAJCBNKOLFIMQ` | -36.540712 |
| windows-x64 Libraries | `PEHDCGAIJNLKOBFMQ` | -271.749901 |
| windows-x86 Benchmarks | `EHDCFPGJBIALNOKMQ` | -73.004577 |
| windows-x86 Libraries | `APCDEGHNIOFJKLBMQ` | -168.335079 |
| Linux-x64 Benchmarks | `HGIDJNLCPOBKAEFMQ` | -96.966704 |
| Linux-x64 Libraries | `HDGAECNIPLBOFKJMQ` | -391.835935 |
| Linux-arm64 Libraries | `HECDBFGIANLOKJMPQ` | -249.900161 |
As seen from the table, there are lot of better ordering than the default `"ABCDEFGHIJKLMNOPQ"`, which if used, can give us better register selection and hence, better performance. But we can also see that not all ordering that genetic algorithm came up with are same for all configurations. We wanted to find a common and similar ordering that can benefit all the scenarios across multiple platforms. As a last step of experiment, we tried to apply each of the best ordering that we had to other configurations and see how they perform. For example, `"EHPDGAJCBNKOLFIMQ"` is the most optimal ordering for windows/x64/Benchmarks configuration and we wanted to evaluate if that ordering could also be beneficial to Linux/arm64/Libraries. Likewise, for `"PEHDCGAIJNLKOBFMQ"` (optimal ordering for windows/x64/Libraries) and so forth.
Below table shows the compiled data of `PerfScore` that we get when we applied best ordering of individual configuration to other configurations. Each row contains a configuration along with the optimal ordering that genetic algorithm came up with. The columns represent the `PerfScore` we get if we apply the optimal ordering to the configuration listed in the column title.
| Configuration | Optimal Ordering | Linux-x64 Benchmarks | windows-x64 Benchmarks | windows-arm64 Benchmarks | Linux-x64 Libraries | Linux-arm64 Libraries | windows-x64 Libraries | windows-arm64 Libraries.pmi | windows-x86 Benchmarks | Linux-arm Libraries | windows-x86 Libraries |
|------------------------|-------------------|-----------------------|------------------------|--------------------------|-----------------------|-----------------------|-----------------------|-----------------------------|------------------------|-----------------------|-----------------------|
| windows-x64 Benchmarks | `EHPDGAJCBNKOLFIMQ` | -83.496405 | **-36.540712** | -19.09969 | -340.009195 | -103.340802 | -265.397122 | -113.718544 | -62.126579 | 11292.33497 | 18.510854 |
| windows-x64 Libraries | `PEHDCGAIJNLKOBFMQ` | -85.572973 | -35.853492 | -19.07247 | -355.615641 | -103.028599 | **-271.749901** | -114.1154 | -70.087852 | 31974.87698 | -46.803569 |
| windows-x86 Benchmarks | `EHDCFPGJBIALNOKMQ` | **-101.903471** | -19.844343 | -41.041839 | **-419.933377** | -247.95955 | -179.127655 | -265.675453 | **-73.004577** | 10679.36843 | -136.780091 |
| windows-x86 Libraries | `APCDEGHNIOFJKLBMQ` | -26.907257 | -0.284718 | -30.144657 | -164.340576 | -220.351459 | -73.413256 | -232.256476 | -10.25733 | 31979.07983 | **-168.335079** |
| linux-x64 Benchmarks | `HGIDJNLCPOBKAEFMQ` | -96.966704 | -9.29483 | -50.215283 | -361.159848 | -221.622609 | -64.308995 | -244.127555 | 13.188704 | 8392.714652 | 397.994465 |
| linux-x64 Libraries | `HDGAECNIPLBOFKJMQ` | -97.682606 | -13.882952 | -51.929281 | -391.835935 | -240.63813 | -101.495244 | -262.746033 | -22.621316 | 8456.327283 | 165.982045 |
| linux-arm64 Libraries | `HECDBFGIANLOKJMPQ` | -97.259922 | -11.159774 | **-54.424627** | -330.340402 | **-249.900161** | -52.359275 | **-270.482763** | -35.304525 | **2404.874376** | 125.707741 |
| | Max PerfScore | **`EHDCFPGJBIALNOKMQ`** | **`EHPDGAJCBNKOLFIMQ`** | **`HECDBFGIANLOKJMPQ`** | **`HDGAECNIPLBOFKJMQ`** | **`HECDBFGIANLOKJMPQ`** | **`PEHDCGAIJNLKOBFMQ`** | **`HECDBFGIANLOKJMPQ`** | **`EHDCFPGJBIALNOKMQ`** | **`HECDBFGIANLOKJMPQ`** | **`APCDEGHNIOFJKLBMQ`** |
The last row in the above table tells the best ordering for the configuration (of that column) out of optimal orderings of all configurations. Below table summarizes 1st and 2nd best ordering for individual configuration.
| Configuration | 1st best | 2nd best |
|--------------------------|----------------------|----------------------|
| windows-x64 Benchmarks | `EHPDGAJCBNKOLFIMQ` | `PEHDCGAIJNLKOBFMQ` |
| windows-x64 Libraries | `PEHDCGAIJNLKOBFMQ` | `EHPDGAJCBNKOLFIMQ` |
| windows-x86 Benchmarks | `EHDCFPGJBIALNOKMQ` | `PEHDCGAIJNLKOBFMQ` |
| windows-x86 Libraries | `APCDEGHNIOFJKLBMQ` | `EHDCFPGJBIALNOKMQ` |
| windows-arm64 Benchmarks | `HECDBFGIANLOKJMPQ` | `HDGAECNIPLBOFKJMQ` |
| windows-arm64 Libraries | `HECDBFGIANLOKJMPQ` | `EHDCFPGJBIALNOKMQ` |
If we see the pattern under the "1st best" column, we see that the sequence `E` and `H` are towards the beginning, meaning that overall, it is profitable to have `OWN_PREFERENCE` (one of the preferred registers for a given interval) or `CALLEE_CALLER` (caller and callee registers) as one of the first heuristic criteria. Next, most of the ordering has `C` and `D` that are also popular that maps to `THIS_ASSIGNED` (already assigned to the current interval) and `COVERS` (covers the lifetime of an interval). One of the busy register heuristics `P` that maps to `PREV_REG_OPT` (Previous reference of the currently assigned interval was optional) is also present at the beginning.
While these ordering gives good `PerfScore`, there were several regressions observed for other methods. Most of the regressions falls under one or more of the following categories:
1. There are some key challenges in LSRA's resolution phase highlighted in [dotnet/runtime #47194](https://github.com/dotnet/runtime/issues/47194). Once resolution moves are identified for all the blocks, there is a need to revisit those moves to see if there are some that can be optimized out. Several methods regressed their `PerfScore` because we added lot of resolution moves at block boundaries.
2. Even though there is a flexibility of trying different register selection ordering, LSRA has limited knowledge about the method and portion of code for which it is allocating register. For example, during allocation, it doesn't know if it is allocating for code inside loop and that it should keep spare registers to use in that code. There has to be a phase before LSRA that consolidates this information in a data structure that can be used by LSRA during register selection.
3. While doing the experiments, we realized other low hanging fruits in LSRA that amplifies the regression caused by reordering the register selection heuristics. For example, if a variable is defined just once, it can be spilled at the place where it is defined and then, it doesn't need to be spilled throughout the method. This was achieved in [dotnet/runtime #54345](https://github.com/dotnet/runtime/pull/54345).
## Conclusion
Register allocation is a complex topic, slight change in algorithm could have huge impact on the generated code. We explored various ideas for finding optimal heuristic selection ordering. Using Genetic algorithm, we could find optimal ordering and there was also some commonality in the heuristics order that was performance efficient for majority of configuration that we tested. However, with many improvements, there were also regressions in many methods across all configurations. We discovered that there was other area of improvements that need to be fixed first before we enable heuristic tuning feature, [[RyuJIT][LSRA]](https://github.com/dotnet/runtime/issues?q=is%3Aissue+is%3Aopen+%22%5BRyuJIT%5D%5BLSRA%5D%22+) captures some of the issues. Hence, we decided not to change any heuristic ordering at the current time. We will focus on fixing these issues first and once the existing LSRA weakness are addressed, we can choose to return to this experiment and use the techniques, tools, and knowledge here to inform a heuristic re-ordering. Going forward, we could also auto tune the heuristic ordering based on various factors like how many method parameters are present, if loops are present or not, exception handling, etc. Opportunities are endless, time is limited, so got to make better choices!

View file

@ -0,0 +1,97 @@
# Cross DAC Notes
The `crossdac` is a cross-compiled DAC. It is compiled to execute on one platform, but debug a target of a different architecture.
Our current crossdacs are all:
- compiled to run on Windows
- Same bitness. (Target and host have the same number of bits.
- target a *nix variant
The crossdac allow us to use Windows debugging tools to debug dumps from *nix processes.
## Design
### Limitations
- To avoid solving remoting and synchronization issues, the crossdac will not support live processes. Only dump debugging is supported.
- Similar to the DAC, each cross DAC must match its runtime. The DACs are indexed on a symbol server to allow the debuggers to get these as needed.
### Conditional Code Selection
This is a simple cross compilation of the DAC, `C++` code. This mean the `HOST_*` and the `TARGET_*` are configured differently. In this context:
- `HOST` refers to the architecture of the platform that is running the debugger.
- `TARGET` refers to the platform that generated the code dump.
In general, most code should be conditioned on `TARGET_*` variables. This is because in general we want the `DAC` to behave identically when cross compiled.
Code must be conditioned on `HOST` when it refers to host needed services. These have typically been thing like file i/o and memory allocation.
Initial implementation allowed the compiler to find most of these. The strategy was to assume all code should be conditioned on `TARGET` and let the compiler gripe.
### Type Layout
The DAC is essentially a memory parsing tool with supporting functionality. The layout of types in the DAC must match the layout of types in the runtime.
The `C++` standard is not explicit about all layout rules of data structures. Due to its historical evolution from `C`, most structures are arranged in an intuitive easily understood fashion. Newer and more exotic structures are less consistent.
Experimentation has shown that layout varies in inheritance cases. The DAC does not support general multiple inheritance, so that simplifies things. It does support multiple inheritance with the empty base classes.
These cases have proven to be problematic:
- Classes with empty base classes. (I the only issue is with multiple base classes.)
- By default `gcc` use an empty base class optimization to eliminate the 1 byte of space these empty base classes normally consume (alone).
- By default `Windows` compilers do not do this optimization. This is to preserve backward binary compatibility.
- The Windows compilers allow this optimization to be enabled. Our code uses `EMPTY_BASES_DECL` to enable this optimization. It has to be applied to every structure that has multiple base classes or derives from a such a structure. See `__declspec(empty_bases)`.
- Packing of the first member of the derived class. In the case where the base class ended with padding:
- `gcc` compilers reuse the padding for the first member of the derived class. This effectively removes the padding of the base class in the derived class.
- Windows compilers do not remove this padding.
- Our code uses the `DAC_ALIGNAS(a)` macro before the first element of the derived class to force the `gcc` compiler to align that member and keep the base classes padding.
- The `a` parameter is preferentially the base classes typename.
- However, in some cases the compiler will not allow this due to some circular layout issues it causes. In these cases, `a` can refer to a well known type instead. I prefer `int64_t`, `int32_t`, `size_t` ...
#### DacCompareNativeTypes Usage
I wrote and used [DacCompareNativeTypes](https://github.com/dotnet/diagnostics/tree/main/src/tests/DacCompareNativeTypes), to locate and identify type layout issues.
The tool is a bit crude, but it helped get the job done.
The `libcoreclr.so` has a lot of symbols. This proved very slow. So to expedite things, I compared the `dac` and later the `dbi` libraries for structure layout. This had the advantage of eliminating irrelevant data structures.
The compilers generate different debug data and different hidden data structures. The tool tries to overlook these. Be aware that not all differences are real. Some data structures are host only so these are expected to be different.
I usually ran the tool in a debugger so that I could look at other available meta-data the tool keeps. i.e. source file and line number.
### Missing/Different types
There are some cases where types are defined by the Target. These types maybe missing or different on the Host. In these cases we define the cross compilation types in `src/coreclr/inc/crosscomp.h`.
See `T_CRITICAL_SECTION` for a key example. In this case both host and target supported critical sections, but we needed to correctly map the target data structures. So we needed a type defined which was the TARGET's `CRITICAL_SECTION`.
So the Target's definition was made available for the cross compile. Additionally the macro was created to make sure references which required the Target's definition could be separated from ones which might need the host's definition.
There is also some defensive programming to make sure these structures accurate. See `T_CRITICAL_SECTION_VALIDATION_MESSAGE` for one example.
### Out of Process Unwinding
To fully support native stack processing, we needed a Target unwinder. For this `libunwind` was also cross-compiled.
See [CMake cross libunwind](https://github.com/dotnet/runtime/blob/0049c629381c5a18e4dadd1038c2bd6b3ae6e3e6/src/coreclr/CMakeLists.txt#L113)
### DBI
I use the term `DAC` in this document to refer to both the `DAC` and the `DBI` debug interface. Both were actually cross compiled. Be aware.
### Build entry point
The main build systme change is adding the ability to set the Target OS on a Windows build.
- See [build-runtime.cmd changes](https://github.com/dotnet/runtime/blob/0049c629381c5a18e4dadd1038c2bd6b3ae6e3e6/src/coreclr/build-runtime.cmd#L133-L134)
- See [Subsets.props](https://github.com/dotnet/runtime/blob/0049c629381c5a18e4dadd1038c2bd6b3ae6e3e6/eng/Subsets.props#L191-L197)
There are also changes to the official build to set these flags package the results and upload to the symbol server.
### Client changes
Various changes were required in the DAC clients to consume the new crossdac. These are really out of the scope of this document.

View file

@ -99,19 +99,23 @@ certain tailcalls to generic methods.
The second IL stub extracts the arguments and calls the target function. For the
above case a function like the following will be generated:
```csharp
void IL_STUB_CallTailCallTarget(IntPtr argBuffer, IntPtr result, IntPtr* retAddr)
void IL_STUB_CallTailCallTarget(IntPtr argBuffer, IntPtr result, PortableTailCallFrame* pFrame)
{
int arg1 = *(int*)argBuffer;
RuntimeHelpers.FreeTailCallArgBuffer();
*retAddr = StubHelpers.NextCallReturnAddress();
pFrame->NextCall = null;
pFrame->TailCallAwareReturnAddress = StubHelpers.NextCallReturnAddress();
int arg1 = *(int*)(argBuffer + 4);
*argBuffer = TAILCALLARGBUFFER_ABANDONED;
*(bool*)result = IsOdd(arg1);
}
```
It matches the function above but also includes a call to
`StubHelpers.NextCallReturnAddress`. This is a JIT intrinsic that represents the
address of where the next call will return to. This is part of how the mechanism
detects that there is a previous dispatcher that should be used, which will be
described in the next section.
It matches the function above by loading the argument that was written, and
then writing a sentinel value that communicates to GC that the arg buffer does
not need to be scanned anymore, to avoid extending the lifetime of (by-)refs
unnecessarily. In addition, it also includes a call to
`StubHelpers.NextCallReturnAddress`. This is a JIT intrinsic that represents
the address of where the next call will return to. This is part of how the
mechanism detects that there is a previous dispatcher that should be used,
which will be described in the next section.
As described above there are cases when the runtime needs to be passed the
target function pointer. In those cases this stub will instead load the function
@ -128,16 +132,14 @@ to be set up again since returning would not return directly back to the
previous dispatcher.
The mechanism uses some data structures to describe the dispatchers that are
currently live on the stack and to facilitate detection of previous dispatchers.
The dispatchers themselves are described by a linked list of
`PortableTailCallFrame` entries. These entries are in a one-to-one
correspondence with each live instance of the dispatcher in the current stack.
This structure looks like the following:
currently live on the stack and to facilitate detection of previous
dispatchers. The dispatchers themselves are described by a series of
`PortableTailCallFrame` entries. These entries are stored on the stack in each
live instance of the dispatcher. This structure looks like the following:
```csharp
struct PortableTailCallFrame
{
public PortableTailCallFrame* Prev;
public IntPtr TailCallAwareReturnAddress;
public IntPtr NextCall;
}
@ -147,8 +149,8 @@ Here the `TailCallAwareReturnAddress` is an address that can be used to detect
whether a return would go to that particular dispatcher. `NextCall` is what the
dispatcher uses to perform the next tailcall of a sequence.
The head of this linked list is stored in TLS, along with information about the
currently allocated argument buffer that can be used by GC:
The current frame is stored in TLS along with information about the currently
allocated argument buffer that can be used by GC:
```csharp
struct TailCallTls
@ -162,35 +164,44 @@ struct TailCallTls
Finally, the dispatcher follows:
```csharp
void DispatchTailCalls(IntPtr callTarget, IntPtr result, IntPtr callersRetAddrSlot)
private static unsafe void DispatchTailCalls(
IntPtr callersRetAddrSlot,
delegate*<IntPtr, IntPtr, PortableTailCallFrame*, void> callTarget,
IntPtr retVal)
{
IntPtr callersRetAddr;
TailCallTls* tls =
RuntimeHelpers.GetTailCallInfo(callersRetAddrSlot, &callersRetAddr);
TailCallFrame* prevDispatcher = tls->Frame;
if (callersRetAddr == prevDispatcher->TailCallAwareReturnAddress)
TailCallTls* tls = GetTailCallInfo(callersRetAddrSlot, &callersRetAddr);
PortableTailCallFrame* prevFrame = tls->Frame;
if (callersRetAddr == prevFrame->TailCallAwareReturnAddress)
{
prevDispatcher->NextCall = callTarget;
prevFrame->NextCall = callTarget;
return;
}
PortableTailCallFrame frame;
frame.Prev = prevDispatcher;
PortableTailCallFrame newFrame;
// GC uses NextCall to keep LoaderAllocator alive after we link it below,
// so we must null it out before that.
newFrame.NextCall = null;
try
{
tls->Frame = &frame;
tls->Frame = &newFrame;
do
{
frame.NextCall = IntPtr.Zero;
var fptr = (func* void(IntPtr, IntPtr, IntPtr*))callTarget;
fptr(tls->ArgBuffer, result, &frame.TailCallAwareReturnAddress);
callTarget = frame.NextCall;
} while (frame.NextCall != IntPtr.Zero);
callTarget(tls->ArgBuffer, retVal, &newFrame);
callTarget = newFrame.NextCall;
} while (callTarget != null);
}
finally
{
tls->Frame = prevDispatcher;
tls->Frame = prevFrame;
// If the arg buffer is reporting inst argument, it is safe to abandon it now
if (tls->ArgBuffer != IntPtr.Zero && *(int*)tls->ArgBuffer == 1 /* TAILCALLARGBUFFER_INSTARG_ONLY */)
{
*(int*)tls->ArgBuffer = 2 /* TAILCALLARGBUFFER_ABANDONED */;
}
}
}
```
@ -198,16 +209,16 @@ void DispatchTailCalls(IntPtr callTarget, IntPtr result, IntPtr callersRetAddrSl
It is first responsible for detecting whether we can return and let a previous
dispatcher perform the tailcall. To do this it needs to obtain the caller's
return address (i.e. an address in the caller's caller). Furthermode, it needs
to obtain information about the linked list of dispatcher frames. Due to return
address hijacking in the VM it is not enough to simply read the return address
directly from the stack -- instead, assistance from the VM is required in the
form of a helper. This helper both returns the TLS information and the correct
return address.
to obtain information about the current, existing dispatcher frame. Due to
return address hijacking in the VM it is not enough to simply read the return
address directly from the stack -- instead, assistance from the VM is required
in the form of a helper. This helper both returns the TLS information and the
correct return address.
In the case a return would go back to a dispatcher we simply record the next
call by saving the `callTarget` parameter, a function pointer to a
`CallTailCallTarget` stub. Otherwise a new entry in the linked list is set up
and a loop is entered that starts dispatching tailcalls.
`CallTailCallTarget` stub. Otherwise the new dispatcher is recorded and a loop
is entered that starts dispatching tailcalls.
This loop calls into the `CallTailCallTarget` stubs so it is from these stubs
that we need to store the return address for comparisons in the future. These
@ -217,6 +228,12 @@ whether we can use a previous dispatcher. This will be the case when we return
directly to a `CallTailCallTarget` stub which will then return to the
dispatcher.
Note that we take care to zero out PortableTailCallFrame.NextCall from the
CallTailCallTarget stub instead of doing it in the dispatcher before calling
the stub. This is because GC will use NextCall to keep collectible assemblies
alive in the event that there is a GC inside the dispatcher. Once control has
been transfered to CallTailCallTarget we can safely reset the field.
## The JIT's transformation
Based on these functions the JIT needs to do a relatively simple transformation
when it sees a tailcall that it cannot dispatch as a fast tailcall. This

View file

@ -265,16 +265,66 @@ To implement `feature_X` as a component. Carry out the following steps:
## Detailed design - Packaging and runtime packs
The components are building blocks to put together a functional runtime. The
runtime pack includes the base runtime and the components and additional
properties and targets that enable the workload to construct a runtime for
various scenarios.
runtime pack includes the base runtime and the components. The mono workload
includes the runtime pack and additional tasks, properties and targets that
enable the workload to construct a runtime for various scenarios.
In each runtime pack we include:
For the target RID, we expose:
- The compiled compnents for the apropriate host architectures in a well-known subdirectory
- An MSBuild props file that defines an item group that list each component name and has metadata that indicates:
- the path to the component in the runtime pack
- the path to the stub component in the runtime pack (if components are static)
- An MSBuild targets file that defines targets to copy a specified set of components to the app publish folder (if components are dynamic); or to link the runtime together with stubs and a set of enabled components (if components are static)
- `@(_MonoRuntimeComponentLinking)` set to either `'static'` or `'dynamic'` depending on whether the
current runtime pack for the current target includes runtime components as static archives or as
shared libraries, respectively.
- `@(_MonoRuntimeComponentSharedLibExt)` and `@(_MonoRuntimeComponentStaticLibExt)` set to the file
extension of the runtime components for the current target (ie, `'.a', '.so', '.dylib'` etc).
- `@(_MonoRuntimeAvailableComponents)` a list of component names without the `lib` prefix (if any)
or file extensions. For example: `'hot_reload; diagnostics_tracing'`.
** TODO ** Write this up in more detail
Each of the above item lists has `RuntimeIdentifier` metadata. For technical reasons the mono
workload will provide a single `@(_MonoRuntimeAvailableComponent)` item list for all platforms. We
use the `RuntimeIdentifier` metadata to filter out the details applicable for the current platform.
- The target `_MonoSelectRuntimeComponents` that has the following inputs and outputs:
- input `@(_MonoComponent)` (to be set by the workload) : a list of components that a workload wants to use for the current
app. It is an error if this specifies any unknown component name.
- output `@(_MonoRuntimeSelectedComponents)` and `@(_MonoRuntimeSelectedStubComponents)` The names
of the components that were (resp, were not) selected. For example `'hot_reload;
diagnostics_tracing'`. Each item has two metadata properties `ComponentLib` and
`ComponentStubLib` (which may be empty) that specify the name of the static or dynamic library
of the component. This is not the main output of the target, it's primarily for debugging.
- output `@(_MonoRuntimeComponentLink)` a list of library names (relative to the `native/`
subdirectory of the runtime pack) that (for dynamic components) must be placed next to the
runtime in the application bundle, or (for static components) that must be linked with the
runtime to enable the components' functionality. Each item in the list has metadata
`ComponentName` (e.g. `'hot_reload'`), `IsStub` (`true` or `false`), `Linking` (`'static'` or
`'dynamic'`). This output should be used by the workloads when linking the app and runtime if
the workload uses an allow list of native libraries to link or bundle.
- output `@(_MonoRuntimeComponentDontLink)` a list of library names (relative to the `native/`
subdirectory of the runtime pack) that should be excluded from the application bundle (for
dynamic linking) or that should not be passed to the native linker (for static linking). This
output should be used by workloads that just link or bundle every native library from `native/`
in order to filter the contents of the subdirectory to exclude the disabled components (and to
exclude the static library stubs for the enabled components when static linking).
Generally workloads should only use one of `@(_MonoRuntimeComponentLink)` or
`@(_MonoRuntimeComponentDontLink)`, depending on whether they use an allow or block list for the
contents of the `native/` subdirectory.
Example fragment (assuming the mono workload has been imported):
```xml
<Project>
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<_MonoComponent Include="hot_reload;diagnostics_tracing" />
</ItemGroup>
<Target Name="PrintComponents" DependsOnTargets="_MonoSelectRuntimeComponents">
<Message Importance="High" Text="Runtime identifier: $(RuntimeIdentifier)" />
<Message Importance="High" Text="Selected : @(_MonoRuntimeSelectedComponents) %(ComponentLib)" />
<Message Importance="High" Text="Stubbed out : @(_MonoRuntimeSelectedStubComponents) %(ComponentStubLib)" />
<Message Importance="High" Text="Linking with lib @(_MonoRuntimeComponentLink) Stub: %(IsStub) Linking: %(Linking) Component: %(ComponentName)"/>
<Message Importance="High" Text="UnSelected : @(_MonoRuntimeUnSelectedComponents) %(ComponentLib)" />
<Message Importance="High" Text="Exclude these from linking: @(_MonoRuntimeComponentDontLink) Stub: %(IsStub) Linking: %(Linking) Component: %(ComponentName)" />
</Target>
</Project>
```

View file

@ -0,0 +1,66 @@
# WebAssembly AOT code generation
## Basic operation
The LLVM backend of the Mono JIT is used to generate an llvm .bc file for each assembly, then the .bc files are
compiled to webassembly using emscripten, then the resulting wasm files are linked into the final app. The 'bitcode'/'llvmonly'
variant of the LLVM backend is used since webassembly doesn't support inline assembly etc.
## GC Support
On wasm, the execution stack is not stored in linear memory, so its not possible to scan it for GC references. However, there
is an additional C stack which stores variables whose addresses are taken. Variables which hold GC references are marked as
'volatile' in the llvm backend, forcing llvm to spill those to the C stack so they can be scanned.
## Interpreter support
Its possible for AOTed and interpreted code to interop, this is called mixed mode.
For the AOT -> interpreter case, every call from AOTed code which might end up in the interpreter is
emitted as an indirect call. When the callee is not found, a wrapper function is used which
packages up the arguments into an array and passes control to the interpreter.
For the interpreter -> AOT case, and similar wrapper function is used which receives the
arguments and a return value pointer from the interpreter in an array, and calls the
AOTed code. There is usually one aot->interp and interp->aot wrapper for each signature, with
some sharing. These wrappers are generated by the AOT compiler when the 'interp' aot option
is used.
## Null checks
Since wasm has no signal support, we generate explicit null checks.
## Issues
The generated code is in general much bigger than the code generated on ios etc. Some of the
current issues are described below.
### Function pointers
The runtime needs to be able to do a IL method -> wasm function lookup. To do this, every
AOT image includes a table mapping from a method index to wasm functions. This means that
every generated AOT method has its address taken, which severely limits the interprocedural
optimizations that LLVM can do, since it cannot determine the set of callers for a function.
This means that it cannot remove functions corresponding to unused IL methods, cannot
specialize functions for constant/nonnull arguments, etc.
The dotnet linker includes some support for adding a [DisablePrivateReflection] attribute to
methods which cannot be called using reflection, and the AOT compiler could use this
to avoid generating function pointers for methods which are not called from outside the
AOT image. This is not enabled right now because the linker support is not complete.
### Null checks
The explicit null checking code adds a lot of size overhead since null checks are very common.
### Virtual calls
Vtable slots are lazily initialized on the first call, i.e. every virtual call looks like this:
```C
vt_entry = vtable [slot];
if (vt_entry == null)
vt_entry = init_vt_entry ();
```
### GC overhead
Since GC variables are marked as volatile and stored on the C stack, they are loaded/stored on every access,
even if there is no GC safe point between the accesses. Instead, they should only be loaded/stored around
GC safe points.

View file

@ -2,6 +2,16 @@
This is a list of additions and edits to be made in ECMA-335 specifications. It includes both documentation of new runtime features and issues encountered during development. Some of the issues are definite spec errors while others could be reasoned as Microsoft implementation quirks.
## Changes by feature area
- [Signatures](#signatures)
- [Heap sizes](#heap-sizes)
- [Metadata merging](#metadata-merging)
- [Module Initializer](#module-initializer)
- [Default Interface Methods](#default-interface-methods)
- [Static Interface Methods](#static-interface-methods)
- [Covariant Return Types](#covariant-return-types)
## Signatures
There is a general philosophical issue whereby the spec defines the
@ -810,3 +820,91 @@ Bullet 2: It is valid to call a virtual method using `call` (rather than `callvi
the method is to be resolved using the class specified by method rather than as
specified dynamically from the object being invoked. This is used, for example, to
compile calls to “methods on `base`” (i.e., the statically known parent class) or to virtual static methods.
## Covariant Return Types
Covariant return methods is a runtime feature designed to support the [covariant return types](https://github.com/dotnet/csharplang/blob/master/proposals/csharp-9.0/covariant-returns.md) and [records](https://github.com/dotnet/csharplang/blob/master/proposals/csharp-9.0/records.md) C# language features implemented in C# 9.0.
This feature allows an overriding method to have a return type that is different than the one on the method it overrides, but compatible with it. The type compability rules are defined in ECMA I.8.7.1.
Example:
```
class Base
{
public virtual object VirtualMethod() { return null; }
}
class Derived : Base
{
// Note that the VirtualMethod here overrides the VirtualMethod defined on Base even though the
// return types are not the same. However, the return types are compatible in a covariant fashion.
public override string VirtualMethod() { return null;}
}
```
Covariant return methods can only be described through MethodImpl records, and are only applicable to methods on non-interface reference types. In addition the covariant override is only applicable for overriding methods also defined on a non-interface reference type.
See [Implementation Design](../features/covariant-return-methods.md) for notes from the implementation in CoreCLR.
Changes to the spec. These changes are relative to the 6th edition (June 2012) of the ECMA-335 specification published by ECMA available at:
https://www.ecma-international.org/publications-and-standards/standards/ecma-335/
### I.8.7.1 Assignment compatibility for signature types
Add a new signature type relation.
"A method signature type T is *covariant-return-compatible-with* with a method signature type U if and only if:
1. The calling conventions of T and U shall match exactly, ignoring the distinction between static and instance methods (i.e., the this parameter, if any, is not treated specially).
2. For each parameter type of P of T, and corresponding type Q of U, P is identical Q.
3. For the return type P of T, and return type Q of U, Q is *compatible-with* P and is a *reference type* OR Q is identical to P.
### II.10.3.2 The .override directive (page 147)
Edit the first paragraph "The .override directive specifies that a virtual method shall be implemented (overridden), in this type, by a virtual method with a different name, but with a *covariant-return-compatible-with* signature (§I.8.7.1). This directive can be used to provide an implementation for a virtual method inherited from a base class, or a virtual method specified in an interface implemented by this type and all other. If not used to provide an implementation for a virtual method inherited from a base class the signature must be identical."
### II.10.3.4 Impact of overrides on derived classes
Add a third bullet
"- If a virtual method is overridden via an .override directive or if a derived class provides an implentation and that virtual method in parent class was overriden with an .override directive where the method body of that second .override directive is decorated with `System.Runtime.CompilerServices.PreserveBaseOverridesAttribute` then the implementation of the virtual method shall be the implementation of the method body of the second .override directive as well. If this results in the implementor of the virtual method in the parent class not having a signature which is *covariant-return-compatible-with* the virtual method in the parent class, the program is not valid.
```
.class A {
.method newslot virtual RetType VirtualFunction() { ... }
}
.class B extends A {
.method virtual DerivedRetType VirtualFunction() {
.custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = ( 01 00 00 00 )
.override A.VirtualFuncion
...
}
}
.class C extends B {
.method virtual MoreDerivedRetType VirtualFunction()
{
.override A.VirtualFunction
...
}
}
.class D extends C
{
.method virtual DerivedRetTypeNotDerivedFromMoreDerivedRetType VirtualFunction() {
.custom instance void [System.Runtime]System.Runtime.CompilerServices.PreserveBaseOverridesAttribute::.ctor() = ( 01 00 00 00 )
.override A.VirtualFuncion
...
}
}
```
For this example, the behavior of calls on objects of various types is presented in the following table:
| Type of object | Method Invocation | Method Called | Notes |
| --- | --- | --- | --- |
| A | A::VirtualFunction() | A::VirtualFunction | |
| B | A::VirtualFunction() | B::VirtualFunction | |
| B | B::VirtualFunction() | B::VirtualFunction | |
| C | A::VirtualFunction() | C::VirtualFunction | |
| C | B::VirtualFunction() | C::VirtualFunction | |
| C | C::VirtualFunction() | C::VirtualFunction | |
| D | B::VirtualFunction() | ERROR | A program containing type D is not valid, as B::VirtualFunction would be implemented by D::VirtualFunction which is not *covariant-return-compatible-with* (§I.8.7.1) B::VirtualFunction |
"
### II.22.27
Edit rule 12 to specify that "The method signature defined by *MethodBody* shall match those defined by *MethodDeclaration* exactly if *MethodDeclaration* defines a method on an interface or be *covariant-return-compatible-with* (§I.8.7.1) if *MethodDeclaration* represents a method on a class."

View file

@ -80,6 +80,12 @@ The PR that reveals the implementation of the `<IncludeInternalObsoleteAttribute
| __`SYSLIB0023`__ | RNGCryptoServiceProvider is obsolete. To generate a random number, use one of the RandomNumberGenerator static methods instead. |
| __`SYSLIB0024`__ | Creating and unloading AppDomains is not supported and throws an exception. |
| __`SYSLIB0025`__ | SuppressIldasmAttribute has no effect in .NET 6.0+. |
| __`SYSLIB0026`__ | X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate. |
| __`SYSLIB0027`__ | PublicKey.Key is obsolete. Use the appropriate method to get the public key, such as GetRSAPublicKey. |
| __`SYSLIB0028`__ | X509Certificate2.PrivateKey is obsolete. Use the appropriate method to get the private key, such as GetRSAPrivateKey, or use the CopyWithPrivateKey method to create a new instance with a private key. |
| __`SYSLIB0029`__ | ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is no longer supported. |
| __`SYSLIB0030`__ | HMACSHA1 always uses the algorithm implementation provided by the platform. Use a constructor without the useManagedSha1 parameter. |
| __`SYSLIB0031`__ | EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1. |
## Analyzer Warnings

View file

@ -7,7 +7,7 @@ If you haven't already done so, please read [this document](../../README.md#Buil
The **correct version** of Emscripten SDK (emsdk) needs to be installed.
* Run `make -C src/mono/wasm provision-wasm` to install emsdk into `src/mono/wasm/emsdk`.
* Alternatively follow the [installation guide](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install).
Do not install `latest` but rather specific version e.g. `./emsdk install 2.0.21`. See [emscripten-version.txt](..\..\..\..\src\mono\wasm\emscripten-version.txt)
Do not install `latest` but rather specific version e.g. `./emsdk install 2.0.23`. See [emscripten-version.txt](..\..\..\..\src\mono\wasm\emscripten-version.txt)
Once installed the `EMSDK_PATH` environment variable needs to be set:

View file

@ -34,7 +34,7 @@ Visual Studio 2019 installation process:
A `.vsconfig` file is included in the root of the dotnet/runtime repository that includes all components needed to build the dotnet/runtime repository. You can [import `.vsconfig` in your Visual Studio installer](https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2019#import-a-configuration) to install all necessary components.
The dotnet/runtime repository requires at least Visual Studio 2019 16.6.
Visual Studio 2019 16.6 or later is required for building the repository. Visual Studio 2019 16.10 is required to work with the libraries projects inside the Visual Studio IDE.
## CMake

View file

@ -1,54 +1,71 @@
# Testing Libraries
We use the OSS testing framework [xunit](https://github.com/xunit/xunit).
## Full Build and Test Run
To build the tests and run them you can call the libraries build script. For libraries tests to work, you must have built the coreclr or mono runtime for them to run on.
These example commands automate the test run and all pre-requisite build steps in a single command from a clean enlistment.
**Examples**
- The following shows how to build only the tests but not run them:
```
build.cmd/sh -subset libs.tests
```
- The following builds and runs all tests using clr:
```
build.cmd/sh -subset clr+libs.tests -test
```
- The following builds and runs all tests using mono:
```
build.cmd/sh -subset mono+libs.tests -test
```
- The following builds and runs all tests in release configuration:
```
build.cmd/sh -subset libs.tests -test -c Release
```
- The following builds clr in release, libs in debug and runs all tests:
- Run all tests - Builds clr in release, libs+tests in debug:
```
build.cmd/sh -subset clr+libs+libs.tests -test -rc Release
```
- The following builds mono and libs for x86 architecture and runs all tests:
- Run all tests - Builds Mono in release, libs+tests in debug:
```
build.cmd/sh -subset mono+libs+libs.tests -test -rc Release
```
- Run all tests - Build Mono and libs for x86 architecture in debug (choosing debug for runtime will run very slowly):
```
build.cmd/sh -subset mono+libs+libs.tests -test -arch x86
```
- The following example shows how to pass extra msbuild properties to ignore tests ignored in CI:
## Partial Build and Test Runs
Doing full build and test runs takes a long time and is very inefficient if you need to iterate on a change.
For greater control and efficiency individual parts of the build + testing workflow can be run in isolation.
See the [Building instructions](../../building/libraries/README.md) for more info on build options.
### Test Run Pre-requisites
Before any tests can run we need a complete build to run them on. This requires building (1) a runtime, and
(2) all the libraries. Examples:
- Build release clr + debug libraries
```
build.cmd/sh -subset libs.tests -test /p:WithoutCategories=IgnoreForCI
build.cmd/sh -subset clr+libs -rc Release
```
Unless you specifiy `-testnobuild`, test assemblies are implicitly built when invoking the `Test` action.
- The following shows how to only test the libraries without building them
- Build release mono + debug libraries
```
build.cmd/sh -subset mono+libs -rc Release
```
Building the `libs` subset or any of individual library projects automatically copies product binaries into the testhost folder
in the bin directory. This is where the tests will load the binaries from during the run. However System.Private.CorLib is an
exception - the build does not automatically copy it to the testhost folder. If you [rebuild System.Private.CoreLib](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/README.md#iterating-on-systemprivatecorelib-changes) you must also build the `libs.pretest` subset to ensure S.P.C is copied before running tests.
### Running tests for all libraries
- Build and run all tests in release configuration.
```
build.cmd/sh -subset libs.tests -test -c Release
```
- Build the tests without running them
```
build.cmd/sh -subset libs.tests
```
- Run the tests without building them
```
build.cmd/sh -subset libs.tests -test -testnobuild
```
## Running tests on the command line
- The following example shows how to pass extra msbuild properties to ignore tests ignored in CI.
```
build.cmd/sh -subset libs.tests -test /p:WithoutCategories=IgnoreForCI
```
To build tests you need to specify the `test` subset when invoking build.cmd/sh: `build.cmd/sh -subset libs.tests`.
### Running tests for a single library
The easiest (and recommended) way to build and run the tests for a specific library, is to invoke the `Test` target on that library:
```cmd
@ -68,21 +85,21 @@ dotnet build /t:Test /p:TargetArchitecture=x86
There may be multiple projects in some directories so you may need to specify the path to a specific test project to get it to build and run the tests.
#### Running a single test on the command line
### Running a single test on the command line
To quickly run or debug a single test from the command line, set the XunitMethodName property, e.g.:
```cmd
dotnet build /t:Test /p:XunitMethodName={FullyQualifiedNamespace}.{ClassName}.{MethodName}
```
#### Running outer loop tests
### Running outer loop tests
To run all tests, including "outer loop" tests (which are typically slower and in some test suites less reliable, but which are more comprehensive):
```cmd
dotnet build /t:Test /p:Outerloop=true
```
#### Running tests on a different target framework
### Running tests on a different target framework
Each test project can potentially have multiple target frameworks. There are some tests that might be OS-specific, or might be testing an API that is available only on some target frameworks, so the `TargetFrameworks` property specifies the valid target frameworks. By default we will build and run only the default build target framework which is `net5.0`. The rest of the `TargetFrameworks` will need to be built and ran by specifying the `BuildTargetFramework` option, e.g.:
```cmd

View file

@ -0,0 +1,28 @@
# Testing Workloads
Workloads based on packages in `artifacts` can be installed, and used for testing.
- This is done by installing a specified SDK version (`$(SdkVersionForWorkloadTesting)`) in `artifacts/bin/dotnet-workload`.
- Then the manifest for the workload in `@(WorkloadIdForTesting)` is installed
- Then workload packs are installed
- packs, or manifests not generated by `runtime`, are restored from nuget
- The SDK is installed by `ProvisionSdkForWorkloadTesting` target
- and the workload is installed by `InstallWorkloadUsingArtifacts` target, using the `InstallWorkloadFromArtifacts` task
- `@(WorkloadIdForTesting)`:
Example for wasm:
```xml
<WorkloadIdForTesting Include="wasm-tools"
Name="microsoft.net.workload.mono.toolchain"
ManifestName="Microsoft.NET.Workload.Mono.ToolChain"
Version="$(PackageVersion)"
VersionBand="$(SdkBandVersion)" />
```
- Currently, this is used only by `src/tests/BuildWasmApps/Wasm.Build.Tests`
## Limitations:
- The cross compiler package is built manually from the `InstallWorkloadUsingArtifacts` target

View file

@ -16,9 +16,9 @@ assume use of a dogfood build of the .NET SDK.
## Acquire the latest nightly .NET SDK
- [Win 64-bit Latest](https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip)
- [macOS 64-bit Latest](https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz)
- [Others](https://github.com/dotnet/cli/blob/master/README.md#installers-and-binaries)
- [Win 64-bit Latest](https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x64.zip)
- [macOS 64-bit Latest](https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-x64.tar.gz)
- [Others](https://github.com/dotnet/installer#installers-and-binaries)
To setup the SDK download the zip and extract it somewhere and add the root folder to your [path](../requirements/windows-requirements.md#adding-to-the-default-path-variable)
or always fully qualify the path to dotnet in the root of this folder for all the instructions in this document.
@ -73,8 +73,7 @@ dotnet publish
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnetcore-feed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
<add key="dotnet6" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet6/nuget/v3/index.json" />
</packageSources>
</configuration>
```

View file

@ -13,6 +13,7 @@ configurations but their defaults might vary as any SDK can set the defaults dif
| EnableUnsafeBinaryFormatterSerialization | System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization | BinaryFormatter serialization support is trimmed when set to false |
| EventSourceSupport | System.Diagnostics.Tracing.EventSource.IsSupported | Any EventSource related code or logic is trimmed when set to false |
| InvariantGlobalization | System.Globalization.Invariant | All globalization specific code and data is trimmed when set to true |
| PredefinedCulturesOnly | System.Globalization.PredefinedCulturesOnly | Don't allow creating a culture for which the platform does not have data |
| UseSystemResourceKeys | System.Resources.UseSystemResourceKeys | Any localizable resources for system assemblies is trimmed when set to true |
| HttpActivityPropagationSupport | System.Net.Http.EnableActivityPropagation | Any dependency related to diagnostics support for System.Net.Http is trimmed when set to false |
| UseNativeHttpHandler | System.Net.Http.UseNativeHttpHandler | HttpClient uses by default platform native implementation of HttpMessageHandler if set to true. |
@ -22,6 +23,7 @@ configurations but their defaults might vary as any SDK can set the defaults dif
| EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization | System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization | BinaryFormatter serialization support is trimmed when set to false. |
| BuiltInComInteropSupport | System.Runtime.InteropServices.BuiltInComInterop.IsSupported | Built-in COM support is trimmed when set to false. |
| EnableCppCLIHostActivation | System.Runtime.InteropServices.EnableCppCLIHostActivation | C++/CLI host activation code is disabled when set to false and related functionality can be trimmed. |
| MetadataUpdaterSupport | System.Reflection.Metadata.MetadataUpdater.IsSupported | Metadata update related code to be trimmed when set to false |
| _EnableConsumingManagedCodeFromNativeHosting | System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting | Getting a managed function from native hosting is disabled when set to false and related functionality can be trimmed. |
Any feature-switch which defines property can be set in csproj file or

View file

@ -68,6 +68,7 @@
<Rule Id="CA1416" Action="Warning" /> <!-- Validate platform compatibility -->
<Rule Id="CA1417" Action="Warning" /> <!-- Do not use 'OutAttribute' on string parameters for P/Invokes -->
<Rule Id="CA1418" Action="Warning" /> <!-- Use valid platform string -->
<Rule Id="CA1419" Action="Warning" /> <!-- Provide a public parameterless constructor for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' -->
<Rule Id="CA1501" Action="None" /> <!-- Avoid excessive inheritance -->
<Rule Id="CA1502" Action="None" /> <!-- Avoid excessive complexity -->
<Rule Id="CA1505" Action="None" /> <!-- Avoid unmaintainable code -->
@ -126,6 +127,7 @@
<Rule Id="CA1844" Action="Warning" /> <!-- Provide memory-based overrides of async methods when subclassing 'Stream' -->
<Rule Id="CA1845" Action="Warning" /> <!-- Use span-based 'string.Concat' -->
<Rule Id="CA1846" Action="Warning" /> <!-- Prefer 'AsSpan' over 'Substring' -->
<Rule Id="CA1847" Action="Warning" /> <!-- Use char literal for a single character lookup -->
<Rule Id="CA2000" Action="None" /> <!-- Dispose objects before losing scope -->
<Rule Id="CA2002" Action="None" /> <!-- Do not lock on objects with weak identity -->
<Rule Id="CA2007" Action="Warning" /> <!-- Consider calling ConfigureAwait on the awaited task -->
@ -174,6 +176,7 @@
<Rule Id="CA2249" Action="Warning" /> <!-- Consider using 'string.Contains' instead of 'string.IndexOf' -->
<Rule Id="CA2250" Action="Warning" /> <!-- Use 'ThrowIfCancellationRequested' -->
<Rule Id="CA2251" Action="Warning" /> <!-- Use 'string.Equals' -->
<Rule Id="CA2252" Action="None" /> <!-- This API requires opting into preview features -->
<Rule Id="CA2300" Action="None" /> <!-- Do not use insecure deserializer BinaryFormatter -->
<Rule Id="CA2301" Action="None" /> <!-- Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder -->
<Rule Id="CA2302" Action="None" /> <!-- Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize -->
@ -476,9 +479,6 @@
<Rule Id="IDE0064" Action="Hidden" /> <!-- MakeStructFieldsWritable -->
<Rule Id="IDE0065" Action="Hidden" /> <!-- MoveMisplacedUsingDirectives -->
<Rule Id="IDE0066" Action="Hidden" /> <!-- ConvertSwitchStatementToExpression -->
<Rule Id="IDE0067" Action="Hidden" /> <!-- DisposeObjectsBeforeLosingScope -->
<Rule Id="IDE0068" Action="Hidden" /> <!-- UseRecommendedDisposePattern -->
<Rule Id="IDE0069" Action="Hidden" /> <!-- DisposableFieldsShouldBeDisposed -->
<Rule Id="IDE0070" Action="Hidden" /> <!-- UseSystemHashCode -->
<Rule Id="IDE0071" Action="Hidden" /> <!-- SimplifyInterpolation -->
<Rule Id="IDE0072" Action="Hidden" /> <!-- PopulateSwitchExpression -->
@ -499,6 +499,8 @@
<Rule Id="IDE0110" Action="Hidden" /> <!-- RemoveUnnecessaryDiscard -->
<Rule Id="IDE0120" Action="Hidden" /> <!-- SimplifyLINQExpression -->
<Rule Id="IDE0130" Action="Hidden" /> <!-- NamespaceDoesNotMatchFolderStructure -->
<Rule Id="IDE0140" Action="Hidden" /> <!-- SimplifyObjectCreationDiagnosticId -->
<Rule Id="IDE0150" Action="Hidden" /> <!-- UseNullCheckOverTypeCheckDiagnosticId -->
<Rule Id="IDE1001" Action="Hidden" /> <!-- AnalyzerChanged -->
<Rule Id="IDE1002" Action="Hidden" /> <!-- AnalyzerDependencyConflict -->
<Rule Id="IDE1003" Action="Hidden" /> <!-- MissingAnalyzerReference -->

View file

@ -67,6 +67,8 @@
<Rule Id="CA1401" Action="None" /> <!-- P/Invokes should not be visible -->
<Rule Id="CA1416" Action="None" /> <!-- Validate platform compatibility -->
<Rule Id="CA1417" Action="None" /> <!-- Do not use 'OutAttribute' on string parameters for P/Invokes -->
<Rule Id="CA1418" Action="None" /> <!-- Use valid platform string -->
<Rule Id="CA1419" Action="None" /> <!-- Provide a public parameterless constructor for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' -->
<Rule Id="CA1501" Action="None" /> <!-- Avoid excessive inheritance -->
<Rule Id="CA1502" Action="None" /> <!-- Avoid excessive complexity -->
<Rule Id="CA1505" Action="None" /> <!-- Avoid unmaintainable code -->
@ -125,6 +127,7 @@
<Rule Id="CA1844" Action="None" /> <!-- Provide memory-based overrides of async methods when subclassing 'Stream' -->
<Rule Id="CA1845" Action="None" /> <!-- Use span-based 'string.Concat' -->
<Rule Id="CA1846" Action="None" /> <!-- Prefer 'AsSpan' over 'Substring' -->
<Rule Id="CA1847" Action="None" /> <!-- Use char literal for a single character lookup -->
<Rule Id="CA2000" Action="None" /> <!-- Dispose objects before losing scope -->
<Rule Id="CA2002" Action="None" /> <!-- Do not lock on objects with weak identity -->
<Rule Id="CA2007" Action="None" /> <!-- Consider calling ConfigureAwait on the awaited task -->
@ -173,6 +176,7 @@
<Rule Id="CA2249" Action="None" /> <!-- Consider using 'string.Contains' instead of 'string.IndexOf' -->
<Rule Id="CA2250" Action="None" /> <!-- Use 'ThrowIfCancellationRequested' -->
<Rule Id="CA2251" Action="None" /> <!-- Use 'string.Equals' -->
<Rule Id="CA2252" Action="None" /> <!-- This API requires opting into preview features -->
<Rule Id="CA2300" Action="None" /> <!-- Do not use insecure deserializer BinaryFormatter -->
<Rule Id="CA2301" Action="None" /> <!-- Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder -->
<Rule Id="CA2302" Action="None" /> <!-- Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize -->
@ -478,9 +482,6 @@
<Rule Id="IDE0064" Action="Hidden" /> <!-- MakeStructFieldsWritable -->
<Rule Id="IDE0065" Action="Hidden" /> <!-- MoveMisplacedUsingDirectives -->
<Rule Id="IDE0066" Action="Hidden" /> <!-- ConvertSwitchStatementToExpression -->
<Rule Id="IDE0067" Action="Hidden" /> <!-- DisposeObjectsBeforeLosingScope -->
<Rule Id="IDE0068" Action="Hidden" /> <!-- UseRecommendedDisposePattern -->
<Rule Id="IDE0069" Action="Hidden" /> <!-- DisposableFieldsShouldBeDisposed -->
<Rule Id="IDE0070" Action="Hidden" /> <!-- UseSystemHashCode -->
<Rule Id="IDE0071" Action="Hidden" /> <!-- SimplifyInterpolation -->
<Rule Id="IDE0072" Action="Hidden" /> <!-- PopulateSwitchExpression -->
@ -501,6 +502,8 @@
<Rule Id="IDE0110" Action="Hidden" /> <!-- RemoveUnnecessaryDiscard -->
<Rule Id="IDE0120" Action="Hidden" /> <!-- SimplifyLINQExpression -->
<Rule Id="IDE0130" Action="Hidden" /> <!-- NamespaceDoesNotMatchFolderStructure -->
<Rule Id="IDE0140" Action="Hidden" /> <!-- SimplifyObjectCreationDiagnosticId -->
<Rule Id="IDE0150" Action="Hidden" /> <!-- UseNullCheckOverTypeCheckDiagnosticId -->
<Rule Id="IDE1001" Action="Hidden" /> <!-- AnalyzerChanged -->
<Rule Id="IDE1002" Action="Hidden" /> <!-- AnalyzerDependencyConflict -->
<Rule Id="IDE1003" Action="Hidden" /> <!-- MissingAnalyzerReference -->

73
eng/SourceBuild.props Normal file
View file

@ -0,0 +1,73 @@
<Project>
<PropertyGroup>
<GitHubRepositoryName>runtime</GitHubRepositoryName>
</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) --allconfigurations</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:PortableBuild=$(SourceBuildPortable)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
</PropertyGroup>
</Target>
<Target Name="CategorizeRuntimeSupplementalArtifacts"
BeforeTargets="GetCategorizedIntermediateNupkgContents">
<ItemGroup>
<!--
Runtime artifacts are too large to fit into a single package (Azure DevOps feeds 500 mb constraint).
Split large components into separate packages.
-->
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-runtime-*.tar.gz" Category="runtime" />
<IntermediateNupkgArtifactFile
Include="
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-crossgen2-*.tar.gz;
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Crossgen2.*.nupkg"
Category="Crossgen2Pack" />
</ItemGroup>
</Target>
</Project>

View file

@ -0,0 +1,5 @@
<UsageData>
<IgnorePatterns>
<UsagePattern IdentityGlob="*/*" />
</IgnorePatterns>
</UsageData>

View file

@ -25,8 +25,8 @@
<PropertyGroup>
<DefaultSubsets>clr+mono+libs+host+packs</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsMobile)' == 'true'">mono+libs+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>
<!-- mono is not supported in source build. On Windows mono is supported for x86/x64 only. -->
<DefaultSubsets Condition="'$(DotNetBuildFromSource)' == 'true' or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+host+packs</DefaultSubsets>
</PropertyGroup>
<!-- Init _subset here in to allow RuntimeFlavor to be set as early as possible -->
@ -35,14 +35,24 @@
<_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+</_subset>
</PropertyGroup>
<!-- Determine the primary runtime flavor. This is usually CoreCLR, except on
platforms (like s390x) where only Mono is supported. The primary runtime
flavor is used to decide when to build the hosts and installers. -->
<PropertyGroup>
<PrimaryRuntimeFlavor>CoreCLR</PrimaryRuntimeFlavor>
<PrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 's390x'">Mono</PrimaryRuntimeFlavor>
</PropertyGroup>
<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetsMobile)' == 'true'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">CoreCLR</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">$(PrimaryRuntimeFlavor)</RuntimeFlavor>
</PropertyGroup>
<PropertyGroup>
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages</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>
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
@ -53,14 +63,17 @@
<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
'$(BuildTargetFramework)' == '' or
'$(BuildAllConfigurations)' == 'true'">libs.native+</DefaultLibrariesSubsets>
<DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.ref+libs.src+libs.pretest+libs.packages</DefaultLibrariesSubsets>
<DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.ref+libs.src+libs.packages</DefaultLibrariesSubsets>
<DefaultLibrariesSubsets Condition="'$(DotNetBuildFromSource)' != 'true'">$(DefaultLibrariesSubsets)+libs.pretest</DefaultLibrariesSubsets>
<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>host.native+host.tools</DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(DotNetBuildFromSource)' != 'true'">$(DefaultHostSubsets)+host.pkg+host.tests</DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'"></DefaultHostSubsets>
<DefaultHostSubsets Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">host.native</DefaultHostSubsets>
<DefaultPacksSubsets>packs.product</DefaultPacksSubsets>
<DefaultPacksSubsets Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'">$(DefaultPacksSubsets)+packs.tests</DefaultPacksSubsets>
<DefaultPacksSubsets Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultPacksSubsets)+packs.installers</DefaultPacksSubsets>
</PropertyGroup>
<PropertyGroup>
@ -106,6 +119,7 @@
<SubsetName Include="Mono.Packages" Description="The projects that produce NuGet packages for the Mono runtime." />
<SubsetName Include="Mono.WasmRuntime" Description="The WebAssembly runtime." />
<SubsetName Include="Mono.MsCorDbi" Description="The implementation of ICorDebug interface." />
<SubsetName Include="Mono.Workloads" OnDemand="true" Description="Builds the installers and the insertion metadata for Blazor workloads." />
<!-- Libs -->
<SubsetName Include="Libs" Description="The libraries native part, refs and source assemblies, test infra and packages, but NOT the tests (use Libs.Tests to request those explicitly)" />
@ -204,12 +218,12 @@
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\runincontext\runincontext.csproj;
$(CoreClrProjectRoot)tools\r2rdump\R2RDump.csproj;
$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo.csproj;
$(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj;
$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
$(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
<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"
Test="true" Category="clr" Condition="'$(__DistroRid)' != 'linux-musl-x64'"/>
Test="true" Category="clr" Condition="'$(__DistroRid)' != 'linux-musl-x64' and '$(DotNetBuildFromSource)' != 'true'"/>
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
@ -221,7 +235,7 @@
<ItemGroup Condition="$(_subset.Contains('+clr.packages+')) and '$(PgoInstrument)' != 'true'">
<ProjectToBuild Include="$(CoreClrProjectRoot).nuget\coreclr-packages.proj" Pack="true" Category="clr" />
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo-pack.proj" Pack="true" BuildInParallel="false" Category="clr" />
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo-pack.proj" Pack="true" BuildInParallel="false" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(RuntimeFlavor)' != 'Mono'"/>
</ItemGroup>
<!-- Mono sets -->
@ -245,6 +259,10 @@
<ProjectToBuild Include="$(MonoProjectRoot)System.Private.CoreLib\System.Private.CoreLib.csproj" Category="mono" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+mono.workloads+'))">
<ProjectToBuild Include="$(WorkloadsProjectRoot)\workloads.csproj" Category="mono" />
</ItemGroup>
<!-- Libraries sets -->
<ItemGroup Condition="$(_subset.Contains('+libs.native+'))">
<ProjectToBuild Include="$(LibrariesProjectRoot)Native\build-native.proj" Category="libs" />
@ -309,16 +327,16 @@
</ItemGroup>
<ItemGroup Condition="'$(PgoInstrument)' != 'true'">
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-host.proj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-runtime-deps\*.proj" />
<SharedFrameworkProjectToBuild Condition="'$(MonoCrossAOTTargetOS)' != ''" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\monocrossaot.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-host.proj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-runtime-deps\*.proj" />
<SharedFrameworkProjectToBuild Condition="'$(MonoCrossAOTTargetOS)' != ''" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\monocrossaot.sfxproj" Pack="true" />
</ItemGroup>
<ItemGroup>
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.sfxproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
<ProjectToBuild Include="@(SharedFrameworkProjectToBuild)" Category="packs" />
</ItemGroup>
</When>

View file

@ -1,218 +1,234 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="6.0.0-preview.6.21307.1">
<Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="6.0.0-rc.1.21369.1">
<Uri>https://github.com/dotnet/icu</Uri>
<Sha>08293141bc33a81b7e58120535079d8eac36519f</Sha>
</Dependency>
<Dependency Name="System.Net.MsQuic.Transport" Version="6.0.0-preview.7.21376.1">
<Uri>https://github.com/dotnet/msquic</Uri>
<Sha>d7db669b70f4dd67ec001c192f9809c218cab88b</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="6.0.0-rc.1.21369.1">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>70549df51ec4b2561e2d11caa542e0b2a2903e0a</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21311.3">
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.21372.16">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>6224d1b573b73caaa84176bd83dabe75f202cdc7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4a2b475948d498b89fedef7cf890883f49bc1ea3</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201201-01">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>140434f7109d357d0158ade9e5164a4861513965</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.Drawing.Common.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.IO.Compression.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.IO.Compression.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.IO.Packaging.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.IO.Packaging.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.Net.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.Net.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.Private.Runtime.UnicodeData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.Private.Runtime.UnicodeData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.Runtime.TimeZoneData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.Runtime.TimeZoneData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.Security.Cryptography.X509Certificates.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions.TestData" Version="6.0.0-beta.21307.1">
<Dependency Name="System.Windows.Extensions.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0612b036e67746930105231b605c4df9ac6ed47e</Sha>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21308.1">
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.21369.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>a76e596b96a1b9b4bc7a213f9a8335bcd9189b67</Sha>
<Sha>0b7a170df4f963b7b91e368f5d14a0be9e984c82</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-rc.1.20451.14">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>38017c3935de95d0335bac04f4901ddfc2718656</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHost" Version="6.0.0-preview.6.21314.1">
<Dependency Name="Microsoft.NETCore.DotNetHost" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostPolicy" Version="6.0.0-preview.6.21314.1">
<Dependency Name="Microsoft.NETCore.DotNetHostPolicy" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="runtime.native.System.IO.Ports" Version="6.0.0-preview.6.21314.1">
<Dependency Name="runtime.native.System.IO.Ports" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.ILAsm" Version="6.0.0-preview.6.21314.1">
<Dependency Name="Microsoft.NETCore.ILAsm" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk.IL" Version="6.0.0-preview.6.21314.1">
<Dependency Name="Microsoft.NET.Sdk.IL" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="6.0.0-preview.6.21314.1">
<Dependency Name="System.Text.Json" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="6.0.0-preview.6.21314.1">
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="6.0.0-rc.1.21369.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>af5c238556e204583b129cc8f5c7338f84dc2c40</Sha>
<Sha>f7e4c261815c66fde2c1e750b744f193e236c17e</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21310.3">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21376.2">
<Uri>https://github.com/mono/linker</Uri>
<Sha>caeaf2a3fb3f636805fdd4881df4f9a539fff8f6</Sha>
<Sha>b888d672e11588e2bbca1cd3eeaee30d53416897</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.21314.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.21370.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>d6f8a4ad30908fb210390380eae97264e4fbe8ce</Sha>
<Sha>aa0da55569eaa42c2c735dd89abd2843fba4fe01</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.21314.1">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.21370.1">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>d6f8a4ad30908fb210390380eae97264e4fbe8ce</Sha>
<Sha>aa0da55569eaa42c2c735dd89abd2843fba4fe01</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.21311.3">
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.21370.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
<Sha>89806f0b9e93ad2bbe32c654412835c0801a2032</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21313.4">
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21371.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>4e5bea15eb5a9c8cf9142195b1c9c78437a5b27f</Sha>
<Sha>2e172488a9ee56619a08c8303a708e69dc82503e</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x86.MIBC.Runtime" Version="1.0.0-prerelease.21313.4">
<Dependency Name="optimization.windows_nt-x86.MIBC.Runtime" Version="1.0.0-prerelease.21371.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>4e5bea15eb5a9c8cf9142195b1c9c78437a5b27f</Sha>
<Sha>2e172488a9ee56619a08c8303a708e69dc82503e</Sha>
</Dependency>
<Dependency Name="optimization.linux-x64.MIBC.Runtime" Version="1.0.0-prerelease.21313.4">
<Dependency Name="optimization.linux-x64.MIBC.Runtime" Version="1.0.0-prerelease.21371.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>4e5bea15eb5a9c8cf9142195b1c9c78437a5b27f</Sha>
<Sha>2e172488a9ee56619a08c8303a708e69dc82503e</Sha>
</Dependency>
<Dependency Name="optimization.PGO.CoreCLR" Version="1.0.0-prerelease.21313.4">
<Dependency Name="optimization.PGO.CoreCLR" Version="1.0.0-prerelease.21371.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>4e5bea15eb5a9c8cf9142195b1c9c78437a5b27f</Sha>
<Sha>2e172488a9ee56619a08c8303a708e69dc82503e</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.21.Node.win-x64" Version="6.0.0-preview.6.21275.1">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>defa37b05c734e025292c5747664e970cd2ac444</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="1.0.1-alpha.0.21311.1">
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="1.0.1-alpha.0.21369.1">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
<Sha>25b814e010cd4796cedfbcce72a274c26928f496</Sha>
<Sha>589840a79ed6335a310a011ee9e244e660798cf5</Sha>
</Dependency>
<Dependency Name="System.Runtime.Numerics.TestData" Version="6.0.0-beta.21371.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>bcfd1993de3767c54c6d8a522bf63770fba3c98d</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0-rc1.21366.2">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
<Sha>7e82240306d8a7a83ebbbc1894381393cebf9fb2</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

View file

@ -7,8 +7,8 @@
<MinorVersion>0</MinorVersion>
<PatchVersion>0</PatchVersion>
<SdkBandVersion>6.0.100</SdkBandVersion>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration>7</PreReleaseVersionIteration>
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
<!-- Set assembly version to align with major and minor version,
as for the patches and revisions should be manually updated per assembly if it is serviced. -->
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
@ -17,6 +17,8 @@
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
<!-- Opt-in/out repo features -->
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
<!-- TODO: Upgrade compiler version to enable Static Abstracts in Interfaces, interpolated string handlers, and caller arg expressions; remove this once the employed SDK uses a new enough version. -->
<MicrosoftNetCompilersToolsetVersion>4.0.0-3.21376.12</MicrosoftNetCompilersToolsetVersion>
<UsingToolMicrosoftNetILLinkTasks>true</UsingToolMicrosoftNetILLinkTasks>
<UsingToolIbcOptimization>false</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
@ -45,32 +47,34 @@
<MicrosoftCodeAnalysisVersion>3.8.0</MicrosoftCodeAnalysisVersion>
</PropertyGroup>
<PropertyGroup>
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0-preview6.21281.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>3.10.0-2.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisCSharpVersion>3.10.0-2.final</MicrosoftCodeAnalysisCSharpVersion>
<!-- Code analysis dependencies -->
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>3.10.0</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisCSharpVersion>3.10.0</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0-rc1.21366.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21311.3</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21311.3</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21311.3</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21311.3</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21311.3</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21311.3</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21311.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21311.3</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21311.3</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21311.3</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21311.3</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21311.3</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21311.3</MicrosoftDotNetPackageTestingVersion>
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21370.12</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21370.12</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21370.12</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21370.12</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21370.12</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21370.12</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21370.12</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21370.12</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21370.12</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21370.12</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21372.16</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21370.12</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21370.12</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21370.12</MicrosoftDotNetPackageTestingVersion>
<!-- NuGet dependencies -->
<NuGetBuildTasksPackVersion>5.9.0-preview.2</NuGetBuildTasksPackVersion>
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
<!-- Installer dependencies -->
<MicrosoftNETCoreAppVersion>6.0.0-alpha.1.20612.4</MicrosoftNETCoreAppVersion>
<MicrosoftNETCoreDotNetHostVersion>6.0.0-preview.6.21314.1</MicrosoftNETCoreDotNetHostVersion>
<MicrosoftNETCoreDotNetHostPolicyVersion>6.0.0-preview.6.21314.1</MicrosoftNETCoreDotNetHostPolicyVersion>
<MicrosoftNETCoreDotNetHostVersion>6.0.0-rc.1.21369.2</MicrosoftNETCoreDotNetHostVersion>
<MicrosoftNETCoreDotNetHostPolicyVersion>6.0.0-rc.1.21369.2</MicrosoftNETCoreDotNetHostPolicyVersion>
<MicrosoftExtensionsDependencyModelVersion>3.1.0</MicrosoftExtensionsDependencyModelVersion>
<!-- CoreClr dependencies -->
<MicrosoftNETCoreILAsmVersion>6.0.0-preview.6.21314.1</MicrosoftNETCoreILAsmVersion>
<MicrosoftNETCoreILAsmVersion>6.0.0-rc.1.21369.2</MicrosoftNETCoreILAsmVersion>
<!-- Libraries dependencies -->
<MicrosoftBclAsyncInterfacesVersion>5.0.0</MicrosoftBclAsyncInterfacesVersion>
<MicrosoftWin32PrimitivesVersion>4.3.0</MicrosoftWin32PrimitivesVersion>
@ -104,26 +108,27 @@
<SystemSecurityCryptographyOpenSslVersion>5.0.0</SystemSecurityCryptographyOpenSslVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
<ServiceModelVersion>4.8.1</ServiceModelVersion>
<SystemTextJsonVersion>6.0.0-preview.6.21314.1</SystemTextJsonVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-preview.6.21314.1</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemTextJsonVersion>6.0.0-rc.1.21369.2</SystemTextJsonVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-rc.1.21369.2</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemThreadingTasksExtensionsVersion>4.5.4</SystemThreadingTasksExtensionsVersion>
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
<runtimenativeSystemIOPortsVersion>6.0.0-preview.6.21314.1</runtimenativeSystemIOPortsVersion>
<runtimenativeSystemIOPortsVersion>6.0.0-rc.1.21369.2</runtimenativeSystemIOPortsVersion>
<!-- Runtime-Assets dependencies -->
<SystemComponentModelTypeConverterTestDataVersion>6.0.0-beta.21307.1</SystemComponentModelTypeConverterTestDataVersion>
<SystemDrawingCommonTestDataVersion>6.0.0-beta.21307.1</SystemDrawingCommonTestDataVersion>
<SystemIOCompressionTestDataVersion>6.0.0-beta.21307.1</SystemIOCompressionTestDataVersion>
<SystemIOPackagingTestDataVersion>6.0.0-beta.21307.1</SystemIOPackagingTestDataVersion>
<SystemNetTestDataVersion>6.0.0-beta.21307.1</SystemNetTestDataVersion>
<SystemPrivateRuntimeUnicodeDataVersion>6.0.0-beta.21307.1</SystemPrivateRuntimeUnicodeDataVersion>
<SystemRuntimeTimeZoneDataVersion>6.0.0-beta.21307.1</SystemRuntimeTimeZoneDataVersion>
<SystemSecurityCryptographyX509CertificatesTestDataVersion>6.0.0-beta.21307.1</SystemSecurityCryptographyX509CertificatesTestDataVersion>
<SystemWindowsExtensionsTestDataVersion>6.0.0-beta.21307.1</SystemWindowsExtensionsTestDataVersion>
<SystemRuntimeNumericsTestDataVersion>6.0.0-beta.21371.1</SystemRuntimeNumericsTestDataVersion>
<SystemComponentModelTypeConverterTestDataVersion>6.0.0-beta.21371.1</SystemComponentModelTypeConverterTestDataVersion>
<SystemDrawingCommonTestDataVersion>6.0.0-beta.21371.1</SystemDrawingCommonTestDataVersion>
<SystemIOCompressionTestDataVersion>6.0.0-beta.21371.1</SystemIOCompressionTestDataVersion>
<SystemIOPackagingTestDataVersion>6.0.0-beta.21371.1</SystemIOPackagingTestDataVersion>
<SystemNetTestDataVersion>6.0.0-beta.21371.1</SystemNetTestDataVersion>
<SystemPrivateRuntimeUnicodeDataVersion>6.0.0-beta.21371.1</SystemPrivateRuntimeUnicodeDataVersion>
<SystemRuntimeTimeZoneDataVersion>6.0.0-beta.21371.1</SystemRuntimeTimeZoneDataVersion>
<SystemSecurityCryptographyX509CertificatesTestDataVersion>6.0.0-beta.21371.1</SystemSecurityCryptographyX509CertificatesTestDataVersion>
<SystemWindowsExtensionsTestDataVersion>6.0.0-beta.21371.1</SystemWindowsExtensionsTestDataVersion>
<!-- dotnet-optimization dependencies -->
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.21313.4</optimizationwindows_ntx64MIBCRuntimeVersion>
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.21313.4</optimizationwindows_ntx86MIBCRuntimeVersion>
<optimizationlinuxx64MIBCRuntimeVersion>1.0.0-prerelease.21313.4</optimizationlinuxx64MIBCRuntimeVersion>
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.21313.4</optimizationPGOCoreCLRVersion>
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.21371.3</optimizationwindows_ntx64MIBCRuntimeVersion>
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.21371.3</optimizationwindows_ntx86MIBCRuntimeVersion>
<optimizationlinuxx64MIBCRuntimeVersion>1.0.0-prerelease.21371.3</optimizationlinuxx64MIBCRuntimeVersion>
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.21371.3</optimizationPGOCoreCLRVersion>
<!-- Not auto-updated. -->
<MicrosoftDiaSymReaderNativeVersion>16.9.0-beta1.21055.5</MicrosoftDiaSymReaderNativeVersion>
<SystemCommandLineVersion>2.0.0-beta1.20253.1</SystemCommandLineVersion>
@ -138,7 +143,7 @@
These are used as reference assemblies only, so they must not take a ProdCon/source-build
version. Insert "RefOnly" to avoid assignment via PVP.
-->
<RefOnlyMicrosoftBuildVersion>16.8.0</RefOnlyMicrosoftBuildVersion>
<RefOnlyMicrosoftBuildVersion>16.10.0</RefOnlyMicrosoftBuildVersion>
<RefOnlyMicrosoftBuildFrameworkVersion>$(RefOnlyMicrosoftBuildVersion)</RefOnlyMicrosoftBuildFrameworkVersion>
<RefOnlyMicrosoftBuildTasksCoreVersion>$(RefOnlyMicrosoftBuildVersion)</RefOnlyMicrosoftBuildTasksCoreVersion>
<RefOnlyMicrosoftBuildUtilitiesCoreVersion>$(RefOnlyMicrosoftBuildVersion)</RefOnlyMicrosoftBuildUtilitiesCoreVersion>
@ -147,9 +152,9 @@
<!-- Testing -->
<MicrosoftNETCoreCoreDisToolsVersion>1.0.1-prerelease-00006</MicrosoftNETCoreCoreDisToolsVersion>
<MicrosoftNETTestSdkVersion>16.9.0-preview-20201201-01</MicrosoftNETTestSdkVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.21314.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.21314.1</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>1.0.1-alpha.0.21311.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.21370.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.21370.1</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>1.0.1-alpha.0.21369.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
<XUnitVersion>2.4.1</XUnitVersion>
<XUnitRunnerVisualStudioVersion>2.4.2</XUnitRunnerVisualStudioVersion>
<CoverletCollectorVersion>1.3.0</CoverletCollectorVersion>
@ -157,25 +162,32 @@
<SQLitePCLRawbundle_greenVersion>2.0.4</SQLitePCLRawbundle_greenVersion>
<MoqVersion>4.12.0</MoqVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<SdkVersionForWorkloadTesting>6.0.100-rc.1.21370.2</SdkVersionForWorkloadTesting>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>5.0.0-preview-20201009.2</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
<MicrosoftNETILLinkTasksVersion>6.0.100-preview.6.21310.3</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkTasksVersion>6.0.100-preview.6.21376.2</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-preview.6.21307.1</MicrosoftNETCoreRuntimeICUTransportVersion>
<MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-rc.1.21369.1</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
<SystemNetMsQuicTransportVersion>6.0.0-preview.7.21376.1</SystemNetMsQuicTransportVersion>
<!-- Mono LLVM -->
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21308.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21308.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21308.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21308.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21308.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21308.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21308.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21308.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21369.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21369.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21369.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21369.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21369.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21369.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.21369.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.21369.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<!-- emscripten / Node -->
<MicrosoftNETRuntimeEmscripten2021Nodewinx64Version>6.0.0-preview.6.21275.1</MicrosoftNETRuntimeEmscripten2021Nodewinx64Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETRuntimeEmscripten2021Nodewinx64Version)</MicrosoftNETRuntimeEmscriptenVersion>
<MicrosoftNETWorkloadEmscriptenManifest60100Version>6.0.0-rc.1.21369.1</MicrosoftNETWorkloadEmscriptenManifest60100Version>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenManifest60100Version)</MicrosoftNETRuntimeEmscriptenVersion>
<!-- workloads -->
<SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion>
<WixPackageVersion>3.14.0-dotnet</WixPackageVersion>
<MonoWorkloadManifestVersion>6.0.0-preview.5.21275.7</MonoWorkloadManifestVersion>
<!-- Experimental -->
<MicrosoftInteropDllImportGeneratorVersion>1.0.0-alpha.21301.2</MicrosoftInteropDllImportGeneratorVersion>
</PropertyGroup>

View file

@ -158,4 +158,10 @@ if ($dotnet5Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']")
if ($dotnet6Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
$doc.Save($filename)

View file

@ -129,6 +129,30 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet5-internal-transport')
fi
# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present
grep -i "<add key=\"dotnet6\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet6-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet6-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet6-internal')
grep -i "<add key=\"dotnet6-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet6-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet6-internal-transport')
fi
# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'

View file

@ -33,7 +33,6 @@ __AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
__AlpinePackages+=" linux-headers"
__AlpinePackagesEdgeCommunity=" lldb-dev"
__AlpinePackagesEdgeMain=" llvm10-libs"
__AlpinePackagesEdgeMain+=" python3"
__AlpinePackagesEdgeMain+=" libedit"
@ -115,6 +114,8 @@ while :; do
__UbuntuArch=s390x
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp-dev//')
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//')
unset __LLDB_Package
;;
x86)
@ -191,6 +192,8 @@ while :; do
__CodeName=alpine
__UbuntuRepo=
__AlpineVersion=3.9
__AlpinePackagesEdgeMain+=" llvm11-libs"
__AlpinePackagesEdgeMain+=" clang-libs"
;;
alpine3.13)
__CodeName=alpine
@ -201,6 +204,7 @@ while :; do
__AlpinePackagesEdgeCommunity=
__AlpinePackages+=$__AlpinePackagesEdgeMain
__AlpinePackagesEdgeMain=
__AlpinePackages+=" llvm10-libs"
;;
freebsd11)
__FreeBSDBase="11.3-RELEASE"

View file

@ -25,8 +25,15 @@ Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to
# Template files
$jsonFiles = @()
$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\en\..+\.json" } # .NET templating pattern
$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
$jsonTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern
$jsonTemplateFiles | ForEach-Object {
$null = $_.Name -Match "(.+)\.[\w-]+\.json" # matches '[filename].[langcode].json
$destinationFile = "$($_.Directory.FullName)\$($Matches.1).json"
$jsonFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
}
$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
$xlfFiles = @()
@ -44,7 +51,7 @@ $langXlfFiles | ForEach-Object {
$xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
}
$locFiles = $jsonFiles + $xlfFiles
$locFiles = $jsonFiles + $jsonWinformsTemplateFiles + $xlfFiles
$locJson = @{
Projects = @(

View file

@ -0,0 +1,109 @@
Param(
[string] $GuardianCliLocation,
[string] $WorkingDirectory,
[string] $TargetDirectory,
[string] $GdnFolder,
# The list of Guardian tools to configure. For each object in the array:
# - If the item is a [hashtable], it must contain these entries:
# - Name = The tool name as Guardian knows it.
# - Scenario = (Optional) Scenario-specific name for this configuration entry. It must be unique
# among all tool entries with the same Name.
# - Args = (Optional) Array of Guardian tool configuration args, like '@("Target > C:\temp")'
# - If the item is a [string] $v, it is treated as '@{ Name="$v" }'
[object[]] $ToolsList,
[string] $GuardianLoggerLevel='Standard',
# Optional: Additional params to add to any tool using CredScan.
[string[]] $CrScanAdditionalRunConfigParams,
# Optional: Additional params to add to any tool using PoliCheck.
[string[]] $PoliCheckAdditionalRunConfigParams
)
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$global:LASTEXITCODE = 0
try {
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
# Normalize tools list: all in [hashtable] form with defined values for each key.
$ToolsList = $ToolsList |
ForEach-Object {
if ($_ -is [string]) {
$_ = @{ Name = $_ }
}
if (-not ($_['Scenario'])) { $_.Scenario = "" }
if (-not ($_['Args'])) { $_.Args = @() }
$_
}
Write-Host "List of tools to configure:"
$ToolsList | ForEach-Object { $_ | Out-String | Write-Host }
# We store config files in the r directory of .gdn
$gdnConfigPath = Join-Path $GdnFolder 'r'
$ValidPath = Test-Path $GuardianCliLocation
if ($ValidPath -eq $False)
{
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
ExitWithExitCode 1
}
foreach ($tool in $ToolsList) {
# Put together the name and scenario to make a unique key.
$toolConfigName = $tool.Name
if ($tool.Scenario) {
$toolConfigName += "_" + $tool.Scenario
}
Write-Host "=== Configuring $toolConfigName..."
$gdnConfigFile = Join-Path $gdnConfigPath "$toolConfigName-configure.gdnconfig"
# For some tools, add default and automatic args.
if ($tool.Name -eq 'credscan') {
if ($targetDirectory) {
$tool.Args += "TargetDirectory < $TargetDirectory"
}
$tool.Args += "OutputType < pre"
$tool.Args += $CrScanAdditionalRunConfigParams
} elseif ($tool.Name -eq 'policheck') {
if ($targetDirectory) {
$tool.Args += "Target < $TargetDirectory"
}
$tool.Args += $PoliCheckAdditionalRunConfigParams
}
# Create variable pointing to the args array directly so we can use splat syntax later.
$toolArgs = $tool.Args
# Configure the tool. If args array is provided or the current tool has some default arguments
# defined, add "--args" and splat each element on the end. Arg format is "{Arg id} < {Value}",
# one per parameter. Doc page for "guardian configure":
# https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1395/configure
Exec-BlockVerbosely {
& $GuardianCliLocation configure `
--working-directory $WorkingDirectory `
--tool $tool.Name `
--output-path $gdnConfigFile `
--logger-level $GuardianLoggerLevel `
--noninteractive `
--force `
$(if ($toolArgs) { "--args" }) @toolArgs
Exit-IfNZEC "Sdl"
}
Write-Host "Created '$toolConfigName' configuration file: $gdnConfigFile"
}
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}

View file

@ -7,8 +7,17 @@ Param(
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
# Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list
# format.
[object[]] $SourceToolsList,
# Optional: list of SDL tools to run on built artifacts. See 'configure-sdl-tool.ps1' for tools
# list format.
[object[]] $ArtifactToolsList,
# Optional: list of SDL tools to run without automatically specifying a target directory. See
# 'configure-sdl-tool.ps1' for tools list format.
[object[]] $CustomToolsList,
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
@ -63,13 +72,16 @@ try {
ExitWithExitCode 1
}
Exec-BlockVerbosely {
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
}
$gdnFolder = Join-Path $workingDirectory '.gdn'
if ($TsaOnboard) {
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
Exec-BlockVerbosely {
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
}
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
@ -80,11 +92,41 @@ try {
}
}
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
# Configure a list of tools with a default target directory. Populates the ".gdn/r" directory.
function Configure-ToolsList([object[]] $tools, [string] $targetDirectory) {
if ($tools -and $tools.Count -gt 0) {
Exec-BlockVerbosely {
& $(Join-Path $PSScriptRoot 'configure-sdl-tool.ps1') `
-GuardianCliLocation $guardianCliLocation `
-WorkingDirectory $workingDirectory `
-TargetDirectory $targetDirectory `
-GdnFolder $gdnFolder `
-ToolsList $tools `
-AzureDevOpsAccessToken $AzureDevOpsAccessToken `
-GuardianLoggerLevel $GuardianLoggerLevel `
-CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams `
-PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
if ($BreakOnFailure) {
Exit-IfNZEC "Sdl"
}
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
}
}
# Configure Artifact and Source tools with default Target directories.
Configure-ToolsList $ArtifactToolsList $ArtifactsDirectory
Configure-ToolsList $SourceToolsList $SourceDirectory
# Configure custom tools with no default Target directory.
Configure-ToolsList $CustomToolsList $null
# At this point, all tools are configured in the ".gdn" directory. Run them all in a single call.
# (If we used "run" multiple times, each run would overwrite data from earlier runs.)
Exec-BlockVerbosely {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') `
-GuardianCliLocation $guardianCliLocation `
-WorkingDirectory $workingDirectory `
-UpdateBaseline $UpdateBaseline `
-GdnFolder $gdnFolder
}
if ($TsaPublish) {
@ -92,8 +134,9 @@ try {
if (-not $TsaRepositoryName) {
$TsaRepositoryName = "$($Repository)-$($BranchName)"
}
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
Exec-BlockVerbosely {
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
}
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
@ -106,7 +149,11 @@ try {
if ($BreakOnFailure) {
Write-Host "Failing the build in case of breaking results..."
& $guardianCliLocation break
Exec-BlockVerbosely {
& $guardianCliLocation break --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
}
} else {
Write-Host "Letting the build pass even if there were breaking results..."
}
}
catch {

View file

@ -0,0 +1,63 @@
# This script looks for each archive file in a directory and extracts it into the target directory.
# For example, the file "$InputPath/bin.tar.gz" extracts to "$ExtractPath/bin.tar.gz.extracted/**".
# Uses the "tar" utility added to Windows 10 / Windows 2019 that supports tar.gz and zip.
param(
# Full path to directory where archives are stored.
[Parameter(Mandatory=$true)][string] $InputPath,
# Full path to directory to extract archives into. May be the same as $InputPath.
[Parameter(Mandatory=$true)][string] $ExtractPath
)
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
try {
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
Measure-Command {
$jobs = @()
# Find archive files for non-Windows and Windows builds.
$archiveFiles = @(
Get-ChildItem (Join-Path $InputPath "*.tar.gz")
Get-ChildItem (Join-Path $InputPath "*.zip")
)
foreach ($targzFile in $archiveFiles) {
$jobs += Start-Job -ScriptBlock {
$file = $using:targzFile
$fileName = [System.IO.Path]::GetFileName($file)
$extractDir = Join-Path $using:ExtractPath "$fileName.extracted"
New-Item $extractDir -ItemType Directory -Force | Out-Null
Write-Host "Extracting '$file' to '$extractDir'..."
# Pipe errors to stdout to prevent PowerShell detecting them and quitting the job early.
# This type of quit skips the catch, so we wouldn't be able to tell which file triggered the
# error. Save output so it can be stored in the exception string along with context.
$output = tar -xf $file -C $extractDir 2>&1
# Handle NZEC manually rather than using Exit-IfNZEC: we are in a background job, so we
# don't have access to the outer scope.
if ($LASTEXITCODE -ne 0) {
throw "Error extracting '$file': non-zero exit code ($LASTEXITCODE). Output: '$output'"
}
Write-Host "Extracted to $extractDir"
}
}
Receive-Job $jobs -Wait
}
}
catch {
Write-Host $_
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}

View file

@ -1,13 +1,9 @@
Param(
[string] $GuardianCliLocation,
[string] $WorkingDirectory,
[string] $TargetDirectory,
[string] $GdnFolder,
[string[]] $ToolsList,
[string] $UpdateBaseline,
[string] $GuardianLoggerLevel='Standard',
[string[]] $CrScanAdditionalRunConfigParams,
[string[]] $PoliCheckAdditionalRunConfigParams
[string] $GuardianLoggerLevel='Standard'
)
$ErrorActionPreference = 'Stop'
@ -23,7 +19,6 @@ try {
. $PSScriptRoot\..\tools.ps1
# We store config files in the r directory of .gdn
Write-Host $ToolsList
$gdnConfigPath = Join-Path $GdnFolder 'r'
$ValidPath = Test-Path $GuardianCliLocation
@ -33,37 +28,18 @@ try {
ExitWithExitCode 1
}
$configParam = @('--config')
$gdnConfigFiles = Get-ChildItem $gdnConfigPath -Recurse -Include '*.gdnconfig'
Write-Host "Discovered Guardian config files:"
$gdnConfigFiles | Out-String | Write-Host
foreach ($tool in $ToolsList) {
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
Write-Host $tool
# We have to manually configure tools that run on source to look at the source directory only
if ($tool -eq 'credscan') {
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
}
if ($tool -eq 'policheck') {
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
}
$configParam+=$gdnConfigFile
}
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
Exec-BlockVerbosely {
& $GuardianCliLocation run `
--working-directory $WorkingDirectory `
--baseline mainbaseline `
--update-baseline $UpdateBaseline `
--logger-level $GuardianLoggerLevel `
--config @gdnConfigFiles
Exit-IfNZEC "Sdl"
}
}
catch {

View file

@ -2,17 +2,41 @@ parameters:
enable: 'false' # Whether the SDL validation job should execute or not
overrideParameters: '' # Optional: to override values for parameters.
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
# Optional: if specified, restore and use this version of Guardian instead of the default.
overrideGuardianVersion: ''
# Optional: if true, publish the '.gdn' folder as a pipeline artifact. This can help with in-depth
# diagnosis of problems with specific tool configurations.
publishGuardianDirectoryToPipeline: false
# The script to run to execute all SDL tools. Use this if you want to use a script to define SDL
# parameters rather than relying on YAML. It may be better to use a local script, because you can
# reproduce results locally without piecing together a command based on the YAML.
executeAllSdlToolsScript: 'eng/common/sdl/execute-all-sdl-tools.ps1'
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
# 'continueOnError', the parameter value is not correctly picked up.
# This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter
sdlContinueOnError: false # optional: determines whether to continue the build if the step errors;
downloadArtifacts: true # optional: determines if the artifacts should be dowloaded
# optional: determines if build artifacts should be downloaded.
downloadArtifacts: true
# optional: determines if this job should search the directory of downloaded artifacts for
# 'tar.gz' and 'zip' archive files and extract them before running SDL validation tasks.
extractArchiveArtifacts: false
dependsOn: '' # Optional: dependencies of the job
artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts
# Usage:
# artifactNames:
# - 'BlobArtifacts'
# - 'Artifacts_Windows_NT_Release'
# Optional: download a list of pipeline artifacts. 'downloadArtifacts' controls build artifacts,
# not pipeline artifacts, so doesn't affect the use of this parameter.
pipelineArtifactNames: []
# Optional: location and ID of the AzDO build that the build/pipeline artifacts should be
# downloaded from. By default, uses runtime expressions to decide based on the variables set by
# the 'setupMaestroVars' dependency. Overriding this parameter is necessary if SDL tasks are
# running without Maestro++/BAR involved, or to download artifacts from a specific existing build
# to iterate quickly on SDL changes.
AzDOProjectName: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
AzDOPipelineId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
AzDOBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
jobs:
- job: Run_SDL
@ -22,16 +46,29 @@ jobs:
variables:
- group: DotNet-VSTS-Bot
- name: AzDOProjectName
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
value: ${{ parameters.AzDOProjectName }}
- name: AzDOPipelineId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
value: ${{ parameters.AzDOPipelineId }}
- name: AzDOBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
value: ${{ parameters.AzDOBuildId }}
# The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in
# sync with the packages.config file.
- name: DefaultGuardianVersion
value: 0.53.3
- name: GuardianVersion
value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }}
- name: GuardianPackagesConfigFile
value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
pool:
# To extract archives (.tar.gz, .zip), we need access to "tar", added in Windows 10/2019.
${{ if eq(parameters.extractArchiveArtifacts, 'false') }}:
name: Hosted VS2017
${{ if ne(parameters.extractArchiveArtifacts, 'false') }}:
vmImage: windows-2019
steps:
- checkout: self
clean: true
- ${{ if ne(parameters.downloadArtifacts, 'false')}}:
- ${{ if ne(parameters.artifactNames, '') }}:
- ${{ each artifactName in parameters.artifactNames }}:
@ -59,16 +96,51 @@ jobs:
itemPattern: "**"
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
checkDownloadedFiles: true
- ${{ each artifactName in parameters.pipelineArtifactNames }}:
- task: DownloadPipelineArtifact@2
displayName: Download Pipeline Artifacts
inputs:
buildType: specific
buildVersionToDownload: specific
project: $(AzDOProjectName)
pipeline: $(AzDOPipelineId)
buildId: $(AzDOBuildId)
artifactName: ${{ artifactName }}
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
checkDownloadedFiles: true
- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
displayName: Extract Blob Artifacts
continueOnError: ${{ parameters.sdlContinueOnError }}
- powershell: eng/common/sdl/extract-artifact-packages.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
displayName: Extract Package Artifacts
continueOnError: ${{ parameters.sdlContinueOnError }}
- ${{ if ne(parameters.extractArchiveArtifacts, 'false') }}:
- powershell: eng/common/sdl/extract-artifact-archives.ps1
-InputPath $(Build.ArtifactStagingDirectory)\artifacts
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts
displayName: Extract Archive Artifacts
continueOnError: ${{ parameters.sdlContinueOnError }}
- ${{ if ne(parameters.overrideGuardianVersion, '') }}:
- powershell: |
$content = Get-Content $(GuardianPackagesConfigFile)
Write-Host "packages.config content was:`n$content"
$content = $content.Replace('$(DefaultGuardianVersion)', '$(GuardianVersion)')
$content | Set-Content $(GuardianPackagesConfigFile)
Write-Host "packages.config content updated to:`n$content"
displayName: Use overridden Guardian version ${{ parameters.overrideGuardianVersion }}
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
- task: NuGetCommand@2
@ -79,15 +151,35 @@ jobs:
nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config
externalFeedCredentials: GuardianConnect
restoreDirectory: $(Build.SourcesDirectory)\.packages
- ${{ if ne(parameters.overrideParameters, '') }}:
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1 ${{ parameters.overrideParameters }}
- powershell: ${{ parameters.executeAllSdlToolsScript }} ${{ parameters.overrideParameters }}
displayName: Execute SDL
continueOnError: ${{ parameters.sdlContinueOnError }}
- ${{ if eq(parameters.overrideParameters, '') }}:
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1
-GuardianPackageName Microsoft.Guardian.Cli.0.53.3
- powershell: ${{ parameters.executeAllSdlToolsScript }}
-GuardianPackageName Microsoft.Guardian.Cli.$(GuardianVersion)
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
${{ parameters.additionalParameters }}
displayName: Execute SDL
continueOnError: ${{ parameters.sdlContinueOnError }}
- ${{ if ne(parameters.publishGuardianDirectoryToPipeline, 'false') }}:
# We want to publish the Guardian results and configuration for easy diagnosis. However, the
# '.gdn' dir is a mix of configuration, results, extracted dependencies, and Guardian default
# tooling files. Some of these files are large and aren't useful during an investigation, so
# exclude them by simply deleting them before publishing. (As of writing, there is no documented
# way to selectively exclude a dir from the pipeline artifact publish task.)
- task: DeleteFiles@1
displayName: Delete Guardian dependencies to avoid uploading
inputs:
SourceFolder: $(Agent.BuildDirectory)/.gdn
Contents: |
c
i
condition: succeededOrFailed()
- publish: $(Agent.BuildDirectory)/.gdn
artifact: GuardianConfiguration
displayName: Publish GuardianConfiguration
condition: succeededOrFailed()

View file

@ -7,9 +7,13 @@ parameters:
binlogPath: artifacts/log/Debug/Build.binlog
pool:
vmImage: vs2017-win2016
condition: ''
dependsOn: ''
jobs:
- job: SourceIndexStage1
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.condition }}
variables:
- name: SourceIndexPackageVersion
value: ${{ parameters.sourceIndexPackageVersion }}

View file

@ -14,7 +14,7 @@ parameters:
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
defaultManagedPlatform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-20210714125435-9b5bbc2'
# Defines the platforms on which to run build jobs. One job is created for each platform, and the
# object in this array is sent to the job template as 'platform'. If no platforms are specified,

View file

@ -42,7 +42,7 @@
[bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true }
# Enable repos to use a particular version of the on-line dotnet-install scripts.
# default URL: https://dot.net/v1/dotnet-install.ps1
# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
# True to use global NuGet cache instead of restoring packages to repository-local directory.
@ -106,6 +106,46 @@ function Exec-Process([string]$command, [string]$commandArgs) {
}
}
# Take the given block, print it, print what the block probably references from the current set of
# variables using low-effort string matching, then run the block.
#
# This is intended to replace the pattern of manually copy-pasting a command, wrapping it in quotes,
# and printing it using "Write-Host". The copy-paste method is more readable in build logs, but less
# maintainable and less reliable. It is easy to make a mistake and modify the command without
# properly updating the "Write-Host" line, resulting in misleading build logs. The probability of
# this mistake makes the pattern hard to trust when it shows up in build logs. Finding the bug in
# existing source code can also be difficult, because the strings are not aligned to each other and
# the line may be 300+ columns long.
#
# By removing the need to maintain two copies of the command, Exec-BlockVerbosely avoids the issues.
#
# In Bash (or any posix-like shell), "set -x" prints usable verbose output automatically.
# "Set-PSDebug" appears to be similar at first glance, but unfortunately, it isn't very useful: it
# doesn't print any info about the variables being used by the command, which is normally the
# interesting part to diagnose.
function Exec-BlockVerbosely([scriptblock] $block) {
Write-Host "--- Running script block:"
$blockString = $block.ToString().Trim()
Write-Host $blockString
Write-Host "--- List of variables that might be used:"
# For each variable x in the environment, check the block for a reference to x via simple "$x" or
# "@x" syntax. This doesn't detect other ways to reference variables ("${x}" nor "$variable:x",
# among others). It only catches what this function was originally written for: simple
# command-line commands.
$variableTable = Get-Variable |
Where-Object {
$blockString.Contains("`$$($_.Name)") -or $blockString.Contains("@$($_.Name)")
} |
Format-Table -AutoSize -HideTableHeaders -Wrap |
Out-String
Write-Host $variableTable.Trim()
Write-Host "--- Executing:"
& $block
Write-Host "--- Done running script block!"
}
# createSdkLocationFile parameter enables a file being generated under the toolset directory
# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
# as dot sourcing isn't possible.
@ -223,7 +263,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
$uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
Retry({
Write-Host "GET $uri"
@ -378,7 +418,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
}
$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
return $global:_MSBuildExe = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin\msbuild.exe"
$local:BinFolder = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin"
$local:Prefer64bit = if (Get-Member -InputObject $vsRequirements -Name 'Prefer64bit') { $vsRequirements.Prefer64bit } else { $false }
if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder "amd64"))) {
$global:_MSBuildExe = Join-Path $local:BinFolder "amd64\msbuild.exe"
} else {
$global:_MSBuildExe = Join-Path $local:BinFolder "msbuild.exe"
}
return $global:_MSBuildExe
}
function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [string] $vsMajorVersion) {
@ -623,6 +672,17 @@ function ExitWithExitCode([int] $exitCode) {
exit $exitCode
}
# Check if $LASTEXITCODE is a nonzero exit code (NZEC). If so, print a Azure Pipeline error for
# diagnostics, then exit the script with the $LASTEXITCODE.
function Exit-IfNZEC([string] $category = "General") {
Write-Host "Exit code $LASTEXITCODE"
if ($LASTEXITCODE -ne 0) {
$message = "Last command failed with exit code $LASTEXITCODE."
Write-PipelineTelemetryError -Force -Category $category -Message $message
ExitWithExitCode $LASTEXITCODE
}
}
function Stop-Processes() {
Write-Host 'Killing running build processes...'
foreach ($processName in $processesToStopOnExit) {

View file

@ -54,7 +54,7 @@ warn_as_error=${warn_as_error:-true}
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
# Enable repos to use a particular version of the on-line dotnet-install scripts.
# default URL: https://dot.net/v1/dotnet-install.sh
# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'}
# True to use global NuGet cache instead of restoring packages to repository-local directory.
@ -262,7 +262,7 @@ function with_retries {
function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
local install_script_url="https://dot.net/$dotnetInstallScriptVersion/dotnet-install.sh"
local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
if [[ ! -a "$install_script" ]]; then
mkdir -p "$root"

View file

@ -1,6 +1,6 @@
# Builds and copies library artifacts into target dotnet sdk image
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-f39df28-20191023143754
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:5.0-buster-slim
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
FROM $BUILD_BASE_IMAGE as corefxbuild

View file

@ -1,6 +1,6 @@
# escape=`
# Simple Dockerfile which copies library build artifacts into target dotnet sdk image
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:5.0-nanoserver-1809
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-nanoserver-1809
FROM $SDK_BASE_IMAGE as target
ARG TESTHOST_LOCATION=".\\artifacts\\bin\\testhost"

View file

@ -1,6 +1,6 @@
# Builds and copies library artifacts into target dotnet sdk image
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-f39df28-20191023143754
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:5.0-buster-slim
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
FROM $BUILD_BASE_IMAGE as corefxbuild

View file

@ -1,6 +1,6 @@
# escape=`
# Simple Dockerfile which copies clr and library build artifacts into target dotnet sdk image
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:5.0-nanoserver-1809
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-nanoserver-1809
FROM $SDK_BASE_IMAGE as target
ARG TESTHOST_LOCATION=".\\artifacts\\bin\\testhost"

View file

@ -35,9 +35,9 @@
<LibrariesAllConfigShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesAllConfigPackagesDir)', 'Shipping'))</LibrariesAllConfigShippingPackagesDir>
<LibrariesAllConfigNonShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesAllConfigPackagesDir)', 'NonShipping'))</LibrariesAllConfigNonShippingPackagesDir>
<LibrariesSharedFrameworkRefArtifactsPath Condition="'$(LibrariesSharedFrameworkRefArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'ref', 'microsoft.netcore.app', '$(LibrariesConfiguration)'))</LibrariesSharedFrameworkRefArtifactsPath>
<LibrariesSharedFrameworkRefArtifactsPath Condition="'$(LibrariesSharedFrameworkRefArtifactsPath)' == ''">$(MicrosoftNetCoreAppRefPackRefDir)</LibrariesSharedFrameworkRefArtifactsPath>
<LibrariesAllRefArtifactsPath Condition="'$(LibrariesAllRefArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'ref', '$(NetCoreAppCurrent)'))</LibrariesAllRefArtifactsPath>
<LibrariesSharedFrameworkBinArtifactsPath Condition="'$(LibrariesSharedFrameworkBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'pkg', '$(NetCoreAppCurrent)', 'runtime'))$(LibrariesTargetOSConfigurationArchitecture)\</LibrariesSharedFrameworkBinArtifactsPath>
<LibrariesSharedFrameworkBinArtifactsPath Condition="'$(LibrariesSharedFrameworkBinArtifactsPath)' == ''">$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</LibrariesSharedFrameworkBinArtifactsPath>
<LibrariesAllBinArtifactsPath Condition="'$(LibrariesAllBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'runtime'))$(NetCoreAppCurrent)-$(LibrariesTargetOSConfigurationArchitecture)\</LibrariesAllBinArtifactsPath>
<LibrariesNativeArtifactsPath Condition="'$(LibrariesNativeArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'native'))$(NetCoreAppCurrent)-$(LibrariesTargetOSConfigurationArchitecture)\</LibrariesNativeArtifactsPath>
@ -109,6 +109,8 @@
<IsNative>true</IsNative>
</RuntimeFiles>
<FrameworkReleaseFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'" Include="$(MonoArtifactsPath)\Mono.release.framework\*.*" />
<FrameworkDebugFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'" Include="$(MonoArtifactsPath)\Mono.debug.framework\*.*" />
<MonoIncludeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="$(MonoArtifactsPath)\include\**\*.*" />
</ItemGroup>
@ -176,7 +178,7 @@
$(LibrariesNativeArtifactsPath)src\*.c;
$(LibrariesNativeArtifactsPath)src\*.js;
$(LibrariesNativeArtifactsPath)src\emcc-default.rsp;
$(LibrariesNativeArtifactsPath)src\Emcc.props;"
$(LibrariesNativeArtifactsPath)src\emcc-props.json;"
NativeSubDirectory="src"
IsNative="true" />
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser'"

View file

@ -48,7 +48,10 @@ add_compile_definitions("$<$<CONFIG:CHECKED>:DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDL
add_compile_definitions("$<$<OR:$<CONFIG:RELEASE>,$<CONFIG:RELWITHDEBINFO>>:NDEBUG;URTBLDENV_FRIENDLY=Retail>")
if (MSVC)
add_linker_flag(/GUARD:CF)
add_linker_flag(/guard:cf)
#if (CLR_CMAKE_HOST_ARCH_AMD64)
# add_linker_flag(/guard:ehcont)
#endif (CLR_CMAKE_HOST_ARCH_AMD64)
# Linker flags
#
@ -71,6 +74,10 @@ if (MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070,4221")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}")
#if (CLR_CMAKE_HOST_ARCH_AMD64)
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /CETCOMPAT")
#endif (CLR_CMAKE_HOST_ARCH_AMD64)
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
@ -393,30 +400,33 @@ if (CLR_CMAKE_HOST_UNIX)
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
set(DISABLE_OVERRIDING_MIN_VERSION_ERROR -Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
set(MACOS_VERSION_MIN_FLAGS "-target arm64-apple-ios14.2-macabi")
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
set(MACOS_VERSION_MIN_FLAGS "-target x86_64-apple-ios13.5-macabi")
add_link_options(-target x86_64-apple-ios13.5-macabi)
else()
clr_unknown_arch()
endif()
# These options are intentionally set using the CMAKE_XXX_FLAGS instead of
# add_compile_options so that they take effect on the configuration functions
# in various configure.cmake files.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
else()
if(CLR_CMAKE_HOST_ARCH_ARM64)
# 'pthread_jit_write_protect_np' is only available on macOS 11.0 or newer
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=11.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
add_compile_options(-arch arm64)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.13)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13")
add_compile_options(-arch x86_64)
else()
clr_unknown_arch()
endif()
add_compile_options(${MACOS_VERSION_MIN_FLAGS})
add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
endif(CLR_CMAKE_TARGET_MACCATALYST)
endif(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_MACCATALYST)
@ -562,6 +572,14 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
# Enable EH-continuation table for native components for amd64 builds
# Added using variables instead of add_compile_options to let individual projects override it
if (CLR_CMAKE_HOST_ARCH_AMD64)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:ehcont")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:ehcont")
set(CMAKE_ASM_MASM_FLAGS "${CMAKE_C_FLAGS} /guard:ehcont")
endif (CLR_CMAKE_HOST_ARCH_AMD64)
# Statically linked CRT (libcmt[d].lib, libvcruntime[d].lib and libucrt[d].lib) by default. This is done to avoid
# linking in VCRUNTIME140.DLL for a simplified xcopy experience by reducing the dependency on VC REDIST.
#

View file

@ -65,12 +65,14 @@ endif()
if (NOT CLR_CMAKE_HOST_WIN32)
# detect linker
set(ldVersion ${CMAKE_C_COMPILER};-Wl,--version)
separate_arguments(ldVersion UNIX_COMMAND "${CMAKE_C_COMPILER} ${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version")
execute_process(COMMAND ${ldVersion}
ERROR_QUIET
OUTPUT_VARIABLE ldVersionOutput)
if("${ldVersionOutput}" MATCHES "GNU ld" OR "${ldVersionOutput}" MATCHES "GNU gold" OR "${ldVersionOutput}" MATCHES "GNU linkers")
if("${ldVersionOutput}" MATCHES "LLD")
set(LD_LLVM 1)
elseif("${ldVersionOutput}" MATCHES "GNU ld" OR "${ldVersionOutput}" MATCHES "GNU gold" OR "${ldVersionOutput}" MATCHES "GNU linkers")
set(LD_GNU 1)
elseif("${ldVersionOutput}" MATCHES "Solaris Link")
set(LD_SOLARIS 1)

View file

@ -157,7 +157,7 @@ function(preprocess_files PreprocessedFilesList)
endfunction()
function(set_exports_linker_option exports_filename)
if(LD_GNU OR LD_SOLARIS)
if(LD_GNU OR LD_SOLARIS OR LD_LLVM)
# Add linker exports file option
if(LD_SOLARIS)
set(EXPORTS_LINKER_OPTION -Wl,-M,${exports_filename} PARENT_SCOPE)

View file

@ -98,7 +98,7 @@ if [[ "$build_arch" == "wasm" ]]; then
fi
cmake_args_to_cache="$scan_build\n$SCAN_BUILD_COMMAND\n$generator\n$__UnprocessedCMakeArgs"
cmake_args_cache_file="$__CMakeBinDir/cmake_cmd_line.txt"
cmake_args_cache_file="$2/cmake_cmd_line.txt"
if [[ -z "$__ConfigureOnly" ]]; then
if [[ -e "$cmake_args_cache_file" ]]; then
cmake_args_cache=$(<"$cmake_args_cache_file")

View file

@ -22,6 +22,7 @@ minorVersion="$4"
# clear the existing CC and CXX from environment
CC=
CXX=
LDFLAGS=
if [[ "$compiler" == "gcc" ]]; then cxxCompiler="g++"; fi
@ -106,6 +107,15 @@ if [[ -z "$CC" ]]; then
exit 1
fi
if [[ "$compiler" == "clang" ]]; then
if command -v "lld$desired_version" > /dev/null; then
# Only lld version >= 9 can be considered stable
if [[ "$majorVersion" -ge 9 ]]; then
LDFLAGS="-fuse-ld=lld"
fi
fi
fi
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
export CC CXX SCAN_BUILD_COMMAND
export CC CXX LDFLAGS SCAN_BUILD_COMMAND

View file

@ -13,13 +13,10 @@
<PackageVersion Condition="'$(PackageVersion)' == '' and '$(MSBuildProjectExtension)' == '.pkgproj'">6.0.0</PackageVersion>
<SkipValidatePackageTargetFramework>true</SkipValidatePackageTargetFramework>
<SkipGenerationCheck>true</SkipGenerationCheck>
<DefaultAllowedOutputExtensionsInPackageBuildOutputFolder>.dll;.exe;.winmd;.json;.pri;</DefaultAllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
<!-- Don't build referenced projects -->
<BuildPackageLibraryReferences>false</BuildPackageLibraryReferences>
<!-- Omit any files that were not built -->
<AllowPartialPackages>true</AllowPartialPackages>
<!-- Don't permit harvesting since this requires pre-builts -->
<HarvestStablePackage>false</HarvestStablePackage>
<!-- Validation will fail in case we were relying on harvested assets or assets not built to satisfy stated support -->
@ -33,10 +30,6 @@
<Import Condition="Exists('$(PkgDir)baseline\baseline.props') and '$(MSBuildProjectExtension)' == '.pkgproj'" Project="$(PkgDir)baseline\baseline.props" />
<PropertyGroup Condition="'$(IsPackable)' == 'true'">
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<!-- Add a marker to help the designer optimize & share .NET Core packages -->
<None Include="$(PackageDesignerMarkerFile)"
@ -54,4 +47,9 @@
<RuntimeIDs>@(NETCoreApp30RIDs)</RuntimeIDs>
</DefaultValidateFramework>
</ItemGroup>
<!-- TODO: Remove when all required nuget pack features are part of the consumed SDK. -->
<ItemGroup Condition="'$(IsPackable)' == 'true' and '$(IsSourceProject)' == 'true'">
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="$(NuGetBuildTasksPackVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>
</Project>

View file

@ -1,4 +1,15 @@
<Project InitialTargets="_OverridePackDependsOnForCsProjToPkgProj">
<PropertyGroup Condition="'$(IsPackable)' == 'true'">
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificAssemblies;LibIntellisenseDocs</TargetsForTfmSpecificContentInPackage>
<TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeDebugSymbolsWithTfm</TargetsForTfmSpecificDebugSymbolsInPackage>
<IncludeBuildOutput Condition="'$(TargetsAnyOS)' != 'true' or '$(ExcludeFromPackage)' == 'true'">false</IncludeBuildOutput>
<!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
<SuppressDependenciesWhenPacking Condition="'$(ExcludeFromPackage)' == 'true' or ('$(TargetsAnyOS)' != 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0')))">true</SuppressDependenciesWhenPacking>
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$([MSBuild]::Subtract($(MajorVersion), 1)).0.0</PackageValidationBaselineVersion>
</PropertyGroup>
<!-- There are some packages where we require only one ref for a specific framework to be present. In order to avoid problems with this package when targetting
dektop with RAR we will make sure there are no exclude=compile references in the package.
For more info, please check issues:
@ -42,4 +53,30 @@
<MSBuild Projects="$(PkgProjPath)"
Targets="Build" />
</Target>
<Target Name="AddRuntimeSpecificAssemblies"
DependsOnTargets="BuiltProjectOutputGroup;SatelliteDllsProjectOutputGroup;$(TargetsForTfmSpecificBuildOutput)"
Condition="'$(TargetsAnyOS)' != 'true' and '$(ExcludeFromPackage)' == ''">
<ItemGroup>
<TfmSpecificPackageFile Include="@(SatelliteDllsProjectOutputGroupOutput);
@(BuiltProjectOutputGroupOutput)">
<PackagePath>runtimes/$(_runtimeOS)/lib/$(TargetFrameworkWithoutSuffix)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
<!-- Runtime independent symbols are automatically added by the pack task.-->
<Target Name="AddRuntimeDebugSymbolsWithTfm"
Condition="'$(IncludeSymbols)' == 'true' and '$(TargetsAnyOS)' != 'true' and '$(ExcludeFromPackage)' == ''">
<PropertyGroup>
<RuntimeSymbolPath>$([System.IO.Path]::GetDirectoryName($(TargetPath)))\$(TargetName).pdb</RuntimeSymbolPath>
</PropertyGroup>
<ItemGroup Condition="Exists('$(RuntimeSymbolPath)')">
<TfmSpecificDebugSymbolsFile Include="$(RuntimeSymbolPath)">
<TargetPath>/runtimes/$(_runtimeOS)/lib/$(TargetFrameworkWithoutSuffix)/$(TargetName).pdb</TargetPath>
<TargetFramework>$(TargetFrameworkWithoutSuffix)</TargetFramework>
</TfmSpecificDebugSymbolsFile>
</ItemGroup>
</Target>
</Project>

View file

@ -29,12 +29,12 @@ jobs:
- job: evaluate_paths
displayName: Evaluate Paths
pool:
vmImage: 'macOS-10.14'
vmImage: 'ubuntu-latest'
steps:
- checkout: self
clean: true
fetchDepth: $(checkoutFetchDepth)
fetchDepth: 2
- ${{ if ne(parameters.paths[0], '') }}:
- ${{ each path in parameters.paths }}:

View file

@ -83,6 +83,12 @@ jobs:
${{ if ne(parameters.isOfficialBuild, true) }}:
value: ''
- name: _buildDarwinFrameworksParameter
${{ if in(parameters.osGroup, 'iOS', 'tvOS', 'MacCatalyst')}}:
value: /p:BuildDarwinFrameworks=true
${{ if notin(parameters.osGroup, 'iOS', 'tvOS', 'MacCatalyst')}}:
value: ''
- name: _richCodeNavigationParam
${{ if eq(parameters.enableRichCodeNavigation, true) }}:
value: /p:EnableRichCodeNavigation=true
@ -134,7 +140,7 @@ jobs:
displayName: Install native dependencies
# Build
- script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam)
- script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam) $(_buildDarwinFrameworksParameter)
displayName: Build product
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
continueOnError: ${{ parameters.shouldContinueOnError }}

View file

@ -38,7 +38,7 @@ jobs:
targetRid: linux-arm
platform: Linux_arm
container:
image: ubuntu-16.04-cross-20200413125008-09ec757
image: ubuntu-16.04-cross-20210719121212-8a8d3be
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -64,7 +64,7 @@ jobs:
targetRid: linux-arm64
platform: Linux_arm64
container:
image: ubuntu-16.04-cross-arm64-20201022204150-b2c2436
image: ubuntu-16.04-cross-arm64-20210719121212-8a8d3be
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -91,7 +91,7 @@ jobs:
targetRid: linux-musl-x64
platform: Linux_musl_x64
container:
image: alpine-3.9-WithNode-20200602002639-0fc54a3
image: alpine-3.9-WithNode-20210714125437-9b5bbc2
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -116,7 +116,7 @@ jobs:
targetRid: linux-musl-arm
platform: Linux_musl_arm
container:
image: ubuntu-16.04-cross-arm-alpine-20210409142327-044d5b9
image: ubuntu-16.04-cross-arm-alpine-20210719121212-044d5b9
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -143,7 +143,7 @@ jobs:
targetRid: linux-musl-arm64
platform: Linux_musl_arm64
container:
image: ubuntu-16.04-cross-arm64-alpine-20200413125008-406629a
image: ubuntu-16.04-cross-arm64-alpine-20210719121212-b2c2436
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -169,7 +169,7 @@ jobs:
targetRid: linux-x64
platform: Linux_x64
container:
image: centos-7-20201227183837-5fe0e50
image: centos-7-20210714125435-9b5bbc2
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -193,7 +193,7 @@ jobs:
targetRid: linux-x64
platform: Linux_x64
container:
image: centos-7-source-build-20210408124356-5d87b80
image: centos-7-source-build-20210714125450-5d87b80
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@ -219,7 +219,7 @@ jobs:
targetRid: browser-wasm
platform: Browser_wasm
container:
image: ubuntu-18.04-webassembly-20210519131124-ba00c14
image: ubuntu-18.04-webassembly-20210531091624-f5c7a43
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}

View file

@ -7,6 +7,7 @@ steps:
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt)
-ci
-restore
-configuration $(_BuildConfig)
-projects $(Build.SourcesDirectory)/eng/common/internal/Tools.csproj
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/RestoreInternal.binlog
/v:normal

View file

@ -26,7 +26,7 @@ parameters:
steps:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -excludemonofailures os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -excludemonofailures os ${{ parameters.osGroup }} ${{ parameters.archType }} /p:RuntimeVariant=${{ parameters.runtimeVariant }} $(buildConfigUpper)
displayName: Build Tests
# Send tests to Helix
@ -40,6 +40,7 @@ steps:
coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr
runtimeFlavorDisplayName: ${{ parameters.runtimeFlavorDisplayName }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
runtimeVariant: ${{ parameters.runtimeVariant }}
${{ if eq(variables['System.TeamProject'], 'public') }}:
creator: $(Build.DefinitionName)

View file

@ -98,6 +98,13 @@ jobs:
- name: compilerArg
value: ''
- name: runtimeFlavorArgs
value: ''
- ${{ if eq(parameters.runtimeFlavor, 'mono') }}:
- name: runtimeFlavorArgs
value: '-excludemonofailures'
steps:
# Install test build dependencies
@ -120,7 +127,7 @@ jobs:
displayName: Disk Usage before Build
# Build managed test components
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
displayName: Build managed test components
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:

View file

@ -486,6 +486,9 @@ jobs:
gcSimulatorTests: true
scenarios:
- normal
${{ if in(parameters.testGroup, 'gc-standalone') }}:
scenarios:
- gcstandalone
${{ if in(parameters.testGroup, 'jitelthookenabled') }}:
scenarios:
- jitelthookenabled

View file

@ -151,20 +151,6 @@ jobs:
displayNameArgs: R2R_CG2
liveLibrariesBuildConfig: Release
#
# Crossgen-comparison jobs
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
buildConfig: release
platforms:
# Currently failing globally, should be uncommented once the tracking bug gets fixed:
# https://github.com/dotnet/runtime/issues/1282
# - Linux_arm
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
#
# Formatting
#

View file

@ -0,0 +1,49 @@
trigger: none
schedules:
- cron: "0 5 * * *"
displayName: Mon through Sun at 9:00 PM (UTC-8:00)
branches:
include:
- main
always: true
jobs:
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
buildConfig: checked
platforms:
- Linux_arm64
- windows_arm64
- windows_x64
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gc-standalone
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml
buildConfig: checked
platforms:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gc-standalone
liveLibrariesBuildConfig: Release
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
buildConfig: checked
platforms:
- Linux_arm64
- Linux_x64
- windows_arm64
- windows_x64
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
testGroup: gc-standalone
displayNameArgs: GCStandAlone
liveLibrariesBuildConfig: Release

View file

@ -41,7 +41,6 @@ jobs:
runtimeFlavor: mono
buildConfig: release
platforms:
- Linux_arm64
- Linux_x64
# build coreclr and libraries
@ -50,29 +49,10 @@ jobs:
jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
buildConfig: release
platforms:
- Linux_arm64
- Linux_x64
jobParameters:
testGroup: perf
# run arm64 interpreter jobs for mono
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
runtimeType: mono
codeGenType: 'Interpreter'
projectFile: microbenchmarks.proj
runKind: micro_mono
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfa64'
# build mono on wasm
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@ -124,9 +104,7 @@ jobs:
- Linux_x64
- windows_x64
- windows_x86
- Linux_arm64
- Linux_musl_x64
- windows_arm64
jobParameters:
testGroup: perf
@ -173,27 +151,6 @@ jobs:
archiveType: tar
tarCompression: gz
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Linux_arm64
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
nameSuffix: AOT
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
extraStepsParameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: AOT Mono Artifacts
artifactName: LinuxMonoAOTarm64
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
# build mono Android scenarios
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@ -216,6 +173,27 @@ jobs:
archiveType: tar
tarCompression: gz
# build mono iOS scenarios
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- iOS_arm64
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
nameSuffix: iOSMono
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
extraStepsParameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: iOS Mono Artifacts
artifactName: iOSMonoarm64
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
# build mono
- template: /eng/pipelines/common/platform-matrix.yml
@ -242,6 +220,39 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfpixel4a'
# run mono iOS scenarios
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Windows_x64
jobParameters:
testGroup: perf
runtimeType: iOSMono
projectFile: ios_scenarios.proj
runKind: ios_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfpixel4a'
iosLlvmBuild: False
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Windows_x64
jobParameters:
testGroup: perf
runtimeType: iOSMono
projectFile: ios_scenarios.proj
runKind: ios_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfpixel4a'
iosLlvmBuild: True
# run mono microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@ -304,7 +315,6 @@ jobs:
runtimeFlavor: aot
platforms:
- Linux_x64
- Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
@ -400,38 +410,6 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfowl'
# run coreclr Linux arm64 microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: coreclr
platforms:
- Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
projectFile: microbenchmarks.proj
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfa64'
# run coreclr Windows arm64 microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: coreclr
platforms:
- windows_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
projectFile: microbenchmarks.proj
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfsurf'
# run coreclr crossgen perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:

View file

@ -0,0 +1,199 @@
trigger:
batch: true
branches:
include:
- main
- release/*
paths:
include:
- '*'
- src/libraries/System.Private.CoreLib/*
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
variables:
- template: /eng/pipelines/common/variables.yml
schedules:
- cron: "30 2 * * *"
displayName: Every night at 2:30AM
branches:
include:
- main
always: true
jobs:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
# build mono
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/build-job.yml
runtimeFlavor: mono
buildConfig: release
platforms:
- Linux_arm64
# build coreclr and libraries
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
buildConfig: release
platforms:
- Linux_arm64
jobParameters:
testGroup: perf
# run arm64 interpreter jobs for mono
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
runtimeType: mono
codeGenType: 'Interpreter'
projectFile: microbenchmarks.proj
runKind: micro_mono
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfa64'
# build mono on wasm
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Browser_wasm
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
nameSuffix: wasm
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
extraStepsParameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: Browser Wasm Artifacts
artifactName: BrowserWasm
archiveType: zip
archiveExtension: .zip
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
# build coreclr and libraries
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
buildConfig: release
platforms:
- Linux_arm64
- windows_arm64
jobParameters:
testGroup: perf
# build mono on wasm
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Browser_wasm
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
nameSuffix: wasm
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
extraStepsParameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: Browser Wasm Artifacts
artifactName: BrowserWasm
archiveType: zip
archiveExtension: .zip
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Linux_arm64
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
nameSuffix: AOT
isOfficialBuild: false
extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
extraStepsParameters:
rootFolder: '$(Build.SourcesDirectory)/artifacts/'
includeRootFolder: true
displayName: AOT Mono Artifacts
artifactName: LinuxMonoAOTarm64
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
# run mono aot microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
buildConfig: release
runtimeFlavor: aot
platforms:
- Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
runtimeType: mono
codeGenType: 'AOT'
projectFile: microbenchmarks.proj
runKind: micro_mono
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
# run coreclr Linux arm64 microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: coreclr
platforms:
- Linux_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
projectFile: microbenchmarks.proj
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfa64'
# run coreclr Windows arm64 microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
buildConfig: release
runtimeFlavor: coreclr
platforms:
- windows_arm64
jobParameters:
testGroup: perf
liveLibrariesBuildConfig: Release
projectFile: microbenchmarks.proj
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfsurf'

View file

@ -72,17 +72,3 @@ jobs:
readyToRun: true
displayNameArgs: R2R
#
# Crossgen-comparison jobs
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
buildConfig: release
platforms:
- Linux_arm
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

View file

@ -23,6 +23,50 @@ steps:
- script: make run MONO_ARCH=arm64 DEPLOY_AND_RUN=false
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/Android
displayName: Build HelloAndroid sample app
- ${{ if eq(parameters.osGroup, 'iOS') }}:
- script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Build HelloiOS AOT sample app LLVM=False
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoLLVM
artifactName: iOSSampleAppNoLLVM
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Clean bindir
- script: make build-appbundle TARGET=iOS MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Build HelloiOS AOT sample app LLVM=True
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
inputs:
pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
artifactName: ${{ parameters.artifactName }}
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App LLVM
artifactName: iOSSampleAppLLVM
archiveExtension: '.tar.gz'
archiveType: tar
tarCompression: gz
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
@ -43,3 +87,4 @@ steps:
archiveExtension: ${{ parameters.archiveExtension }}
archiveType: ${{ parameters.archiveType }}
tarCompression: ${{ parameters.tarCompression }}

View file

@ -1,203 +0,0 @@
parameters:
buildConfig: ''
archType: ''
osGroup: ''
osSubgroup: ''
container: ''
helixQueues: ''
runtimeVariant: ''
crossBuild: false
crossrootfsDir: ''
dependOnEvaluatePaths: false
stagedBuild: false
variables: {}
pool: ''
# When set to a non-empty value (Debug / Release), it determines libraries
# build configuration to use for the tests. Setting this property implies
# a dependency of this job on the appropriate libraries build and is used
# to construct the name of the Azure artifact representing libraries build
# to use for building the tests.
liveLibrariesBuildConfig: ''
### Crossgen-comparison job
###
### Ensure that the output of cross-architecture, e.g. x64-hosted-arm-targeting,
### crossgen matches that of native, e.g. arm-hosted-arm-targeting, crossgen.
jobs:
- template: xplat-pipeline-job.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
stagedBuild: ${{ parameters.stagedBuild }}
runtimeVariant: ${{ parameters.runtimeVariant }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
helixType: 'test/crossgen-comparison/'
pool: ${{ parameters.pool }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
# Compute job name from template parameters
name: ${{ format('test_crossgen_comparison_{0}{1}_{1}_{2}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('Test crossgen-comparison {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
variables:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-HelixApi-Access
- name: hostArchType
value: x64
- name: targetFlavor
value: $(osGroup).$(archType).$(buildConfigUpper)
- name: crossFlavor
value: $(osGroup).$(hostArchType)_$(archType).$(buildConfigUpper)
- ${{ if ne(parameters.osGroup, 'windows') }}:
- name: artifactsDirectory
value: $(Build.SourcesDirectory)/artifacts
- name: binDirectory
value: $(artifactsDirectory)/bin
- name: productDirectory
value: $(binDirectory)/coreclr
- name: workItemDirectory
value: $(artifactsDirectory)/tests/coreclr/$(targetFlavor)/Tests/Core_Root
- ${{ if eq(parameters.osGroup, 'windows') }}:
- name: artifactsDirectory
value: $(Build.SourcesDirectory)\artifacts
- name: binDirectory
value: $(artifactsDirectory)\bin
- name: productDirectory
value: $(binDirectory)\coreclr
- name: workItemDirectory
value: $(artifactsDirectory)\tests\coreclr\$(targetFlavor)\Tests\Core_Root
- ${{ parameters.variables }}
# Test job depends on the corresponding build job
dependsOn:
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
# Run all steps in the container.
# Note that the containers are defined in platform-matrix.yml
container: ${{ parameters.container }}
timeoutInMinutes: 180 # 3 hrs
steps:
# Download product build
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(buildProductRootFolderPath)
artifactFileName: '$(buildProductArtifactName)$(archiveExtension)'
artifactName: '$(buildProductArtifactName)'
displayName: 'product build'
# Optionally download live-built libraries
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(librariesDownloadDir)
cleanUnpackFolder: false
artifactFileName: '$(librariesBuildArtifactName)$(archiveExtension)'
artifactName: '$(librariesBuildArtifactName)'
displayName: 'live-built libraries'
# Populate Core_Root
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) $(crossArg) generatelayoutonly
displayName: Populate Core_Root
# Create directories and ensure crossgen is executable
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: |
chmod +x $(workItemDirectory)/crossgen
mkdir -p $(workItemDirectory)/log/$(crossFlavor)
displayName: Create directories and ensure crossgen is executable
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: |
mkdir $(workItemDirectory)\log\$(crossFlavor)
displayName: Create directories
# Create baseline output on the host (x64) machine
- task: PythonScript@0
displayName: Create cross-platform crossgen baseline
inputs:
scriptSource: 'filePath'
scriptPath: $(Build.SourcesDirectory)/src/tests/Common/scripts/crossgen_comparison.py
pythonInterpreter: /usr/bin/python3
${{ if ne(parameters.osGroup, 'windows') }}:
arguments:
crossgen_framework
--crossgen $(productDirectory)/$(targetFlavor)/$(hostArchType)/crossgen
--il_corelib $(productDirectory)/$(targetFlavor)/IL/System.Private.CoreLib.dll
--core_root $(workItemDirectory)
--result_dir $(workItemDirectory)/log/$(crossFlavor)
${{ if eq(parameters.osGroup, 'windows') }}:
arguments:
crossgen_framework
--crossgen $(productDirectory)\$(targetFlavor)\$(hostArchType)\crossgen
--il_corelib $(productDirectory)\$(targetFlavor)\IL\System.Private.CoreLib.dll
--core_root $(workItemDirectory)
--result_dir $(workItemDirectory)\log\$(crossFlavor)
# Dump contents and payload information
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: |
ls $(workItemDirectory)
du -sh $(workItemDirectory)
displayName: Dump contents and payload information
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: |
dir $(workItemDirectory)
displayName: Dump contents and payload information
# Send payload to Helix where the native output is generated and compared to the baseline
- template: /eng/common/templates/steps/send-to-helix.yml
parameters:
DisplayNamePrefix: Run native crossgen and compare output to baseline
HelixSource: $(_HelixSource)
HelixType: 'test/crossgen-comparison/'
${{ if eq(variables['System.TeamProject'], 'internal') }}:
HelixAccessToken: $(HelixApiAccessToken)
HelixTargetQueues: ${{ join(' ', parameters.helixQueues) }}
${{ if ne(variables['System.TeamProject'], 'internal') }}:
Creator: $(Creator)
WorkItemTimeout: 3:00 # 3 hours
WorkItemDirectory: '$(workItemDirectory)'
CorrelationPayloadDirectory: '$(Build.SourcesDirectory)/src/tests/Common/scripts'
${{ if ne(parameters.osName, 'windows') }}:
WorkItemCommand:
chmod +x $HELIX_WORKITEM_PAYLOAD/crossgen;
mkdir -p $HELIX_WORKITEM_PAYLOAD/log/$(targetFlavor);
python3 -u $HELIX_CORRELATION_PAYLOAD/crossgen_comparison.py crossgen_framework
--crossgen $HELIX_WORKITEM_PAYLOAD/crossgen
--il_corelib $HELIX_WORKITEM_PAYLOAD/IL/System.Private.CoreLib.dll
--core_root $HELIX_WORKITEM_PAYLOAD
--result_dir $HELIX_WORKITEM_PAYLOAD/log/$(targetFlavor);
python3 -u $HELIX_CORRELATION_PAYLOAD/crossgen_comparison.py compare
--base_dir $HELIX_WORKITEM_PAYLOAD/log/$(crossFlavor)
--diff_dir $HELIX_WORKITEM_PAYLOAD/log/$(targetFlavor)
${{ if eq(parameters.osName, 'windows') }}:
WorkItemCommand:
mkdir %HELIX_WORKITEM_PAYLOAD%\log\$(targetFlavor);
python3 -u %HELIX_CORRELATION_PAYLOAD%\crossgen_comparison.py crossgen_framework
--crossgen %HELIX_WORKITEM_PAYLOAD%\crossgen
--il_corelib %HELIX_WORKITEM_PAYLOAD%\IL\System.Private.CoreLib.dll
--core_root %HELIX_WORKITEM_PAYLOAD%
--result_dir %HELIX_WORKITEM_PAYLOAD%\log\$(targetFlavor);
python3 -u %HELIX_CORRELATION_PAYLOAD%\crossgen_comparison.py compare
--base_dir %HELIX_WORKITEM_PAYLOAD%\log\$(crossFlavor)
--diff_dir %HELIX_WORKITEM_PAYLOAD%\log\$(targetFlavor)
# Publish log
- task: PublishPipelineArtifact@1
displayName: Publish log
inputs:
pathtoPublish: $(workItemDirectory)/log
artifactName: ${{ format('Testlog_crossgen_comparison_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
continueOnError: true
condition: always()

View file

@ -18,6 +18,7 @@ parameters:
logicalMachine: ''
pgoRunType: ''
javascriptEngine: 'NoJS'
iOSLlvmBuild: 'False'
### Perf job
@ -28,8 +29,8 @@ jobs:
- template: ${{ parameters.runJobTemplate }}
parameters:
# Compute job name from template parameters
jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType) }}
displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType) }}
jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild) }}
displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild) }}
pool: ${{ parameters.pool }}
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
@ -46,9 +47,10 @@ jobs:
logicalmachine: ${{ parameters.logicalmachine }}
pgoRunType: ${{ parameters.pgoRunType }}
javascriptEngine: ${{ parameters.javascriptEngine }}
iosLlvmBuild: ${{ parameters.iosLlvmBuild }}
# Test job depends on the corresponding build job
dependsOn:
- ${{ if ne(parameters.runtimeType, 'AndroidMono')}}:
- ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono')) }}:
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
@ -60,13 +62,15 @@ jobs:
- ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.codeGenType) }}
- ${{ if eq(parameters.runtimeType, 'AndroidMono')}}:
- ${{ 'build_Android_arm64_release_AndroidMono' }}
- ${{ if eq(parameters.runtimeType, 'iOSMono')}}:
- ${{ 'build_iOS_arm64_release_iOSMono' }}
${{ if and(eq(parameters.osGroup, 'windows'), ne(parameters.runtimeType, 'AndroidMono')) }}:
${{ if and(eq(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono'))) }}:
${{ if eq(parameters.runtimeType, 'mono') }}:
extraSetupParameters: -Architecture ${{ parameters.archType }} -MonoDotnet $(Build.SourcesDirectory)\.dotnet-mono
${{ if eq(parameters.runtimeType, 'coreclr') }}:
extraSetupParameters: -CoreRootDirectory $(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.Release\Tests\Core_Root -Architecture ${{ parameters.archType }}
${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.runtimeType, 'AndroidMono')) }}:
${{ if and(ne(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono'))) }}:
${{ if and(eq(parameters.runtimeType, 'mono'), ne(parameters.codeGenType, 'AOT')) }}:
extraSetupParameters: --architecture ${{ parameters.archType }} --monodotnet $(Build.SourcesDirectory)/.dotnet-mono
${{ if eq(parameters.runtimeType, 'wasm') }}:
@ -79,6 +83,8 @@ jobs:
extraSetupParameters: --corerootdirectory $(Build.SourcesDirectory)/artifacts/tests/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.Release/Tests/Core_Root --architecture ${{ parameters.archType }} --alpine
${{ if eq(parameters.runtimeType, 'AndroidMono') }}:
extraSetupParameters: -Architecture ${{ parameters.archType }} -AndroidMono
${{ if eq(parameters.runtimeType, 'iosMono') }}:
extraSetupParameters: -Architecture ${{ parameters.archType }} -iOSMono -iOSLlvmBuild:$${{ parameters.iOSLlvmBuild }}
variables: ${{ parameters.variables }}
@ -98,7 +104,7 @@ jobs:
displayName: 'live-built libraries'
# Download coreclr
- ${{ if ne(parameters.runtimeType, 'AndroidMono') }}:
- ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono')) }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(buildProductRootFolderPath)
@ -150,6 +156,22 @@ jobs:
artifactName: 'AndroidMonoarm64'
displayName: 'Mono Android runtime'
# Download iOSMono tests
- ${{ if eq(parameters.runtimeType, 'iOSMono') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvm
cleanUnpackFolder: false
artifactFileName: 'iOSSampleAppNoLLVM.tar.gz'
artifactName: 'iOSSampleAppNoLLVM'
displayName: 'iOS Sample App NoLLVM'
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvm
cleanUnpackFolder: false
artifactFileName: 'iOSSampleAppLLVM.tar.gz'
artifactName: 'iOSSampleAppLLVM'
displayName: 'iOS Sample App LLVM'
# Create Core_Root
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg)
@ -159,8 +181,8 @@ jobs:
# Copy the runtime directory into the testhost folder to include OOBs.
- script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\6.0.0 /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\6.0.0\\corerun.exe"
displayName: "Create mono dotnet (Windows)"
condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), ne('${{ parameters.runtimeType }}', 'AndroidMono'))
condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono')))
- script: "mkdir $(Build.SourcesDirectory)/.dotnet-mono;./build.sh -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)/bin/mono/$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;cp $(Build.SourcesDirectory)/artifacts/bin/runtime/$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/artifacts/bin/testhost/$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)/shared/Microsoft.NETCore.App/6.0.0 -rf;cp $(Build.SourcesDirectory)/artifacts/bin/testhost/$(_Framework)-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/.dotnet-mono -r;cp $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)/corerun $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/6.0.0/corerun"
displayName: "Create mono dotnet (Linux)"
condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), ne('${{ parameters.runtimeType }}', 'AndroidMono'))
condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono')))

View file

@ -157,6 +157,6 @@ jobs:
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}'
artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_$(iOSLlvmBuild)'
continueOnError: true
condition: always()

View file

@ -129,7 +129,8 @@ jobs:
value: ''
# 'innerloop' and 'clrinterpreter' jobs run the Priority 0 tests; everything else runs the Priority 1 tests.
- ${{ if and(ne(parameters.testGroup, 'innerloop'), ne(parameters.testGroup, 'clrinterpreter')) }}:
# 'gc-standalone' is forced to run pri0 as well to start with.
- ${{ if and(ne(parameters.testGroup, 'innerloop'), ne(parameters.testGroup, 'clrinterpreter'), ne(parameters.testGroup, 'gc-standalone')) }}:
- ${{ if ne(parameters.osGroup, 'windows') }}:
- name: priorityArg
value: 'priority1'

View file

@ -217,6 +217,8 @@ jobs:
# lowercase for RID format. (Detection normally converts, but we're preventing it.)
- name: OutputRidArg
value: /p:OutputRid=linux-musl-${{ parameters.archType }}
- name: RuntimeOSArg
value: /p:RuntimeOS=linux-musl
- name: _PortableBuild
value: true
@ -231,6 +233,7 @@ jobs:
$(LiveOverridePathArgs)
$(CommonMSBuildArgs)
$(OutputRidArg)
$(RuntimeOSArg)
- name: PublishArguments
value: >-
@ -423,7 +426,7 @@ jobs:
displayName: Disk Usage after Build
# Only in glibc leg, we produce RPMs and Debs
- ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), eq(parameters.platform, 'Linux_x64'), eq(parameters.osSubgroup, ''))}}:
- ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), eq(parameters.platform, 'Linux_x64'), eq(parameters.osSubgroup, ''), eq(parameters.pgoType, ''))}}:
- ${{ each packageBuild in parameters.packageDistroList }}:
# This leg's RID matches the build image. Build its distro-dependent packages, as well as
# the distro-independent installers. (There's no particular reason to build the distro-

View file

@ -57,7 +57,7 @@ jobs:
- (Centos.8.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
- RedHat.7.Amd64.Open
- SLES.15.Amd64.Open
- (Fedora.32.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-32-helix-20200512010618-efb9f14
- (Fedora.32.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-32-helix-20210710031120-870c408
- (Ubuntu.1910.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.10-helix-amd64-cfcfd50-20191030180623
- (Debian.10.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-bfcd90a-20200121150006
- ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
@ -70,7 +70,7 @@ jobs:
- SLES.12.Amd64.Open
- SLES.15.Amd64.Open
- (Fedora.30.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-30-helix-20200512010621-4f8cef7
- (Fedora.32.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-32-helix-20200512010618-efb9f14
- (Fedora.32.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-32-helix-20210710031120-870c408
- (Ubuntu.1910.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.10-helix-amd64-cfcfd50-20191030180623
- (Debian.10.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-bfcd90a-20200121150006
- ${{ if eq(parameters.jobParameters.isFullMatrix, false) }}:
@ -80,7 +80,7 @@ jobs:
- Ubuntu.1604.Amd64.Open
- Ubuntu.1804.Amd64.Open
- SLES.15.Amd64.Open
- (Fedora.30.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-30-helix-20200512010621-4f8cef7
- (Fedora.32.Amd64.Open)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-32-helix-20210710031120-870c408
- ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}:
# Limiting interp runs as we don't need as much coverage.
- Debian.9.Amd64.Open
@ -99,22 +99,18 @@ jobs:
- OSX.1014.Amd64.Open
- OSX.1015.Amd64.Open
# Mac Catalyst arm64
- ${{ if eq(parameters.platform, 'MacCatalyst_arm64') }}:
- OSX.1100.ARM64.Open
# Mac Catalyst x64
- ${{ if eq(parameters.platform, 'MacCatalyst_x64') }}:
- OSX.1015.Amd64.Open
# Android
- ${{ if in(parameters.platform, 'Android_x86', 'Android_x64') }}:
- Ubuntu.1804.Amd64.Android.Open
- ${{ if in(parameters.platform, 'Android_arm', 'Android_arm64') }}:
- Windows.10.Amd64.Android.Open
# iOS/tvOS simulator x64/x86
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64') }}:
# iOS Simulator/Mac Catalyst arm64
- ${{ if in(parameters.platform, 'MacCatalyst_arm64', 'iOSSimulator_arm64') }}:
- OSX.1100.ARM64.Open
# iOS/tvOS simulator x64/x86 & MacCatalyst x64
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64', 'MacCatalyst_x64') }}:
- OSX.1015.Amd64.Open
# iOS devices
@ -189,6 +185,6 @@ jobs:
# WebAssembly windows
- ${{ if eq(parameters.platform, 'Browser_wasm_win') }}:
- (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210519130955-ba00c14
- (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h1.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210702131541-6837048
${{ insert }}: ${{ parameters.jobParameters }}

View file

@ -6,46 +6,24 @@ parameters:
steps:
- ${{ if ne(parameters.isOfficialBuild, true) }}:
- task: CopyFiles@2
displayName: Prepare testhost folder to publish
displayName: Prepare bin folders to publish (unofficial build)
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/testhost
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/testhost
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin
contents: |
ref/**
runtime/**
testhost/**
- task: CopyFiles@2
displayName: Prepare runtime folder to publish
displayName: Prepare bin folders to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/runtime
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/runtime
- task: CopyFiles@2
displayName: Prepare ref folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref
- task: CopyFiles@2
displayName: Prepare shared framework ref assemblies to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref/microsoft.netcore.app
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref/microsoft.netcore.app
- task: CopyFiles@2
displayName: Prepare docs folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/docs
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/docs
- task: CopyFiles@2
displayName: Prepare shared framework runtime folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/pkg
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/pkg
- task: CopyFiles@2
displayName: Prepare native folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/native
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/native
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin
contents: |
docs/**
microsoft.netcore.app.*/**
native/**
- task: CopyFiles@2
displayName: Prepare artifacts packages folder to publish

View file

@ -25,7 +25,7 @@ variables:
jobs:
- job: linux
displayName: Docker Linux
timeoutInMinutes: 150
timeoutInMinutes: 180
pool:
name: NetCorePublic-Pool
queue: BuildPool.Ubuntu.1804.Amd64.Open
@ -47,6 +47,14 @@ jobs:
name: buildStress
displayName: Build HttpStress
- bash: |
cd '$(httpStressProject)'
export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress - HTTP 3.0
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
- bash: |
cd '$(httpStressProject)'
export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0"

View file

@ -63,6 +63,8 @@ jobs:
value: ''
- name: msCorDbi
value: '+mono.mscordbi'
- name: darwinFrameworks
value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:officialBuildId=$(Build.BuildNumber)'
@ -76,15 +78,23 @@ jobs:
- ${{ if eq(parameters.osGroup, 'tvOS') }}:
- name: osOverride
value: -os tvOS
- name: darwinFrameworks
value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'tvOSSimulator') }}:
- name: osOverride
value: -os tvOSSimulator
- name: darwinFrameworks
value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'iOS') }}:
- name: osOverride
value: -os iOS
- name: darwinFrameworks
value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'iOSSimulator') }}:
- name: osOverride
value: -os iOSSimulator
- name: darwinFrameworks
value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'Android') }}:
- name: osOverride
value: -os Android
@ -136,7 +146,7 @@ jobs:
# Build
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: ./build$(scriptExt) -subset mono$(msCorDbi) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter)
- script: ./build$(scriptExt) -subset mono$(msCorDbi) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(darwinFrameworks)
displayName: Build product
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: build$(scriptExt) -subset mono$(msCorDbi) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter)

View file

@ -0,0 +1,100 @@
parameters:
archType: ''
buildConfig: ''
container: ''
dependOnEvaluatePaths: false
dependsOn: []
isOfficialBuild: false
osGroup: ''
osSubgroup: ''
platform: ''
pool: ''
runtimeVariant: ''
stagedBuild: false
testGroup: ''
timeoutInMinutes: ''
variables: {}
jobs:
- template: xplat-pipeline-job.yml
parameters:
archType: ${{ parameters.archType }}
buildConfig: ${{ parameters.buildConfig }}
container: ${{ parameters.container }}
condition: ${{ parameters.isOfficialBuild }}
helixType: 'build/product/'
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
pool: ${{ parameters.pool }}
runtimeVariant: ${{ parameters.runtimeVariant }}
stagedBuild: ${{ parameters.stagedBuild }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
dependsOn: ${{ parameters.dependsOn }}
name: workloadsbuild
displayName: Build Workloads
variables:
- name: officialBuildIdArg
value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:OfficialBuildId=$(Build.BuildNumber)'
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]
- ${{ parameters.variables }}
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: 'IntermediateArtifacts'
path: $(workloadPackagesPath)
patterns: |
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.browser-wasm*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvos-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.Manifest*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.MonoTargets.Sdk*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.MonoAOTCompiler.Task*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Sdk*.nupkg
- task: CopyFiles@2
displayName: Flatten packages
inputs:
sourceFolder: $(workloadPackagesPath)
contents: '*/Shipping/*.nupkg'
cleanTargetFolder: false
targetFolder: $(workloadPackagesPath)
flattenFolders: true
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset mono.workloads -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci
displayName: Build workload artifacts
# Upload packages wrapping msis
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: workloads
# Delete wixpdb files before they are uploaded to artifacts
- task: DeleteFiles@1
displayName: Delete wixpdb's
inputs:
SourceFolder: $(workloadArtifactsPath)
Contents: '*.wixpdb'
# Upload artifacts to be used for generating VS components
- task: PublishPipelineArtifact@1
displayName: Publish workload artifacts
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/VSSetup/$(_BuildConfig)/Insertion
artifactName: 'Insertion'
continueOnError: true
condition: always()

View file

@ -73,7 +73,7 @@ jobs:
value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)'
- name: managedGenericTestArtifactName
value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)'
value: 'MonoManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)'
- name: microsoftNetSdkIlFolderPath
value: '$(Build.SourcesDirectory)/.packages/microsoft.net.sdk.il'
@ -90,6 +90,12 @@ jobs:
- name: nativeTestArtifactRootFolderPath
value: '$(binTestsPath)/obj/$(osGroup).$(archType).$(buildConfigUpper)'
- name: workloadPackagesPath
value: $(Build.SourcesDirectory)/artifacts/workloadPackages
- name: workloadArtifactsPath
value: $(Build.SourcesDirectory)/artifacts/workloads
- name: liveRuntimeBuildConfigUpper
${{ if eq(parameters.liveRuntimeBuildConfig, 'release') }}:
value: 'Release'

View file

@ -44,9 +44,10 @@ stages:
#
# Localization build
#
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
- template: /eng/common/templates/job/onelocbuild.yml
parameters:
CreatePr: false
MirrorRepo: runtime
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-RUNTIME'
@ -371,6 +372,35 @@ stages:
- windows_x86
- Linux_x64
#
# Build Blazor Workload
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/workloads-build.yml
buildConfig: release
platforms:
- windows_x64
jobParameters:
isOfficialBuild: ${{ variables.isOfficialBuild }}
dependsOn:
- Build_Android_arm_release_AllSubsets_Mono
- Build_Android_arm64_release_AllSubsets_Mono
- Build_Android_x86_release_AllSubsets_Mono
- Build_Android_x64_release_AllSubsets_Mono
- Build_Browser_wasm_release_AllSubsets_Mono
- Build_iOS_arm_release_AllSubsets_Mono
- Build_iOS_arm64_release_AllSubsets_Mono
- Build_iOSSimulator_x64_release_AllSubsets_Mono
- Build_iOSSimulator_x86_release_AllSubsets_Mono
- Build_iOSSimulator_arm64_release_AllSubsets_Mono
- Build_MacCatalyst_arm64_release_AllSubsets_Mono
- Build_MacCatalyst_x64_release_AllSubsets_Mono
- Build_tvOS_arm64_release_AllSubsets_Mono
- Build_tvOSSimulator_arm64_release_AllSubsets_Mono
- Build_tvOSSimulator_x64_release_AllSubsets_Mono
- Build_Windows_x64_release_CrossAOT_Mono
- ${{ if eq(variables.isOfficialBuild, true) }}:
- template: /eng/pipelines/official/stages/publish.yml
parameters:

View file

@ -55,48 +55,7 @@ jobs:
- template: /eng/pipelines/common/evaluate-default-paths.yml
#
# Build the whole product using Mono and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- iOSSimulator_x64
- tvOSSimulator_x64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:MonoForceInterpreter=true
timeoutInMinutes: 180
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
extraStepsParameters:
creator: dotnet-bot
interpreter: true
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
condition: >-
or(
eq(variables['librariesContainsChange'], true),
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
#
# MacCatalyst interp - requires AOT Compilation and Interp flags
# iOS/tvOS/Catalyst interp - requires AOT Compilation and Interp flags
# Build the whole product using Mono and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
@ -107,7 +66,12 @@ jobs:
runtimeFlavor: mono
platforms:
- MacCatalyst_x64
- iOSSimulator_x64
- tvOSSimulator_x64
# don't run tests on arm64 PRs until we can get significantly more devices
- ${{ if eq(variables['isFullMatrix'], true) }}:
- MacCatalyst_arm64
- iOSSimulator_arm64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
@ -117,7 +81,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunAOTCompilation=true /p:MonoForceInterpreter=true
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true
timeoutInMinutes: 180
condition: >-
or(
@ -257,47 +221,43 @@ jobs:
eq(variables['isFullMatrix'], true))
#
# Build the whole product using Mono and run libraries tests
# Build the whole product using Mono for Android and run runtime tests with interpreter
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- Browser_wasm
- Android_x64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: pr/dotnet/runtime/$(Build.SourceBranch)
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_AOT
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true
timeoutInMinutes: 180
nameSuffix: AllSubsets_Mono_RuntimeTests
buildArgs: -s mono+libs -c $(_BuildConfig)
timeoutInMinutes: 240
runtimeVariant: monointerpreter
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true
scenarios:
- normal
condition: >-
or(
eq(variables['librariesContainsChange'], true),
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
#
# Build the whole product using Mono for Android and run runtime tests with Android devices
@ -309,7 +269,7 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
#- Android_arm64 # disabled due to https://github.com/dotnet/runtime/issues/47850
- Android_arm64
variables:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
@ -331,6 +291,8 @@ jobs:
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(variables['isFullMatrix'], true))
# don't run tests on PRs until we can get significantly more devices
${{ if eq(variables['isFullMatrix'], true) }}:
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
extraStepsParameters:
@ -354,7 +316,7 @@ jobs:
timeoutInMinutes: 90
#
# Build Browser_wasm, on windows
# Build Browser_wasm, on windows, run console and browser tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@ -374,7 +336,7 @@ jobs:
testGroup: innerloop
nameSuffix: Browser_wasm_Windows
buildArgs: -subset mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=windows
timeoutInMinutes: 120
timeoutInMinutes: 180
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@ -389,6 +351,7 @@ jobs:
extraHelixArguments: /p:BrowserHost=windows
scenarios:
- normal
- wasmtestonbrowser
condition: >-
or(
eq(variables['librariesContainsChange'], true),

View file

@ -296,7 +296,6 @@ jobs:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
scenarios:
- buildwasmapps
- normal
- wasmtestonbrowser
condition: >-
@ -305,6 +304,46 @@ jobs:
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
#
# Build the whole product using Mono and run libraries tests, for Wasm.Build.Tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- Browser_wasm
variables:
# map dependencies variables to local variables
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
- name: installerContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'] ]
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_WasmBuildTests
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
timeoutInMinutes: 180
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
scenarios:
- buildwasmapps
condition: >-
or(
eq(variables['monoContainsChange'], true),
eq(variables['installerContainsChange'], true),
eq(variables['isFullMatrix'], true))
#
# Build for Browser/wasm, with EnableAggressiveTrimming=true
#
@ -347,6 +386,48 @@ jobs:
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
#
# Build for Browser/wasm with RunAOTCompilation=true
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- Browser_wasm
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_AOT
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true
timeoutInMinutes: 180
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true
scenarios:
- normal
condition: >-
or(
eq(variables['librariesContainsChange'], true),
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
# Build and test libraries under single-file publishing
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@ -818,25 +899,6 @@ jobs:
- windows_x86
- Linux_x64
#
# Crossgen-comparison jobs
# Only when CoreCLR is changed
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
buildConfig: checked
platforms:
- Linux_arm
helixQueueGroup: pr
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
liveLibrariesBuildConfig: Release
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(variables['isFullMatrix'], true))
#
# CoreCLR Test builds using live libraries release build
# Only when CoreCLR is changed

View file

@ -49,4 +49,14 @@
</ItemGroup>
</Target>
<ItemDefinitionGroup>
<TargetPathWithTargetPlatformMoniker>
<IsReferenceAssembly>$(IsReferenceAssembly)</IsReferenceAssembly>
</TargetPathWithTargetPlatformMoniker>
</ItemDefinitionGroup>
<Target Name="ValidateReferenceAssemblyProjectReferences" Condition="'$(IsReferenceAssembly)' == 'true'" AfterTargets="ResolveReferences">
<Error Condition="'%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' AND '%(ReferencePath.IsReferenceAssembly)' != 'true' AND '%(ReferencePath.ReferenceAssembly)' == ''"
Text="Reference assemblies must only reference other reference assemblies and '%(ReferencePath.ProjectReferenceOriginalItemSpec)' is not a reference assembly project and does not set 'ProduceReferenceAssembly'." />
</Target>
</Project>

View file

@ -25,6 +25,7 @@
<!-- Allow P2Ps that target a source project to build against the corresponding ref project. -->
<Target Name="AnnotateTargetPathWithTargetPlatformMonikerWithReferenceAssembly"
Condition="'$(HasMatchingContract)' == 'true'"
DependsOnTargets="ResolveProjectReferences"
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker ReferenceAssembly="@(ResolvedMatchingContract)" />

View file

@ -1,4 +1,14 @@
<Project InitialTargets="AddPackageDownload">
<PropertyGroup>
<PackagingTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\tools\</PackagingTaskAssembly>
<PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">$(PackagingTaskAssembly)netcoreapp3.1\</PackagingTaskAssembly>
<PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' != 'core'">$(PackagingTaskAssembly)net472\</PackagingTaskAssembly>
<!-- TODO: Remove when https://github.com/dotnet/arcade/issues/7413 is fixed. -->
<PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'core' and '$(DotNetBuildFromSource)' == 'true'">$(PackagingTaskAssembly)net5.0\</PackagingTaskAssembly>
<PackagingTaskAssembly>$(PackagingTaskAssembly)Microsoft.DotNet.Build.Tasks.Packaging.dll</PackagingTaskAssembly>
</PropertyGroup>
<UsingTask TaskName="GetLastStablePackage" AssemblyFile="$(PackagingTaskAssembly)"/>
<Target Name="AddPackageDownload">
<ItemGroup>

View file

@ -11,6 +11,7 @@
<Project>
<PropertyGroup>
<LocalFrameworkOverrideName>$(MicrosoftNetCoreAppFrameworkName)</LocalFrameworkOverrideName>
<TargetingpacksTargetsImported>true</TargetingpacksTargetsImported>
</PropertyGroup>
<PropertyGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' and
@ -103,7 +104,7 @@
</ItemGroup>
</Target>
<!-- Use local targeting pack for NetCoreAppCurrent. -->
<!-- Use local targeting/runtime pack for NetCoreAppCurrent. -->
<Target Name="UpdateTargetingAndRuntimePack"
Condition="'$(UseLocalTargetingRuntimePack)' == 'true'"
AfterTargets="ResolveFrameworkReferences">

View file

@ -15,5 +15,10 @@
<namespace fullname="Xunit" />
<namespace fullname="Xunit.Sdk" />
</assembly>
<assembly fullname="xunit.assert">
<type fullname="Xunit.Sdk.AssertEqualityComparer`1">
<method signature="System.Boolean CompareTypedSets(System.Collections.IEnumerable,System.Collections.IEnumerable)" />
</type>
</assembly>
<assembly fullname="xunit.runner.utility.netcoreapp10" />
</linker>

View file

@ -2,7 +2,6 @@
<assembly fullname="Castle.Core">
<namespace fullname="Castle.DynamicProxy" />
<type fullname="Castle.DynamicProxy.Internal.CompositionInvocation" />
<type fullname="Castle.DynamicProxy.Internal.AbstractInvocation" />
<type fullname="Castle.DynamicProxy.Internal.InheritanceInvocation" />
</assembly>
<assembly fullname="Moq">

View file

@ -5,9 +5,9 @@ set EXECUTION_DIR=%~dp0
set SCENARIO=%3
if [%HELIX_WORKITEM_UPLOAD_ROOT%] == [] (
set XHARNESS_OUT="%EXECUTION_DIR%xharness-output"
set "XHARNESS_OUT=%EXECUTION_DIR%xharness-output"
) else (
set XHARNESS_OUT="%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output"
set "XHARNESS_OUT=%HELIX_WORKITEM_UPLOAD_ROOT%\xharness-output"
)
if [%XHARNESS_CLI_PATH%] NEQ [] (

View file

@ -6,9 +6,10 @@
<MonoProjectRoot>{MonoProjectRoot}</MonoProjectRoot>
<MonoAOTCompilerTasksAssemblyPath>{MonoAOTCompilerTasksAssemblyPath}</MonoAOTCompilerTasksAssemblyPath>
<WasmAppBuilderTasksAssemblyPath>{WasmAppBuilderTasksAssemblyPath}</WasmAppBuilderTasksAssemblyPath>
<JsonToItemsTaskFactoryTasksAssemblyPath>{JsonToItemsTaskFactoryTasksAssemblyPath}</JsonToItemsTaskFactoryTasksAssemblyPath>
<MicrosoftNetCoreAppRuntimePackRidDir>{MicrosoftNetCoreAppRuntimePackRidDir}</MicrosoftNetCoreAppRuntimePackRidDir>
<RepositoryEngineeringDir>{RepositoryEngineeringDir}</RepositoryEngineeringDir>
<TargetFramework>{NetCoreAppCurrent}</TargetFramework>
<TargetFramework>{TestTargetFramework}</TargetFramework>
<RuntimeIdentifier>{RuntimeIdentifier}</RuntimeIdentifier>
<UseMonoRuntime>{UseMonoRuntime}</UseMonoRuntime>
<TargetingPackDir>{TargetingPackDir}</TargetingPackDir>
@ -18,6 +19,10 @@
<_ExtraTrimmerArgs>{ExtraTrimmerArgs} $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs>
</PropertyGroup>
<ItemGroup>
{RuntimeHostConfigurationOptions}
</ItemGroup>
<ItemGroup>
{AdditionalProjectReferences}
</ItemGroup>

View file

@ -25,14 +25,16 @@
<TestConsoleAppSourceFiles>
<ProjectDir>$([MSBuild]::NormalizeDirectory('$(TrimmingTestProjectsDir)', '$(MSBuildProjectName)', '%(Filename)', '$(PackageRID)'))</ProjectDir>
<TestRuntimeIdentifier>$(PackageRID)</TestRuntimeIdentifier>
<TestTargetFramework>$(NetCoreAppCurrent)</TestTargetFramework>
<TestTargetFramework Condition="'%(TestConsoleAppSourceFiles.TargetOS)' != ''">$(NetCoreAppCurrent)-%(TestConsoleAppSourceFiles.TargetOS)</TestTargetFramework>
</TestConsoleAppSourceFiles>
<!-- We need to separate Item metadata declaration in two in order to be able to use ProjectDir and TestRuntimeIdentifier bellow -->
<!-- We need to separate Item metadata declaration in two in order to be able to use ProjectDir and TestRuntimeIdentifier below -->
<TestConsoleAppSourceFiles>
<ProjectFile>%(ProjectDir)project.csproj</ProjectFile>
<TestCommand Condition="'$(TargetArchitecture)' != 'wasm' Or '$(TargetOs)' != 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish', 'project'))</TestCommand>
<TestCommand Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'AppBundle', 'run-v8.sh'))</TestCommand>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' != 'wasm' Or '$(TargetOs)' != 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'publish'))</TestExecutionDirectory>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '$(NetCoreAppCurrent)', '%(TestRuntimeIdentifier)', 'AppBundle'))</TestExecutionDirectory>
<TestCommand Condition="'$(TargetArchitecture)' != 'wasm' Or '$(TargetOs)' != 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TestTargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'project'))</TestCommand>
<TestCommand Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TestTargetFramework)', '%(TestRuntimeIdentifier)', 'AppBundle', 'run-v8.sh'))</TestCommand>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' != 'wasm' Or '$(TargetOs)' != 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TestTargetFramework)', '%(TestRuntimeIdentifier)', 'publish'))</TestExecutionDirectory>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOs)' == 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TestTargetFramework)', '%(TestRuntimeIdentifier)', 'AppBundle'))</TestExecutionDirectory>
</TestConsoleAppSourceFiles>
</ItemGroup>
@ -40,6 +42,7 @@
<TestConsoleApps Include="@(TestConsoleAppSourceFiles->'%(ProjectFile)')" Condition="!$([System.String]::Copy('%(TestConsoleAppSourceFiles.SkipOnTestRuntimes)').Contains('$(PackageRID)'))">
<ProjectCompileItems>%(Identity)</ProjectCompileItems>
</TestConsoleApps>
<TestConsoleApps AdditionalProperties="MSBuildEnableWorkloadResolver=$(MSBuildEnableWorkloadResolver)" Condition="'$(MSBuildEnableWorkloadResolver)' != ''" />
</ItemGroup>
</Target>
@ -66,22 +69,34 @@
<_additionalProjectSourceFiles Include="%(TestConsoleApps.AdditionalSourceFiles)" />
</ItemGroup>
<ItemGroup>
<_switchesAsItems Include="%(TestConsoleApps.DisabledFeatureSwitches)" Value="false" />
<_switchesAsItems Include="%(TestConsoleApps.EnabledFeatureSwitches)" Value="true" />
</ItemGroup>
<PropertyGroup>
<_runtimeHostConfigurationOptionsString>@(_switchesAsItems->'&lt;RuntimeHostConfigurationOption Include=&quot;%(Identity)&quot; Value=&quot;%(Value)&quot; Trim=&quot;true&quot; /&gt;', '%0a ')</_runtimeHostConfigurationOptionsString>
</PropertyGroup>
<MakeDir Directories="$(_projectDir)" />
<WriteLinesToFile File="$(_projectFile)"
Lines="$([System.IO.File]::ReadAllText('$(ProjectTemplate)')
.Replace('{MicrosoftNETCoreAppVersion}', '$(MicrosoftNETCoreAppVersion)')
.Replace('{NetCoreAppCurrent}', '$(NetCoreAppCurrent)')
.Replace('{TestTargetFramework}', '%(TestConsoleApps.TestTargetFramework)')
.Replace('{NetCoreAppMaximumVersion}', '$(NetCoreAppMaximumVersion)')
.Replace('{TargetingPackDir}','$(MicrosoftNetCoreAppRefPackDir)')
.Replace('{RuntimeIdentifier}','%(TestConsoleApps.TestRuntimeIdentifier)')
.Replace('{UseMonoRuntime}','$(UseMonoRuntime)')
.Replace('{MicrosoftNETILLinkTasksVersion}', '$(MicrosoftNETILLinkTasksVersion)')
.Replace('{ExtraTrimmerArgs}', '%(TestConsoleApps.ExtraTrimmerArgs)')
.Replace('{RuntimeHostConfigurationOptions}', '$(_runtimeHostConfigurationOptionsString)')
.Replace('{AdditionalProjectReferences}', '$(_additionalProjectReferencesString)')
.Replace('{RepositoryEngineeringDir}', '$(RepositoryEngineeringDir)')
.Replace('{MonoAOTCompilerDir}', '$(MonoAOTCompilerDir)')
.Replace('{JsonToItemsTaskFactoryDir}', '$(JsonToItemsTaskFactoryDir)')
.Replace('{MonoProjectRoot}', '$(MonoProjectRoot)')
.Replace('{MonoAOTCompilerTasksAssemblyPath}', '$(MonoAOTCompilerTasksAssemblyPath)')
.Replace('{JsonToItemsTaskFactoryTasksAssemblyPath}', '$(JsonToItemsTaskFactoryTasksAssemblyPath)')
.Replace('{WasmAppBuilderTasksAssemblyPath}', '$(WasmAppBuilderTasksAssemblyPath)')
.Replace('{MicrosoftNetCoreAppRuntimePackRidDir}', '$(MicrosoftNetCoreAppRuntimePackRidDir)'))"
Overwrite="true" />

View file

@ -0,0 +1,34 @@
<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<Python>python3</Python>
<HelixPreCommands>$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk</HelixPreCommands>
</PropertyGroup>
<ItemGroup>
<HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
<PayloadDirectory>%(Identity)</PayloadDirectory>
</HelixCorrelationPayload>
</ItemGroup>
<PropertyGroup>
<LlvmPath>nollvm</LlvmPath>
<LlvmPath Condition="'$(iOSLlvmBuild)' == 'True'">llvm</LlvmPath>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
<ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
<ScenarioDirectory>$HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/</ScenarioDirectory>
</PropertyGroup>
<ItemGroup>
<HelixWorkItem Include="SOD - iOS HelloWorld .app Size">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands>cd $(ScenarioDirectory)helloios;xcopy %HELIX_CORRELATION_PAYLOAD%\iosHelloWorld\$(LlvmPath) .\app\/e;$(Python) pre.py</PreCommands>
<Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
<PostCommands>$(Python) post.py</PostCommands>
</HelixWorkItem>
</ItemGroup>
</Project>

View file

@ -21,9 +21,11 @@ Param(
[string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind",
[string] $LogicalMachine="",
[switch] $AndroidMono,
[switch] $iOSMono,
[switch] $NoPGO,
[switch] $DynamicPGO,
[switch] $FullPGO
[switch] $FullPGO,
[switch] $iOSLlvmBuild
)
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
@ -90,6 +92,10 @@ elseif($FullPGO)
$Configurations += " PGOType=fullpgo"
}
if ($iOSMono) {
$Configurations += " iOSLlvmBuild=$iOSLlvmBuild"
}
# FIX ME: This is a workaround until we get this from the actual pipeline
$CommonSetupArguments="--channel main --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
@ -141,6 +147,20 @@ if ($AndroidMono) {
$SetupArguments = $SetupArguments -replace $Architecture, 'arm64'
}
if ($iOSMono) {
if(!(Test-Path $WorkItemDirectory))
{
mkdir $WorkItemDirectory
}
if($iOSLlvmBuild) {
Copy-Item -path "$SourceDirectory\iosHelloWorld\llvm" $PayloadDirectory\iosHelloWorld\llvm -Recurse
} else {
Copy-Item -path "$SourceDirectory\iosHelloWorld\nollvm" $PayloadDirectory\iosHelloWorld\nollvm -Recurse
}
$SetupArguments = $SetupArguments -replace $Architecture, 'arm64'
}
$DocsDir = (Join-Path $PerformanceDirectory "docs")
robocopy $DocsDir $WorkItemDirectory
@ -168,6 +188,7 @@ Write-PipelineSetVariable -Name 'UseBaselineCoreRun' -Value "$UseBaselineCoreRun
Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'Compare' -Value "$Compare" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'MonoDotnet' -Value "$UsingMono" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'iOSLlvmBuild' -Value "$iOSLlvmBuild" -IsMultiJobVariable $false
# Helix Arguments
Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false

View file

@ -7,12 +7,18 @@
<PublishingTestsRun>true</PublishingTestsRun>
<BundleTestAppTargets>BundleTestAppleApp;BundleTestAndroidApp</BundleTestAppTargets>
<!-- this catches the case when we are running tests, but not archiving them.
In case of archiving, the workload gets installed by code elsewhere -->
<InstallWorkloadForTesting Condition="'$(TestUsingWorkloads)' == 'true' and '$(ArchiveTests)' != 'true'">true</InstallWorkloadForTesting>
</PropertyGroup>
<PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true'">
<PublishTrimmed>true</PublishTrimmed>
<!-- Suppress linker warnings as these are tests -->
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
<!-- https://github.com/dotnet/sdk/issues/18581 tracks needing to set 2 properties to disable warnings. -->
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
<!-- Reduce library test app size by trimming framework library features -->
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' != 'Debug'">false</DebuggerSupport>
@ -20,6 +26,7 @@
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">false</UseSystemResourceKeys>
<UseNativeHttpHandler Condition="'$(UseNativeHttpHandler)' == ''">false</UseNativeHttpHandler>
</PropertyGroup>
<PropertyGroup>
@ -141,7 +148,7 @@
<Target Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'" Name="BundleTestAppleApp" DependsOnTargets="GenerateRuntimeConfig">
<Error Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidDir)')" Text="MicrosoftNetCoreAppRuntimePackRidDir=$(MicrosoftNetCoreAppRuntimePackRidDir) doesn't exist" />
<Error Condition="('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm' or '$(TargetOS)' == 'MacCatalyst') and '$(DevTeamProvisioning)' == ''"
<Error Condition="('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'MacCatalyst') and '$(DevTeamProvisioning)' == ''"
Text="'DevTeamProvisioning' needs to be set for device builds. Set it to 'UBF8T346G9' if you're part of the Microsoft team account, or 'adhoc' to sign with an adhoc key.." />
<Error Condition="'$(TestArchiveTestsDir)' == ''" Text="TestArchiveTestsDir property to archive the test folder must be set." />
@ -155,7 +162,7 @@
<PropertyGroup>
<AOTMode Condition="'$(TargetOS)' != 'MacCatalyst'">Full</AOTMode>
<AOTMode Condition="'$(TargetOS)' == 'MacCatalyst' and '$(MonoForceInterpreter)' != 'true'">Full</AOTMode>
<AOTMode Condition="'$(TargetOS)' == 'MacCatalyst' and '$(MonoForceInterpreter)' == 'true'">JustInterp</AOTMode>
<AOTMode Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' == 'true'">JustInterp</AOTMode>
</PropertyGroup>
<ItemGroup>
<_AotExcludeAssemblies Include="$(PublishDir)System.Runtime.WindowsRuntime.dll" />
@ -289,5 +296,10 @@
AfterTargets="Build"
DependsOnTargets="Publish;$(BundleTestAppTargets);ArchiveTests" />
<Target Name="PrepareForTestUsingWorkloads"
BeforeTargets="Test"
DependsOnTargets="InstallWorkloadUsingArtifacts"
Condition="'$(InstallWorkloadForTesting)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)illink.targets" Condition="'$(SkipImportRepoLinkerTargets)' != 'true'" />
</Project>

View file

@ -1,13 +1,15 @@
<Project>
<PropertyGroup>
<PropertyGroup Condition="'$(RunScriptInputName)' == ''">
<RunScriptInputName Condition="'$(TargetOS)' == 'windows'">RunnerTemplate.cmd</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' != 'windows'">RunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'">AppleRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Android'">AndroidRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Browser' and '$(OS)' != 'Windows_NT'">WasmRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Browser' and '$(OS)' == 'Windows_NT'">WasmRunnerTemplate.cmd</RunScriptInputName>
</PropertyGroup>
<RunScriptInputPath>$(MSBuildThisFileDirectory)$(RunScriptInputName)</RunScriptInputPath>
<PropertyGroup>
<RunScriptInputPath Condition="'$(RunScriptInputPath)' == ''">$(MSBuildThisFileDirectory)$(RunScriptInputName)</RunScriptInputPath>
<RunScriptOutputName Condition="'$(TargetOS)' != 'windows'">RunTests.sh</RunScriptOutputName>
<RunScriptOutputName Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'Browser' and '$(OS)' == 'Windows_NT')">RunTests.cmd</RunScriptOutputName>

View file

@ -22,6 +22,7 @@
<_XHarnessArgs Condition="'$(OS)' == 'Windows_NT'">wasm %XHARNESS_COMMAND% --app=. --output-directory=%XHARNESS_OUT%</_XHarnessArgs>
<_XHarnessArgs Condition="'$(Scenario)' != 'WasmTestOnBrowser'">$(_XHarnessArgs) --engine=$(JSEngine) $(JSEngineArgs) --js-file=runtime.js</_XHarnessArgs>
<_XHarnessArgs Condition="'$(BrowserHost)' == 'windows'">$(_XHarnessArgs) --browser=chrome --browser-path=%HELIX_CORRELATION_PAYLOAD%\chrome-win\chrome.exe</_XHarnessArgs>
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs>
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs>
@ -35,12 +36,12 @@
</PropertyGroup>
<PropertyGroup Condition="'$(BuildAOTTestsOnHelix)' == 'true'">
<_AOTBuildCommand>dotnet msbuild publish/AOTTestProjectForHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog</_AOTBuildCommand>
<_AOTBuildCommand>dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog</_AOTBuildCommand>
<!-- running aot-helix tests locally, so we can test with the same project file as CI -->
<_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)</_AOTBuildCommand>
<_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation)</_AOTBuildCommand>
<_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation) /p:EmccLinkOptimizationFlag='-Oz -Wl%252C-O0 -Wl%252C-lto-O0'</_AOTBuildCommand>
<_AOTBuildCommand>$(_AOTBuildCommand) &amp;&amp; cd wasm_build/AppBundle</_AOTBuildCommand>
<RunScriptCommand Condition="'$(RunScriptCommand)' == ''">$(_AOTBuildCommand)</RunScriptCommand>
@ -60,6 +61,13 @@
<BundleTestWasmAppDependsOn Condition="'$(BuildAOTTestsOnHelix)' == 'true'">$(BundleTestWasmAppDependsOn);_BundleAOTTestWasmAppForHelix</BundleTestWasmAppDependsOn>
</PropertyGroup>
<ItemGroup>
<WorkloadIdForTesting Include="wasm-tools"
ManifestName="Microsoft.NET.Workload.Mono.ToolChain"
Version="$(PackageVersion)"
VersionBand="$(SdkBandVersion)" />
</ItemGroup>
<Target Name="BundleTestWasmApp" DependsOnTargets="$(BundleTestWasmAppDependsOn)" />
<UsingTask Condition="'$(BuildAOTTestsOnHelix)' == 'true'"
@ -69,8 +77,7 @@
<Target Name="_BundleAOTTestWasmAppForHelix" DependsOnTargets="PrepareForWasmBuildApp">
<ItemGroup>
<BundleFiles Include="$(WasmMainJSPath)" TargetDir="publish" />
<BundleFiles Include="@(WasmSatelliteAssemblies)" TargetDir="publish/%(WasmSatelliteAssemblies.CultureName)" />
<BundleFiles Include="@(WasmAssembliesToBundle)" TargetDir="publish" />
<BundleFiles Include="@(WasmAssembliesToBundle)" TargetDir="publish\%(WasmAssembliesToBundle.RecursiveDir)" />
<BundleFiles Include="$(MonoProjectRoot)\wasm\data\aot-tests\*" TargetDir="publish" />
</ItemGroup>
@ -96,16 +103,23 @@
<_WasmPropertiesToPass
Include="$(%(_WasmPropertyNames.Identity))"
Name="%(_WasmPropertyNames.Identity)"
ConditionToUse="%(_WasmPropertyNames.ConditionToUse)" />
ConditionToUse__="%(_WasmPropertyNames.ConditionToUse__)" />
<_WasmVFSFilesToCopy Include="@(WasmFilesToIncludeInFileSystem)" />
<_WasmVFSFilesToCopy TargetPath="%(FileName)%(Extension)" Condition="'%(TargetPath)' == ''" />
<!-- Example of passing items to the project
<_WasmItemsToPass Include="@(BundleFiles)" OriginalItemName__="BundleFiles" ConditionToUse__="'$(Foo)' != 'true'" />
-->
</ItemGroup>
<!-- This file gets imported by the project file on helix -->
<GenerateAOTProps
Properties="@(_WasmPropertiesToPass)"
OutputFile="$(BundleDir)publish\AOTTestProjectForHelix.props" />
Items="@(_WasmItemsToPass)"
OutputFile="$(BundleDir)publish\ProxyProjectForAOTOnHelix.props" />
<Copy SourceFiles="@(BundleFiles)" DestinationFolder="$(BundleDir)%(TargetDir)" />
<Copy SourceFiles="@(_WasmVFSFilesToCopy)" DestinationFiles="$(BundleDir)\extraFiles\%(_WasmVFSFilesToCopy.TargetPath)" />
@ -124,17 +138,17 @@
<WasmDebugLevel Condition="'$(DebuggerSupport)' == 'true' and '$(WasmDebugLevel)' == ''">-1</WasmDebugLevel>
</PropertyGroup>
<ItemGroup Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true'">
<_SatelliteAssemblies Include="$(PublishDir)*\*.resources.dll" />
<_SatelliteAssemblies CultureName="$([System.IO.Directory]::GetParent('%(Identity)').Name)" />
<_SatelliteAssemblies TargetPath="%(CultureName)\%(FileName)%(Extension)" />
<WasmFilesToIncludeInFileSystem Include="@(_SatelliteAssemblies)" />
</ItemGroup>
<ItemGroup>
<WasmSatelliteAssemblies Include="$(PublishDir)*\*.resources.dll" />
<WasmSatelliteAssemblies CultureName="$([System.IO.Directory]::GetParent('%(Identity)').Name)" />
<WasmAssembliesToBundle Include="$(PublishDir)\*.dll"/>
<WasmAssembliesToBundle Include="$(PublishDir)\**\*.dll"/>
<WasmFilesToIncludeInFileSystem Include="@(ContentWithTargetPath)" />
<WasmFilesToIncludeInFileSystem
Include="@(WasmSatelliteAssemblies)"
TargetPath="%(WasmSatelliteAssemblies.CultureName)\%(WasmSatelliteAssemblies.FileName)%(WasmSatelliteAssemblies.Extension)"
Condition="'$(IncludeSatelliteAssembliesInVFS)' == 'true'" />
<_CopyLocalPaths
Include="@(PublishItemsOutputGroupOutputs)"

View file

@ -1,24 +1,24 @@
{
"sdk": {
"version": "6.0.100-preview.4.21255.9",
"version": "6.0.100-preview.5.21302.13",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "6.0.100-preview.4.21255.9"
"dotnet": "6.0.100-preview.5.21302.13"
},
"native-tools": {
"cmake": "3.16.4",
"python3": "3.7.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21311.3",
"Microsoft.DotNet.PackageValidation": "1.0.0-preview.6.21274.7",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21311.3",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21311.3",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21311.3",
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21370.12",
"Microsoft.DotNet.PackageValidation": "1.0.0-preview.7.21352.4",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21370.12",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21370.12",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21370.12",
"Microsoft.Build.NoTargets": "3.0.4",
"Microsoft.Build.Traversal": "3.0.23",
"Microsoft.NET.Sdk.IL": "6.0.0-preview.6.21314.1"
"Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21369.2"
}
}

View file

@ -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>

Some files were not shown because too many files have changed in this diff Show more