diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 447d17d5160111..b8e58874e2e87b 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"coverlet.console": {
- "version": "3.1.0",
+ "version": "3.1.2",
"commands": [
"coverlet"
]
@@ -15,13 +15,13 @@
]
},
"microsoft.dotnet.xharness.cli": {
- "version": "1.0.0-prerelease.22101.2",
+ "version": "1.0.0-prerelease.22114.1",
"commands": [
"xharness"
]
},
"microsoft.visualstudio.slngen.tool": {
- "version": "6.3.0",
+ "version": "8.1.6",
"commands": [
"slngen"
]
diff --git a/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md
index 6fd461e6fc3690..8932380eb8e13e 100644
--- a/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md
+++ b/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md
@@ -21,3 +21,8 @@ main PR
# Risk
+
+# Package authoring signed off?
+
+
+IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed.
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index 99ebe3b43d0cf8..a9d20ab383fd73 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -22,7 +22,7 @@ jobs:
if (context.eventName !== "issue_comment") throw "Error: This action only works on issue_comment events.";
// extract the target branch name from the trigger phrase containing these characters: a-z, A-Z, digits, forward slash, dot, hyphen, underscore
- const regex = /\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
+ const regex = /^\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
target_branch = regex.exec(context.payload.comment.body);
if (target_branch == null) throw "Error: No backport branch found in the trigger phrase.";
@@ -57,3 +57,5 @@ jobs:
## Testing
## Risk
+
+ IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed.
diff --git a/Directory.Build.props b/Directory.Build.props
index d862ee091fe81b..b9cc1470bb7805 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -305,5 +305,6 @@
$(RepositoryEngineeringDir)NoTargetsSdk.BeforeTargets.targets
$(RepositoryEngineeringDir)TraversalSdk.AfterProps.props
+ $(RepositoryEngineeringDir)TraversalSdk.AfterTargets.targets
diff --git a/Directory.Build.targets b/Directory.Build.targets
index f59955242b29f0..541cdfb59f27f9 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -26,6 +26,10 @@
$(ProductVersion)-$(VersionSuffix)
+
+
+
+
Any .NETCoreApp or .NETFramework TFM, e.g. net5.0`
+- `$(BuildTargetFramework) -> Any .NETCoreApp or .NETFramework TFM, e.g. net7.0`
- `$(TargetOS) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]`
- `$(Configuration) -> Release | [defaults to Debug when empty]`
- `$(TargetArchitecture) - x86 | x64 | arm | arm64 | [defaults to x64 when empty]`
@@ -37,22 +37,18 @@ Each project will define a set of supported TargetFrameworks
```
-- `$(BuildSettings) -> $(BuildTargetFramework)[-$(TargetOS)][-$(Configuration)][-$(TargetArchitecture)]`
- - Note this property should be file path safe and thus can be used in file names or directories that need to a unique path for a project configuration.
- - The only required Build Settings value is the `$(BuildTargetFramework)` the others are optional.
-
Example:
-Pure netstandard configuration:
+Non cross-targeting project that targets .NETStandard:
```
- netstandard2.0
+ netstandard2.0
```
-All supported targets with unique windows/unix build for netcoreapp:
+A cross-targeting project which targets specific platform with `$(NetCoreAppCurrent)` and one .NETFramework tfm:
```
- $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetFrameworkCurrent)
+ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetFrameworkMinimum)
```
@@ -61,15 +57,15 @@ All supported targets with unique windows/unix build for netcoreapp:
A full or individual project build is centered around BuildTargetFramework, TargetOS, Configuration and TargetArchitecture.
1. `$(BuildTargetFramework), $(TargetOS), $(Configuration), $(TargetArchitecture)` can individually be passed in to change the default values.
-2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `net5.0-[TargetOS Running On]-Debug-x64`.
-3. While Building an individual project from the VS, we build the project for all latest netcoreapp target frameworks.
+2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `net7.0-[TargetOS Running On]-Debug-x64`.
+3. When building an individual project (either from the CLI or an IDE), all target frameworks are built.
We also have `RuntimeOS` which can be passed to customize the specific OS and version needed for native package builds as well as package restoration. If not passed it will default based on the OS you are running on.
-Any of the mentioned properties can be set via `/p:=` at the command line. When building using our run tool or any of the wrapper scripts around it (i.e. build.cmd) a number of these properties have aliases which make them easier to pass (run build.cmd/sh -? for the aliases).
+Any of the mentioned properties can be set via `/p:=` at the command line. When building using any of the wrapper scripts around it (i.e. build.cmd) a number of these properties have aliases which make them easier to pass (run build.cmd/sh -? for the aliases).
## Selecting the correct BuildSettings
-When building an individual project the `BuildTargetFramework` and `TargetOS` will be used to select the closest matching TargetFramework listed in the projects `TargetFrameworks` property. The rules used to select the targetFramework will consider compatible target frameworks and OS fallbacks.
+When building an individual project the `BuildTargetFramework` and `TargetOS` will be used to select the compatible dependencies which are expressed as ProjectReference items.
## Supported full build settings
- .NET Core latest on current OS (default) -> `$(NetCoreAppCurrent)-[RunningOS]`
@@ -80,37 +76,64 @@ When building an individual project the `BuildTargetFramework` and `TargetOS` wi
## TargetFramework conditions
`TargetFramework` conditions should be avoided in the first PropertyGroup as that causes DesignTimeBuild issues: https://github.com/dotnet/project-system/issues/6143
-1. Use an equality check if the TargetFramework isn't overloaded with the OS portion.
+1. Use TargetFrameworkIdentifier to condition on an entire framework to differentiate between .NETCoreApp, .NETStandard and .NETFramework.
+Example:
+```
+
+ $(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum)
+
+...
+...
+...
+```
+2. Use equality checks if you want to condition on specific runtime agnostic target frameworks (i.e. without the `-windows` suffix).
Example:
```
- netstandard2.0;netstandard2.1
+ $(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum)
+...
...
+...
```
-2. Use a StartsWith when you want to test for multiple .NETStandard or .NETFramework versions.
+3. Use the `TargetPlatformIdentifier` property to condition on a .NETCoreApp platform specific target framework. Note that .NETStandard and .NETFramework target frameworks can't be platform specific.
Example:
```
- netstandard2.0;netstandard2.1
+ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)
+
+...
+...
+```
+Important: In contrast to the old `Targets*` checks, `TargetPlatformIdentifier` conditions apply to a single tfm only, inheritance between target frameworks can't be expressed. See the example below for Unix:
+```
+
+ $(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-android;$(NetCoreAppCurrent)-windows
-...
+
+...
```
-3. Use a StartsWith if the TargetFramework is overloaded with the OS portion.
+4. Set the `TargetPlatformIdentifier` property in the project to be able to condition on it in properties in the project file.
+That is necessary as the SDK sets the `TargetPlatformIdentifier` in a .targets file after the project is evaluated. Because of that, the property isn't available during the project's evaluation and must be set manually.
Example:
```
- netstandard2.0-windows;netstandard2.0-Unix
+ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-android
+
+
+
+ $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))
+ $(DefineConstants);ANDROID_USE_BUFFER
-...
+...
...
```
@@ -119,11 +142,10 @@ Example:
Library projects should use the following directory layout.
```
-src\\src - Contains the source code for the library.
+src\\gen - Contains source code for the assembly's source generator.
src\\ref - Contains any reference assembly projects for the library.
-src\\pkg - Contains package projects for the library.
+src\\src - Contains the source code for the library.
src\\tests - Contains the test code for a library.
-src\\gen - Contains source code for the assembly's source generator.
```
## ref
diff --git a/docs/design/coreclr/botr/clr-abi.md b/docs/design/coreclr/botr/clr-abi.md
index f7b01352de9224..8be4d5b47ef688 100644
--- a/docs/design/coreclr/botr/clr-abi.md
+++ b/docs/design/coreclr/botr/clr-abi.md
@@ -26,6 +26,8 @@ Arm corporation ABI documentation (for ARM32 and ARM64) is [here](https://develo
The Linux System V x86_64 ABI is documented in [System V Application Binary Interface / AMD64 Architecture Processor Supplement](https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf), with document source material [here](https://gitlab.com/x86-psABIs/x86-64-ABI).
+The LoongArch64 ABI documentation is [here](https://github.com/loongson/LoongArch-Documentation/blob/main/docs/LoongArch-ELF-ABI-EN.adoc)
+
# General Unwind/Frame Layout
For all non-x86 platforms, all methods must have unwind information so the garbage collector (GC) can unwind them (unlike native code in which a leaf method may be omitted).
@@ -752,3 +754,43 @@ The return value is handled as follows:
4. All other cases require the use of a return buffer, through which the value is returned.
In addition, there is a guarantee that if a return buffer is used a value is stored there only upon ordinary exit from the method. The buffer is not allowed to be used for temporary storage within the method and its contents will be unaltered if an exception occurs while executing the method.
+
+# Control Flow Guard (CFG) support on Windows
+
+Control Flow Guard (CFG) is a security mitigation available in Windows.
+When CFG is enabled, the operating system maintains data structures that can be used to verify whether an address is to be considered a valid indirect call target.
+This mechanism is exposed through two different helper functions, each with different characteristics.
+
+The first mechanism is a validator that takes the target address as an argument and fails fast if the address is not an expected indirect call target; otherwise, it does nothing and returns.
+The second mechanism is a dispatcher that takes the target address in a non-standard register; on successful validation of the address, it jumps directly to the target function.
+Windows makes the dispatcher available only on ARM64 and x64, while the validator is available on all platforms.
+However, the JIT supports CFG only on ARM64 and x64, with CFG by default being disabled for these platforms.
+The expected use of the CFG feature is for NativeAOT scenarios that are running in constrained environments where CFG is required.
+
+The helpers are exposed to the JIT as standard JIT helpers `CORINFO_HELP_VALIDATE_INDIRECT_CALL` and `CORINFO_HELP_DISPATCH_INDIRECT_CALL`.
+
+To use the validator the JIT expands indirect calls into a call to the validator followed by a call to the validated address.
+For the dispatcher the JIT will transform calls to pass the target along but otherwise set up the call as normal.
+
+Note that "indirect call" here refers to any call that is not to an immediate (in the instruction stream) address.
+For example, even direct calls may emit indirect call instructions in JIT codegen due to e.g. tiering or if they have not been compiled yet; these are expanded with the CFG mechanism as well.
+
+The next sections describe the calling convention that the JIT expects from these helpers.
+
+## CFG details for ARM64
+
+On ARM64, `CORINFO_HELP_VALIDATE_INDIRECT_CALL` takes the call address in `x15`.
+In addition to the usual registers it preserves all float registers, `x0`-`x8` and `x15`.
+
+`CORINFO_HELP_DISPATCH_INDIRECT_CALL` takes the call address in `x9`.
+The JIT does not use the dispatch helper by default due to worse branch predictor performance.
+Therefore it will expand all indirect calls via the validation helper and a manual call.
+
+## CFG details for x64
+
+On x64, `CORINFO_HELP_VALIDATE_INDIRECT_CALL` takes the call address in `rcx`.
+In addition to the usual registers it also preserves all float registers and `rcx` and `r10`; furthermore, shadow stack space is not required to be allocated.
+
+`CORINFO_HELP_DISPATCH_INDIRECT_CALL` takes the call address in `rax` and it reserves the right to use and trash `r10` and `r11`.
+The JIT uses the dispatch helper on x64 whenever possible as it is expected that the code size benefits outweighs the less accurate branch prediction.
+However, note that the use of `r11` in the dispatcher makes it incompatible with VSD calls where the JIT must fall back to the validator and a manual call.
diff --git a/docs/design/coreclr/botr/readytorun-format.md b/docs/design/coreclr/botr/readytorun-format.md
index 857282f30299c6..6bc9a5068d9e72 100644
--- a/docs/design/coreclr/botr/readytorun-format.md
+++ b/docs/design/coreclr/botr/readytorun-format.md
@@ -66,8 +66,9 @@ The limitations of the current format are:
# Structures
-The structures and accompanying constants are defined in the [readytorun.h]
-(https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/readytorun.h) header file.
+The structures and accompanying constants are defined in the
+[readytorun.h](https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/readytorun.h)
+header file.
Basically the entire R2R executable image is addressed through the READYTORUN_HEADER singleton
pointed to by the well-known export RTR_HEADER in the export section of the native executable
envelope.
diff --git a/docs/design/specs/Ecma-335-Augments.md b/docs/design/specs/Ecma-335-Augments.md
index 6e1900c1dc6bd0..447f9fb7b9cf4c 100644
--- a/docs/design/specs/Ecma-335-Augments.md
+++ b/docs/design/specs/Ecma-335-Augments.md
@@ -13,6 +13,7 @@ This is a list of additions and edits to be made in ECMA-335 specifications. It
- [Static Interface Methods](#static-interface-methods)
- [Covariant Return Types](#covariant-return-types)
- [Unsigned data conversion with overflow detection](#unsigned-data-conversion-with-overflow-detection)
+- [Ref field support](#ref-fields)
- [Rules for IL rewriters](#rules-for-il-rewriters)
## Signatures
@@ -453,7 +454,7 @@ https://www.ecma-international.org/publications-and-standards/standards/ecma-335
(Add second paragraph)
-Static interface methods may be marked as virtual. Valid object types implementing such interfaces shall provide implementations
+Static interface methods may be marked as virtual. Valid object types implementing such interfaces may provide implementations
for these methods by means of Method Implementations (II.15.1.4). Polymorphic behavior of calls to these methods is facilitated
by the constrained. call IL instruction where the constrained. prefix specifies the type to use for lookup of the static interface
method.
@@ -531,7 +532,6 @@ or static method actually implemented directly on the type.
(Add to the end of the 1st paragraph)
Interfaces may define static virtual methods that get resolved at runtime based on actual types involved.
-These static virtual methods must be marked as abstract in the defining interfaces.
### II.12.2 Implementing virtual methods on interfaces
@@ -754,7 +754,7 @@ the call itself doesn't involve any instance or `this` pointer.
(Edit bulleted section "This contains informative text only" starting at the bottom of page
233):
-Edit section *7.b*: Static | Virtual | !Abstract
+Remove section *7.b*: ~~Static | Virtual~~
(Add new section 41 after the last section 40:)
@@ -950,6 +950,48 @@ on the top of the stack is reinterpreted as an unsigned value before the convers
Note that integer values of less than 4 bytes are extended to int32 (not native int) on the
evaluation stack.
+## Ref Fields
+To improve the usefulness of ref structs, support for fields which are defined as ByRefs is needed. Currently their functionality can be approximated by Span fields, but not all types can be converted into Span types simply. In order to support these scenarios, support for generalizing ByRef fields, and converting TypedReference, ArgIterator and RuntimeArgumentHandle into following the normal rules of C# ref structs is desired. With this set of changes, it becomes possible to have ByRef fields of T, but support for pointers to ByRef fields or ByRefs to ByRefs is not added to the ECMA specification.
+
+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.2.1.1 Managed pointers and related types
+- First paragraph. Replace “Managed pointer types are only allowed for local variable (§I.8.6.1.3) and parameter signatures (§I.8.6.1.4); they cannot be used for field signatures (§I.8.6.1.2), as the element type of an array (§I.8.9.1), and boxing a value of managed pointer type is disallowed (§I.8.2.4).” with “Managed pointer types are only allowed for local variable (§I.8.6.1.3), parameter signatures (§I.8.6.1.4), and instance fields of byref-like types; they cannot be used for field signatures(§I.8.6.1.2) of static fields, or of instance fields of types which are not byref-like, as the element type of an array (§I.8.9.1), and boxing a value of managed pointer type is disallowed (§I.8.2.4).”
+- Add a new paragraph before the paragraph on the three special types. “Byref-like types are value types which may contain managed pointers, or pointers onto the VES stack. Byref-like types have the same restrictions as byrefs. Value types which are marked with the System.Runtime.CompilerServices.IsByRefLikeAttribute attribute are considered to be byref-like types.”
+- Replace “Typed references have the same restrictions as byrefs.” With “Typed references are byref-like types and have the same restrictions as normal byref-like types.”
+- Replace “They can be used for local variable and parameter signatures. The use of these types for fields, method return types, the element type of an array, or in boxing is not verifiable (§I.8.8). These two types are referred to as byref-like types.” With “If a function uses these types only for local variable and parameter signatures, then the use of those types is verifiable. Otherwise these types have the same restrictions as normal byref-like types.”
+
+### I.8.6.1.1
+- Add to the first paragraph a modified version of the third paragraph of I.8.6.1.3. "The typed reference ~~local variable signature~~ type signature states that the type is a structure which will contain both a managed pointer to a location and a runtime representation of the type that can be stored at that location. A typed reference signature is similar to a byref constraint(§I.8.6.1.2), but while the byref specifies the type as part of the byref constraint (and hence statically as part of the type description), a typed reference provides the type information dynamically."
+- Add a second paragraph which is a slight modification of the former fourth paragraph in section I.8.6.1.3. "The typed reference signature is actually represented as a built-in value type, like the integer and floating-point types. In the Base Class Library (see Partition IV Library) the type is known as System.TypedReference and in the assembly language used in Partition II it is designated by the keyword typedref. This type shall only be used for parameters, the type of a field, return values and local variables. It shall not be boxed, nor shall it be used as the type of an element of an array.
+- Move CLS Rule 14 to this section.
+
+### I.8.6.1.2
+- Move the contents of the byref constraint paragraph from Section I.8.6.1.3 to a bullet point.
+“- The byref constraint states that the content of the corresponding location is a managed pointer. A managed pointer can point to a local variable, parameter, field of a compound type, or element of an array. However, when a call crosses a remoting boundary (see §I.12.5) a conforming implementation can use a copy-in/copy-out mechanism instead of a managed pointer. Thus programs shall not rely on the aliasing behavior of true pointers. A managed pointer cannot point to another managed pointer, but a managed pointer can point to a byref-like type.”
+
+### I.8.6.1.3
+- Edit the second sentence of the first paragraph. "A local signature specifies the contract on a local variable allocated during the running of a method. A local signature contains a full location signature~~, plus it can specify one additional constraint:~~."
+- Remove the rest of this section. Its contents have been moved into sections I.8.6.1.1 and I.8.6.1.2
+
+### I.8.7
+- In the section about type compatibility when determining a type from a signature: The byref constraint is to be referenced from section I8.6.1.2 insetad of I.8.6.1.3
+
+### I.8.9.2
+- Insert at the end of the first paragraph “An unmanaged pointer type cannot point to a managed pointer.”
+
+Changes to signatures:
+### II.23.2.10
+- Remove special case for TYPEDBYREF
+
+### II.23.2.11
+- Remove special case for TYPEDBYREF
+
+### II.23.2.12
+- Add TYPEDBYREF as a form of Type
+
## Rules for IL Rewriters
There are apis such as `System.Runtime.CompilerServices.RuntimeHelpers.CreateSpan(...)` which require that the PE file have a particular structure. In particular, that api requires that the associated RVA of a FieldDef which is used to create a span must be naturally aligned over the data type that `CreateSpan` is instantiated over. There are 2 major concerns.
diff --git a/docs/project/api-review-process.md b/docs/project/api-review-process.md
index bb98907e741a91..673ec1f890e7e4 100644
--- a/docs/project/api-review-process.md
+++ b/docs/project/api-review-process.md
@@ -8,7 +8,28 @@ The rule of thumb is that we (**dotnet/runtime**) review every API that is being
## Process
-
+```mermaid
+sequenceDiagram
+ participant R as Requester
+ participant O as Runtime Owners
+ participant F as API review board
(FXDC)
+ R ->> O: Files issue under dotnet/runtime
+ note over O: Assigns owner
+
+ note over R, O: Discussion
+
+ O ->> F: Label api-ready-for-review
+
+ note over F: Performs review
+
+ alt is accepted
+ F ->> R: Label api-approved
+ else is work needed
+ F ->> O: Label api-needs-work
+ else is rejected
+ F ->> R: Issue is closed
+ end
+```
## Steps
diff --git a/docs/project/api-review-process.png b/docs/project/api-review-process.png
deleted file mode 100644
index 4a62bb3fba7fde..00000000000000
Binary files a/docs/project/api-review-process.png and /dev/null differ
diff --git a/docs/workflow/building/coreclr/linux-instructions.md b/docs/workflow/building/coreclr/linux-instructions.md
index d66627e3937ca0..f4166f0f0e49df 100644
--- a/docs/workflow/building/coreclr/linux-instructions.md
+++ b/docs/workflow/building/coreclr/linux-instructions.md
@@ -49,12 +49,12 @@ This table of images might often become stale as we change our images as our req
| OS | Target Arch | Image location | crossrootfs location | Clang Version |
| --------------------------- | --------------- | ---------------------------------------------------------------------------------------------------- | -------------------- | ------------- |
-| Ubuntu 16.04 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-a50a721-20191120200116` | - | -clang9 |
-| Alpine | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-20200602002639-0fc54a3` | - | -clang5.0 |
-| CentOS 7 (build for RHEL 7) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-359e48e-20200313130914` | - | -clang9 |
-| Ubuntu 16.04 | arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20200413125008-09ec757` | `/crossrootfs/arm` | -clang9 |
-| Ubuntu 16.04 | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20201022204150-b2c2436` | `/crossrootfs/arm64` | -clang9 |
-| Alpine | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20200413125008-406629a` | `/crossrootfs/arm64` | -clang9 |
+| Alpine | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210910135845-c401c85` | - | -clang5.0 |
+| CentOS 7 (build for RHEL 7) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-20210714125435-9b5bbc2` | - | -clang9 |
+| Ubuntu 16.04 (x64, arm ROOTFS) | arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20210719121212-8a8d3be` | `/crossrootfs/arm` | -clang9 |
+| Ubuntu 16.04 (x64, arm64 ROOTFS) | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be` | `/crossrootfs/arm64` | -clang9 |
+| Alpine (x64, arm ROOTFS) | arm | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm-alpine-20210923140502-78f7860` | `/crossrootfs/arm64` | -clang9 |
+| Alpine (x64, arm64 ROOTFS) | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210719121212-b2c2436` | `/crossrootfs/arm64` | -clang9 |
Environment
===========
diff --git a/docs/workflow/building/coreclr/nativeaot.md b/docs/workflow/building/coreclr/nativeaot.md
index 155ed05186e7b0..b7ae551c291a03 100644
--- a/docs/workflow/building/coreclr/nativeaot.md
+++ b/docs/workflow/building/coreclr/nativeaot.md
@@ -18,10 +18,12 @@ The AOT compiler typically takes the app, core libraries, and framework librarie
The executable looks like a native executable, in the sense that it can be debugged with native debuggers and have full-fidelity access to locals, and stepping information.
+The compiler also has a mode where each managed assembly can be compiled into a separate object file. The object files are later linked into a single executable using the platform linker. This mode is mostly used in testing (it's faster to compile this way because we don't need to recompiling the same code from e.g. CoreLib). It's not a shipping configuration and has many problems (requires exactly matching compilation settings, forfeits many optimizations, and has trouble around cross-module generic virtual method implementations).
+
## Building
- [Install pre-requisites](../../README.md#build-requirements)
-- Run `build[.cmd|.sh] clr+libs -rc [Debug|Release] -lc Release` from the repo root. This will restore nuget packages required for building and build the parts of the repo required for general CoreCLR development. Alternatively, instead of specifying `clr+libs`, you can specify `clr.jit+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs` which is more targeted and builds faster. Replace `clr.jit` with `clr.alljits` if you need to crosscompile.
+- Run `build[.cmd|.sh] clr+libs -rc [Debug|Release] -lc Release` from the repo root. This will restore nuget packages required for building and build the parts of the repo required for general CoreCLR development. Alternatively, instead of specifying `clr+libs`, you can specify `clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs` which is more targeted and builds faster.
- [NOT PORTED OVER YET] The build will place the toolchain packages at `artifacts\packages\[Debug|Release]\Shipping`. To publish your project using these packages:
- [NOT PORTED OVER YET] Add the package directory to your `nuget.config` file. For example, replace `dotnet-experimental` line in `samples\HelloWorld\nuget.config` with ``
- [NOT PORTED OVER YET] Run `dotnet publish --packages pkg -r [win-x64|linux-x64|osx-64] -c [Debug|Release]` to publish your project. `--packages pkg` option restores the package into a local directory that is easy to cleanup once you are done. It avoids polluting the global nuget cache with your locally built dev package.
@@ -65,15 +67,12 @@ To run all the tests that got built, run `src\tests\run.cmd runnativeaottests [D
To run an individual test (after it was built), navigate to the `artifacts\tests\coreclr\[Windows|Linux|OSX[.x64.[Debug|Release]\$path_to_test` directory. `$path_to_test` matches the subtree of `src\tests`. You should see a `[.cmd|.sh]` file there. This file is a script that will compile and launch the individual test for you. Before invoking the script, set the following environment variables:
-* CORE_ROOT=$repo_root\artifacts\tests\coreclr\[Windows|Linux|OSX[.x64.[Debug|Release]\Tests\Core_Root
-* RunNativeAot=1
-* __TestDotNetCmd=$repo_root\dotnet[.cmd|.sh]
+* CORE_ROOT=$repo_root\artifacts\tests\coreclr\[Windows|Linux|OSX].x64.[Debug|Release]\Tests\Core_Root
+* CLRCustomTestLauncher=$repo_root\src\tests\Common\scripts\nativeaottest[.cmd|.sh]
`$repo_root` is the root of your clone of the repo.
-By default the test suite will delete the build artifacts (Native AOT images and response files) if the test compiled successfully. If you want to keep these files instead of deleting them after test run, set the following environment variables and make sure you'll have enough disk space (tens of MB per test):
-
-* CLRTestNoCleanup=1
+Sometimes it's handy to be able to rebuild the managed test manually or run the compilation under a debugger. A response file that was used to invoke the ahead of time compiler can be found in `$repo_root\artifacts\tests\coreclr\obj\[Windows|Linux|OSX].x64.[Debug|Release]\Managed`.
For more advanced scenarios, look for at [Building Test Subsets](../../testing/coreclr/windows-test-instructions.md#building-test-subsets) and [Generating Core_Root](../../testing/coreclr/windows-test-instructions.md#generating-core_root)
diff --git a/docs/workflow/testing/libraries/testing-wasm.md b/docs/workflow/testing/libraries/testing-wasm.md
index da752eb2d5974e..e75c1761d77611 100644
--- a/docs/workflow/testing/libraries/testing-wasm.md
+++ b/docs/workflow/testing/libraries/testing-wasm.md
@@ -98,9 +98,9 @@ The following shows how to run tests for a specific library
### Passing arguments to xharness
-- `$(WasmXHarnessArgs)` - xharness command arguments
+- `$(WasmXHarnessArgsCli)` - xharness command arguments
- Example: `WasmXHarnessArgs="--set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST"` -> becomes `dotnet xharness wasm test --set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST`
+ Example: `WasmXHarnessArgsCli="--set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST"` -> becomes `dotnet xharness wasm test --set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST`
- `$(WasmXHarnessMonoArgs)` - arguments and variables for mono
diff --git a/eng/BeforeTargetFrameworkInference.targets b/eng/BeforeTargetFrameworkInference.targets
index 60b412845483fe..70de3444b58935 100644
--- a/eng/BeforeTargetFrameworkInference.targets
+++ b/eng/BeforeTargetFrameworkInference.targets
@@ -1,5 +1,22 @@
-
+
+ true
+ true
+
+
+ 0.0
+
+
+ <_EnableDefaultWindowsPlatform>false
+ <_targetPlatformIdentifier Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1))))
+
+
+
+ 1.0
+
diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig
index e5ae41903b5a76..e4d3c09e15b495 100644
--- a/eng/CodeAnalysis.src.globalconfig
+++ b/eng/CodeAnalysis.src.globalconfig
@@ -774,7 +774,7 @@ dotnet_diagnostic.CA5383.severity = none
# CA5384: Do Not Use Digital Signature Algorithm (DSA)
dotnet_diagnostic.CA5384.severity = warning
-# CA5385: Use RivestShamirAdleman (RSA) Algorithm With Sufficient Key Size
+# CA5385: Use Rivest-Shamir-Adleman (RSA) Algorithm With Sufficient Key Size
dotnet_diagnostic.CA5385.severity = warning
# CA5386: Avoid hardcoding SecurityProtocolType value
@@ -1448,6 +1448,7 @@ dotnet_diagnostic.IDE0059.severity = warning
# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = silent
+dotnet_code_quality_unused_parameters = non_public
# IDE0061: Use expression body for local functions
dotnet_diagnostic.IDE0061.severity = silent
@@ -1539,6 +1540,9 @@ dotnet_diagnostic.IDE0160.severity = silent
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent
+# IDE0190: Null check can be simplified
+dotnet_diagnostic.IDE0190.severity = suggestion
+
# IDE1005: Delegate invocation can be simplified.
dotnet_diagnostic.IDE1005.severity = suggestion
diff --git a/eng/CodeAnalysis.test.globalconfig b/eng/CodeAnalysis.test.globalconfig
index f56a38cfa707c0..6e8b42ea3606c7 100644
--- a/eng/CodeAnalysis.test.globalconfig
+++ b/eng/CodeAnalysis.test.globalconfig
@@ -1536,6 +1536,9 @@ dotnet_diagnostic.IDE0160.severity = silent
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent
+# IDE0190: Null check can be simplified
+dotnet_diagnostic.IDE0190.severity = silent
+
# IDE1005: Delegate invocation can be simplified.
dotnet_diagnostic.IDE1005.severity = silent
diff --git a/eng/Subsets.props b/eng/Subsets.props
index de8a2710eb6862..809af20968ecb1 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -249,7 +249,8 @@
-
+
+
@@ -268,7 +269,7 @@
-
+
@@ -302,7 +303,7 @@
-
+
@@ -312,7 +313,7 @@
-
+
@@ -389,12 +390,12 @@
-
+
-
+
diff --git a/eng/TraversalSdk.AfterTargets.targets b/eng/TraversalSdk.AfterTargets.targets
new file mode 100644
index 00000000000000..f88c48dc8677d6
--- /dev/null
+++ b/eng/TraversalSdk.AfterTargets.targets
@@ -0,0 +1,18 @@
+
+
+
+
+ $(BuildDependsOn);ResolveP2PReferences
+ $(CleanDependsOn);ResolveP2PReferences
+ $(RebuildDependsOn);ResolveP2PReferences
+ $(TestDependsOn);ResolveP2PReferences
+ $(VSTestDependsOn);ResolveP2PReferences
+ $(PackDependsOn);ResolveP2PReferences
+ $(PublishDependsOn);ResolveP2PReferences
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 92252a1296afd1..a2956685387629 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,258 +1,258 @@
-
+
https://github.com/dotnet/icu
- cd095b0fb4c6f8adca9e44ef17346b3e13a73a7c
+ 4f251e7593b1150af58bba4f461698d6d4a1eb95
https://github.com/dotnet/msquic
a7213b4676c1803bb251771291a525482d42e511
-
+
https://github.com/dotnet/emsdk
- 8f6606fae08ffa42b025dc42ebe2eea91db3a242
+ b2054b98cb7b9e555cbbe19955df823ec81a93ad
https://github.com/dotnet/wcf
7f504aabb1988e9a093c1e74d8040bd52feb2f01
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/llvm-project
- afc9070f64d110ce2bf029a4a624b9dd1c6dbffd
+ d707b379670052dbb926739c1f060aa11f442f30
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 4f26404a6ca1061e385e53501954bd5edda20bf2
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
https://github.com/microsoft/vstest
140434f7109d357d0158ade9e5164a4861513965
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/llvm-project
- 20080e62c2ea6ed059be57b88268dd8cd28604e6
+ b26427d9a80114d6e2cf5c3c4e06fdfa7e87dc4a
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/runtime
- bc6d349ecd72eec162f0532e6b6218fdbaa07ddb
+ 6e05d78deba320a54ef10a265c6025bbb686efe6
-
+
https://github.com/dotnet/linker
- 3f704bb49eb2fb2847ceaecfbabe8d5f3e0c86c9
+ 6e11d057a88b3fb403bfbb90317518c94e3e84a7
-
+
https://github.com/dotnet/xharness
- 4d24e26939bf0770047cd59299235cf6caa86cdb
+ 31b805073edc56934e514f3bcc544d952e19d062
-
+
https://github.com/dotnet/xharness
- 4d24e26939bf0770047cd59299235cf6caa86cdb
+ 31b805073edc56934e514f3bcc544d952e19d062
-
+
https://github.com/dotnet/xharness
- 4d24e26939bf0770047cd59299235cf6caa86cdb
+ 31b805073edc56934e514f3bcc544d952e19d062
-
+
https://github.com/dotnet/arcade
- 4d6406fa2e84c8516a338694be3a4097e6e1f104
+ 6d977266bcc193caedb60a27ae44d14d9a11a040
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
@@ -270,17 +270,17 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
47c55c3cf08885d691aa9d581d40310fe448c1ea
-
+
https://github.com/dotnet/hotreload-utils
- 3d4988f053ae6b9803e76687b02fee3f8a83156c
+ 8d7976f50a89b3e5912260d3111a9d3135d3ca39
-
+
https://github.com/dotnet/runtime-assets
- 8813c6d9e73b5cb0b4ccf4c0b8c609ad344636a7
+ 39b73ee08e14336994b303d39483b5d6ddfe63e4
-
+
https://github.com/dotnet/roslyn-analyzers
- 60eb13c44c366205e5a4dec195404477009c41de
+ 97d7b2d0554dda1cccf60f74bcb01ee810cdfc16
https://github.com/dotnet/sdk
diff --git a/eng/Versions.props b/eng/Versions.props
index aef6a22a358d5b..2c0993b6f3af92 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,7 +8,7 @@
0
7.0.100
preview
- 2
+ 3
$(MajorVersion).$(MinorVersion).0.0
@@ -20,6 +20,7 @@
false
false
$(AssemblyVersion)
+ true
+ 4.2.0-2.22105.4
2.0.0-alpha.1.21525.11
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 2.5.1-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22102.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
- 7.0.0-beta.22080.1
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 2.5.1-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22117.1
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
+ 7.0.0-beta.22114.7
6.0.0-preview.1.102
- 7.0.0-preview.2.22080.2
- 7.0.0-preview.2.22080.2
- 7.0.0-preview.2.22080.2
+ 7.0.0-preview.2.22113.2
+ 7.0.0-preview.2.22113.2
+ 7.0.0-preview.2.22113.2
3.1.0
- 7.0.0-preview.2.22080.2
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
- 1.0.0-alpha.1.22073.1
+ 7.0.0-preview.2.22113.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
+ 1.0.0-alpha.1.22104.2
- 5.0.0
+ 6.0.0
4.3.0
5.0.0
- 1.2.0-beta.304
+ 1.2.0-beta.406
4.5.1
4.3.0
- 5.0.0
+ 6.0.0
5.0.0
- 4.8.2
+ 4.8.3
4.5.0
4.3.0
4.3.0
@@ -106,7 +109,7 @@
4.5.4
4.3.1
4.5.0
- 5.0.0
+ 6.0.0
4.7.0
4.7.0
4.7.0
@@ -120,25 +123,25 @@
5.0.0
5.0.0
5.0.0
- 4.9.0-rc2.21473.1
- 7.0.0-preview.2.22080.2
- 7.0.0-preview.2.22080.2
+ 4.9.0
+ 7.0.0-preview.2.22113.2
+ 7.0.0-preview.2.22113.2
4.5.4
4.5.0
- 7.0.0-preview.2.22080.2
+ 7.0.0-preview.2.22113.2
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
- 7.0.0-beta.22075.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
+ 7.0.0-beta.22115.1
1.0.0-prerelease.22078.3
1.0.0-prerelease.22078.3
@@ -161,40 +164,40 @@
1.0.1-prerelease-00006
16.9.0-preview-20201201-01
- 1.0.0-prerelease.22101.2
- 1.0.0-prerelease.22101.2
- 1.0.0-prerelease.22101.2
- 1.0.2-alpha.0.22081.2
+ 1.0.0-prerelease.22114.1
+ 1.0.0-prerelease.22114.1
+ 1.0.0-prerelease.22114.1
+ 1.0.2-alpha.0.22114.2
2.4.2-pre.22
0.12.0-pre.20
2.4.2
- 3.1.0
+ 3.1.2
12.0.3
2.0.4
4.12.0
2.14.3
7.0.100-alpha.1.21528.1
- 1.1.1-beta1.21467.5
+ 1.1.1-beta1.22103.1
6.0.0-preview-20220104.1
- 7.0.100-1.22081.3
+ 7.0.100-1.22115.2
$(MicrosoftNETILLinkTasksVersion)
- 7.0.0-preview.2.22101.1
+ 7.0.0-preview.2.22081.1
7.0.0-alpha.1.21529.3
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
- 11.1.0-alpha.1.22081.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
+ 11.1.0-alpha.1.22114.2
- 7.0.0-alpha.2.22102.3
+ 7.0.0-alpha.2.22077.1
$(MicrosoftNETWorkloadEmscriptenManifest70100Version)
1.1.87-gba258badda
diff --git a/eng/actions/backport/index.js b/eng/actions/backport/index.js
index 49a2c740108813..3cc1a57312ac92 100644
--- a/eng/actions/backport/index.js
+++ b/eng/actions/backport/index.js
@@ -39,7 +39,7 @@ async function run() {
console.log(`Verified ${comment_user} is a repo collaborator.`);
} catch (error) {
console.log(error);
- throw new BackportException(`Error: @${comment_user} is not a repo collaborator, backporting is not allowed.`);
+ throw new BackportException(`Error: @${comment_user} is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your Microsoft team membership visibility is set to Public on https://github.com/orgs/microsoft/people?query=${comment_user}`);
}
try { await exec.exec(`git ls-remote --exit-code --heads origin ${target_branch}`) } catch { throw new BackportException(`Error: The specified backport target branch ${target_branch} wasn't found in the repo.`); }
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index f97dca77054089..7e4be9a0ccfbf3 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -120,6 +120,15 @@ while :; do
__UbuntuRepo="http://ftp.debian.org/debian/"
__CodeName=jessie
;;
+ ppc64le)
+ __BuildArch=ppc64le
+ __UbuntuArch=ppc64el
+ __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
+ ;;
s390x)
__BuildArch=s390x
__UbuntuArch=s390x
diff --git a/eng/common/cross/ppc64le/sources.list.bionic b/eng/common/cross/ppc64le/sources.list.bionic
new file mode 100644
index 00000000000000..2109557409576d
--- /dev/null
+++ b/eng/common/cross/ppc64le/sources.list.bionic
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index fba2afda438b66..9fd345bde6d409 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -54,6 +54,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
if(TIZEN)
set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0")
endif()
+elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
+ set(CMAKE_SYSTEM_PROCESSOR ppc64le)
+ set(TOOLCHAIN "powerpc64le-linux-gnu")
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
set(CMAKE_SYSTEM_PROCESSOR s390x)
set(TOOLCHAIN "s390x-linux-gnu")
@@ -67,7 +70,7 @@ elseif (ILLUMOS)
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(TOOLCHAIN "x86_64-illumos")
else()
- message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, armv6, arm64, s390x and x86 are supported!")
+ message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, armv6, arm64, ppc64le, s390x and x86 are supported!")
endif()
if(DEFINED ENV{TOOLCHAIN})
@@ -201,7 +204,7 @@ endif()
# Specify compile options
-if((TARGET_ARCH_NAME MATCHES "^(arm|armv6|armel|arm64|s390x)$" AND NOT ANDROID) OR ILLUMOS)
+if((TARGET_ARCH_NAME MATCHES "^(arm|armv6|armel|arm64|ppc64le|s390x)$" AND NOT ANDROID) OR ILLUMOS)
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1
new file mode 100644
index 00000000000000..a733a8885824a9
--- /dev/null
+++ b/eng/common/generate-sbom-prep.ps1
@@ -0,0 +1,19 @@
+Param(
+ [Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
+)
+
+Write-Host "Creating dir $ManifestDirPath"
+# create directory for sbom manifest to be placed
+if (!(Test-Path -path $ManifestDirPath))
+{
+ New-Item -ItemType Directory -path $ManifestDirPath
+ Write-Host "Successfully created directory $ManifestDirPath"
+}
+else{
+ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
+}
+
+Write-Host "Updating artifact name"
+$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_'
+Write-Host "Artifact name $artifact_name"
+Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name"
diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh
new file mode 100644
index 00000000000000..f6c77453142a28
--- /dev/null
+++ b/eng/common/generate-sbom-prep.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+manifest_dir=$1
+
+if [ ! -d "$manifest_dir" ] ; then
+ mkdir -p "$manifest_dir"
+ echo "Sbom directory created." $manifest_dir
+else
+ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
+fi
+
+artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM"
+echo "Artifact name before : "$artifact_name
+# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts.
+safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}"
+echo "Artifact name after : "$safe_artifact_name
+export ARTIFACT_NAME=$safe_artifact_name
+echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name"
+
+exit 0
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index c5c2a9915121b3..e3ba9398016be8 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -31,6 +31,10 @@ parameters:
name: ''
preSteps: []
runAsPublic: false
+# Sbom related params
+ enableSbom: true
+ PackageVersion: 7.0.0
+ BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
jobs:
- job: ${{ parameters.name }}
@@ -140,6 +144,7 @@ jobs:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }}:
- task: ComponentGovernanceComponentDetection@0
+ continueOnError: true
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
@@ -247,3 +252,10 @@ jobs:
ArtifactName: AssetManifests
continueOnError: ${{ parameters.continueOnError }}
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
+
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
+ - template: /eng/common/templates/steps/generate-sbom.yml
+ parameters:
+ PackageVersion: ${{ parameters.packageVersion}}
+ BuildDropPath: ${{ parameters.buildDropPath }}
+
diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml
index 70d44735ace4a9..6976330862c20d 100644
--- a/eng/common/templates/jobs/jobs.yml
+++ b/eng/common/templates/jobs/jobs.yml
@@ -41,6 +41,11 @@ parameters:
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
+# Sbom related params
+ enableSbom: true
+ PackageVersion: 7.0.0
+ BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+
jobs:
- ${{ each job in parameters.jobs }}:
- template: ../job/job.yml
diff --git a/eng/common/templates/steps/generate-sbom.yml b/eng/common/templates/steps/generate-sbom.yml
new file mode 100644
index 00000000000000..4cea8c33187c91
--- /dev/null
+++ b/eng/common/templates/steps/generate-sbom.yml
@@ -0,0 +1,44 @@
+# BuildDropPath - The root folder of the drop directory for which the manifest file will be generated.
+# PackageName - The name of the package this SBOM represents.
+# PackageVersion - The version of the package this SBOM represents.
+# ManifestDirPath - The path of the directory where the generated manifest files will be placed
+
+parameters:
+ PackageVersion: 7.0.0
+ BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+ PackageName: '.NET'
+ ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
+ sbomContinueOnError: true
+
+steps:
+- task: PowerShell@2
+ displayName: Prep for SBOM generation in (Non-linux)
+ condition: or(eq(variables['Agent.Os'], 'Windows_NT'), eq(variables['Agent.Os'], 'Darwin'))
+ inputs:
+ filePath: ./eng/common/generate-sbom-prep.ps1
+ arguments: ${{parameters.manifestDirPath}}
+
+# Chmodding is a workaround for https://github.com/dotnet/arcade/issues/8461
+- script: |
+ chmod +x ./eng/common/generate-sbom-prep.sh
+ ./eng/common/generate-sbom-prep.sh ${{parameters.manifestDirPath}}
+ displayName: Prep for SBOM generation in (Linux)
+ condition: eq(variables['Agent.Os'], 'Linux')
+ continueOnError: ${{ parameters.sbomContinueOnError }}
+
+- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
+ displayName: 'Generate SBOM manifest'
+ continueOnError: ${{ parameters.sbomContinueOnError }}
+ inputs:
+ PackageName: ${{ parameters.packageName }}
+ BuildDropPath: ${{ parameters.buildDropPath }}
+ PackageVersion: ${{ parameters.packageVersion }}
+ ManifestDirPath: ${{ parameters.manifestDirPath }}
+
+- task: PublishPipelineArtifact@1
+ displayName: Publish SBOM manifest
+ continueOnError: ${{parameters.sbomContinueOnError}}
+ inputs:
+ targetPath: '${{parameters.manifestDirPath}}'
+ artifactName: $(ARTIFACT_NAME)
+
diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml
index d85d6d07d5c7b0..12a8ff94d8e960 100644
--- a/eng/common/templates/steps/source-build.yml
+++ b/eng/common/templates/steps/source-build.yml
@@ -43,8 +43,8 @@ steps:
# In that case, add variables to allow the download of internal runtimes if the specified versions are not found
# in the default public locations.
internalRuntimeDownloadArgs=
- if [ '$(dotnetclimsrc-read-sas-token-base64)' != '$''(dotnetclimsrc-read-sas-token-base64)' ]; then
- internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) --runtimesourcefeed https://dotnetclimsrc.blob.core.windows.net/dotnet --runtimesourcefeedkey $(dotnetclimsrc-read-sas-token-base64)'
+ if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then
+ internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
fi
buildConfig=Release
diff --git a/eng/formatting/format.sh b/eng/formatting/format.sh
index eb4908c078c8a2..077bbd750fef5c 100755
--- a/eng/formatting/format.sh
+++ b/eng/formatting/format.sh
@@ -16,7 +16,7 @@ if [ -n "$NATIVE_FILES" ]; then
fi
if [ -n "$MANAGED_FILES" ]; then
# Format all selected files
- echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format --include
+ echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format --no-restore --include -
# Add back the modified files to staging
echo "$MANAGED_FILES" | xargs git add
diff --git a/eng/illink.targets b/eng/illink.targets
index d88f0862621419..eecd3163559b6c 100644
--- a/eng/illink.targets
+++ b/eng/illink.targets
@@ -9,7 +9,6 @@
$(TargetsTriggeredByCompilation);
- _SetILLinkTrimAssembly;
ILLinkTrimAssembly
@@ -199,14 +198,6 @@
-
-
-
- false
-
-
-
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index c2f64bf1abf8a5..8f91d3e6e42574 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -25,6 +25,7 @@
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'sharedFramework'))
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'crossgen2'))
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'ilc'))
+ $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'ilc'))
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'aotsdk'))
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build'))
diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
index b67594cb60fb2a..b3ec6146f582e0 100644
--- a/eng/native/configurecompiler.cmake
+++ b/eng/native/configurecompiler.cmake
@@ -390,6 +390,10 @@ if (CLR_CMAKE_HOST_UNIX)
add_compile_options(-Wno-unused-but-set-variable)
+ # Turn off floating point expression contraction because it is considered a value changing
+ # optimization in the IEEE 754 specification and is therefore considered unsafe.
+ add_compile_options(-ffp-contract=off)
+
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-unknown-warning-option)
@@ -489,10 +493,16 @@ if(CLR_CMAKE_TARGET_UNIX)
add_compile_definitions($<$>>:TARGET_ANDROID>)
elseif(CLR_CMAKE_TARGET_LINUX)
add_compile_definitions($<$>>:TARGET_LINUX>)
+ if(CLR_CMAKE_TARGET_LINUX_MUSL)
+ add_compile_definitions($<$>>:TARGET_LINUX_MUSL>)
+ endif()
elseif(CLR_CMAKE_TARGET_NETBSD)
add_compile_definitions($<$>>:TARGET_NETBSD>)
elseif(CLR_CMAKE_TARGET_SUNOS)
add_compile_definitions($<$>>:TARGET_SUNOS>)
+ if(CLR_CMAKE_TARGET_OS_ILLUMOS)
+ add_compile_definitions($<$>>:TARGET_ILLUMOS>)
+ endif()
endif()
else(CLR_CMAKE_TARGET_UNIX)
add_compile_definitions($<$>>:TARGET_WINDOWS>)
diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
index ecf10a8d4c39ef..0b457f41744b34 100644
--- a/eng/native/configureplatform.cmake
+++ b/eng/native/configureplatform.cmake
@@ -70,6 +70,11 @@ if(CLR_CMAKE_HOST_OS STREQUAL Linux)
COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ execute_process(
+ COMMAND bash -c "if strings \"${CMAKE_SYSROOT}/usr/bin/ldd\" 2>&1 | grep -q musl; then echo musl; fi"
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_MUSL
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(DEFINED CLR_CMAKE_LINUX_ID)
@@ -80,6 +85,10 @@ if(CLR_CMAKE_HOST_OS STREQUAL Linux)
set(CLR_CMAKE_HOST_ALPINE_LINUX 1)
set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
endif()
+
+ if(CLR_CMAKE_LINUX_MUSL STREQUAL musl)
+ set(CLR_CMAKE_HOST_LINUX_MUSL 1)
+ endif()
endif(DEFINED CLR_CMAKE_LINUX_ID)
endif(CLR_CMAKE_HOST_OS STREQUAL Linux)
@@ -314,6 +323,10 @@ if(CLR_CMAKE_TARGET_OS STREQUAL Linux)
set(CLR_CMAKE_TARGET_LINUX 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL Linux)
+if(CLR_CMAKE_HOST_LINUX_MUSL)
+ set(CLR_CMAKE_TARGET_LINUX_MUSL 1)
+endif(CLR_CMAKE_HOST_LINUX_MUSL)
+
if(CLR_CMAKE_TARGET_OS STREQUAL tizen)
set(CLR_CMAKE_TARGET_UNIX 1)
set(CLR_CMAKE_TARGET_LINUX 1)
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
index 0c28f75706de19..6ff45a86fbb613 100644
--- a/eng/native/functions.cmake
+++ b/eng/native/functions.cmake
@@ -15,7 +15,7 @@ function(h2inc filename output)
get_filename_component(path "${filename}" DIRECTORY)
file(RELATIVE_PATH relative_filename "${CLR_REPO_ROOT_DIR}" "${filename}")
- file(APPEND "${output}" "// File start: ${relative_filename}\n")
+ file(WRITE "${output}" "// File start: ${relative_filename}\n")
# Use of NEWLINE_CONSUME is needed for lines with trailing backslash
file(STRINGS ${filename} contents NEWLINE_CONSUME)
diff --git a/eng/packaging.targets b/eng/packaging.targets
index 7a29b7d99273d1..eb182df8e553bf 100644
--- a/eng/packaging.targets
+++ b/eng/packaging.targets
@@ -9,10 +9,10 @@
BeforePack must be used. Setting both to ensure that we are always running before other targets. -->
AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(PackDependsOn)
AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack)
- $(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludePrivateProjectReferencesWithPackAttributeInPackage
- false
+ $(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludeProjectReferencesWithPackAttributeInPackage
+ false
- true
+ true
$(MSBuildThisFileDirectory)useSharedDesignerContext.txt
@@ -43,7 +43,7 @@
$(Version)-$(VersionSuffix)
<_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true
<_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true
- <_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true
+ <_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(IsNetCoreAppRef)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true
$(MajorVersion).$(MinorVersion).0.$(ServicingVersion)
@@ -101,7 +101,7 @@
DocumentationProjectOutputGroup;
SatelliteDllsProjectOutputGroup;
$(TargetsForTfmSpecificBuildOutput)"
- Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetPlatformIdentifier)' != ''">
+ Condition="'$(TargetPlatformIdentifier)' != ''">
$(TargetDir)$(TargetName).pdb
<_packageTargetRuntime>$(TargetPlatformIdentifier.ToLowerInvariant().Replace('windows', 'win'))
@@ -226,12 +226,12 @@
-
- <_projectReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'all')->WithMetadataValue('Pack', 'true'))" />
+ <_projectReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('Pack', 'true'))" />
-
+ or(
+ eq(variables['alwaysRunVar'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)_$(_hostedOs)
+ extraHelixArguments: /p:BrowserHost=$(_hostedOs)
+ scenarios:
+ - buildwasmapps
diff --git a/eng/pipelines/common/templates/wasm-debugger-tests.yml b/eng/pipelines/common/templates/wasm-debugger-tests.yml
new file mode 100644
index 00000000000000..49ad67739f0cb5
--- /dev/null
+++ b/eng/pipelines/common/templates/wasm-debugger-tests.yml
@@ -0,0 +1,42 @@
+parameters:
+ alwaysRun: false
+ isExtraPlatformsBuild: false
+ platforms: []
+
+jobs:
+
+# Wasm debugger tests - windows
+- 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: ${{ parameters.platforms }}
+ variables:
+ # map dependencies variables to local variables
+ - name: wasmdebuggertestsContainsChange
+ value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'] ]
+ - name: allWasmContainsChange
+ value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
+ - name: alwaysRunVar
+ value: ${{ parameters.alwaysRun }}
+ jobParameters:
+ testGroup: innerloop
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ nameSuffix: Mono_DebuggerTests
+ buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmDebuggerTests=true /p:TestAssemblies=false /p:BrowserHost=$(_hostedOs)
+ timeoutInMinutes: 180
+ condition: >-
+ or(
+ eq(variables['alwaysRunVar'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ extraHelixArguments: /p:BrowserHost=$(_hostedOs)
+ scenarios:
+ - wasmdebuggertests
diff --git a/eng/pipelines/common/templates/wasm-library-aot-tests.yml b/eng/pipelines/common/templates/wasm-library-aot-tests.yml
new file mode 100644
index 00000000000000..395d84535c0032
--- /dev/null
+++ b/eng/pipelines/common/templates/wasm-library-aot-tests.yml
@@ -0,0 +1,24 @@
+parameters:
+ alwaysRun: false
+ extraBuildArgs: ''
+ extraHelixArgs: ''
+ isExtraPlatformsBuild: false
+ nameSuffix: ''
+ platforms: []
+ runAOT: false
+ runSmokeOnlyArg: ''
+
+jobs:
+
+#
+# Build for Browser/wasm, with EnableAggressiveTrimming=true
+#
+- template: /eng/pipelines/common/templates/wasm-library-tests.yml
+ parameters:
+ platforms: ${{ parameters.platforms }}
+ nameSuffix: ${{ parameters.nameSuffix }}
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ extraBuildArgs: /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=${{ parameters.runAOT }} ${{ parameters.extraBuildArgs }}
+ extraHelixArgs: /p:NeedsToBuildWasmAppsOnHelix=true ${{ parameters.extraHelixArgs }}
+ alwaysRun: ${{ parameters.alwaysRun }}
+ runSmokeOnlyArg: $(_runSmokeTestsOnlyArg)
diff --git a/eng/pipelines/common/templates/wasm-library-tests.yml b/eng/pipelines/common/templates/wasm-library-tests.yml
new file mode 100644
index 00000000000000..539e2ffa693590
--- /dev/null
+++ b/eng/pipelines/common/templates/wasm-library-tests.yml
@@ -0,0 +1,54 @@
+parameters:
+ alwaysRun: false
+ extraBuildArgs: ''
+ extraHelixArgs: ''
+ isExtraPlatformsBuild: false
+ nameSuffix: ''
+ platforms: []
+ runSmokeOnlyArg: ''
+ scenarios: ['normal']
+
+jobs:
+
+#
+# Build for Browser/wasm and test it
+#
+- 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: ${{ parameters.platforms }}
+ 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'] ]
+ - name: alwaysRunVar
+ value: ${{ parameters.alwaysRun }}
+ - name: allWasmContainsChange
+ value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
+ jobParameters:
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ testGroup: innerloop
+ nameSuffix: LibraryTests${{ parameters.nameSuffix }}
+ buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=$(_hostedOs) ${{ parameters.runSmokeOnlyArg }} ${{ parameters.extraBuildArgs }}
+ timeoutInMinutes: 180
+ # always run for runtime-wasm builds (triggered manually)
+ # Always run for rolling builds
+ # Else run on path changes
+ condition: >-
+ or(
+ eq(variables['alwaysRunVar'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ extraHelixArguments: /p:BrowserHost=$(_hostedOs) ${{ parameters.runSmokeOnlyArg }} ${{ parameters.extraHelixArgs }}
+ scenarios: ${{ parameters.scenarios }}
diff --git a/eng/pipelines/common/templates/wasm-runtime-tests.yml b/eng/pipelines/common/templates/wasm-runtime-tests.yml
new file mode 100644
index 00000000000000..aa7e4257764bde
--- /dev/null
+++ b/eng/pipelines/common/templates/wasm-runtime-tests.yml
@@ -0,0 +1,42 @@
+parameters:
+ alwaysRun: false
+ isExtraPlatformsBuild: false
+ platforms: []
+
+jobs:
+
+#
+# Build the whole product using Mono and run runtime tests
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: mono
+ platforms: ${{ parameters.platforms }}
+ variables:
+ - name: allWasmContainsChange
+ value: $[ dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'] ]
+ - name: alwaysRunVar
+ value: ${{ parameters.alwaysRun }}
+ - name: timeoutPerTestInMinutes
+ value: 10
+ - name: timeoutPerTestCollectionInMinutes
+ value: 200
+ jobParameters:
+ testGroup: innerloop
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ nameSuffix: AllSubsets_Mono_RuntimeTests
+ buildArgs: -s mono+libs -c $(_BuildConfig)
+ timeoutInMinutes: 180
+ condition: >-
+ or(
+ eq(variables['alwaysRunVar'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_allwasm.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true))
+ extraStepsTemplate: /eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml
index 6e378369aa4fc6..9838ab6816ae86 100644
--- a/eng/pipelines/common/variables.yml
+++ b/eng/pipelines/common/variables.yml
@@ -17,6 +17,12 @@ variables:
value: ${{ eq(variables['Build.DefinitionName'], 'runtime-extra-platforms') }}
- name: isNotExtraPlatformsBuild
value: ${{ ne(variables['Build.DefinitionName'], 'runtime-extra-platforms') }}
+- name: isWasmOnlyBuild
+ value: ${{ eq(variables['Build.DefinitionName'], 'runtime-wasm') }}
+- name: isRunSmokeTestsOnly
+ value: ${{ and(ne(variables['Build.DefinitionName'], 'runtime-extra-platforms'), ne(variables['Build.DefinitionName'], 'runtime-wasm')) }}
+- name: isNotSpecificPlatformOnlyBuild
+ value: ${{ ne(variables['Build.DefinitionName'], 'runtime-wasm') }}
# We only run evaluate paths on runtime, runtime-staging and runtime-community pipelines on PRs
# keep in sync with /eng/pipelines/common/xplat-setup.yml
diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml
index e397bcdd456a60..6ea24574d3a768 100644
--- a/eng/pipelines/common/xplat-setup.yml
+++ b/eng/pipelines/common/xplat-setup.yml
@@ -49,8 +49,8 @@ jobs:
value: $(buildConfigUpper)
- name: _runSmokeTestsOnlyArg
- value: '/p:RunSmokeTestsOnly=$(isNotExtraPlatformsBuild)'
-
+ value: '/p:RunSmokeTestsOnly=$(isRunSmokeTestsOnly)'
+
- name: _hostedOs
value: ${{ parameters.jobParameters.hostedOs }}
@@ -67,6 +67,8 @@ jobs:
value: '\'
- name: _msbuildCommand
value: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -ci
+ - name: _warnAsErrorParamHelixOverride
+ value: -warnaserror 0
- name: setScriptToEchoAndFailOnNonZero
value: ''
- name: logRootNameArg
@@ -85,6 +87,8 @@ jobs:
value: '/'
- name: _msbuildCommand
value: ./eng/common/msbuild.sh --ci
+ - name: _warnAsErrorParamHelixOverride
+ value: --warnaserror false
# Set the bash script to display each command, and stop if any command exits nonzero.
- name: setScriptToEchoAndFailOnNonZero
value: 'set -xe'
diff --git a/eng/pipelines/coreclr/jit-cfg.yml b/eng/pipelines/coreclr/jit-cfg.yml
new file mode 100644
index 00000000000000..ed1a26720856ed
--- /dev/null
+++ b/eng/pipelines/coreclr/jit-cfg.yml
@@ -0,0 +1,48 @@
+trigger: none
+
+schedules:
+- cron: "0 22 * * 0,6"
+ displayName: Sun at 2: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
+ - Linux_x64
+ - windows_arm64
+ - windows_x64
+ - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
+ jobParameters:
+ testGroup: jit-cfg
+
+- 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: jit-cfg
+
+- 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: jit-cfg
+ liveLibrariesBuildConfig: Release
diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml
index 272433f32f3e25..a44c7223039580 100644
--- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml
+++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml
@@ -16,7 +16,7 @@ steps:
# Build coreclr native test output
- ${{ if eq(parameters.osGroup, 'windows') }}:
- - script: $(Build.SourcesDirectory)/src/tests/build.cmd nativeaot $(buildConfigUpper) ${{ parameters.archType }} ${{ parameters.testFilter }} /p:NativeAotMultimodule=true
+ - script: $(Build.SourcesDirectory)/src/tests/build.cmd nativeaot $(buildConfigUpper) ${{ parameters.archType }} ${{ parameters.testFilter }} /p:BuildNativeAotFrameworkObjects=true
displayName: Build tests
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: $(Build.SourcesDirectory)/src/tests/build.sh nativeaot $(buildConfigUpper) ${{ parameters.archType }} '${{ parameters.testFilter }}'
@@ -29,7 +29,3 @@ steps:
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: $(Build.SourcesDirectory)/src/tests/run.sh --runnativeaottests $(buildConfigUpper) ${{ parameters.archType }}
displayName: Run tests in single file mode
-
- - ${{ if eq(parameters.osGroup, 'windows') }}:
- - script: $(Build.SourcesDirectory)/src/tests/run.cmd runnativeaottests nativeaotmultimodule $(buildConfigUpper) ${{ parameters.archType }}
- displayName: Run tests in multifile mode
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index 278648bc277afb..f40f7dc23daeca 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -484,28 +484,29 @@ jobs:
additionalSetupParameters: '--latestdotnet'
logicalmachine: 'perftiger'
- # build maui runtime packs
- - template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- buildConfig: release
- runtimeFlavor: mono
- platforms:
- - Android_x86
- - Android_x64
- - Android_arm
- - Android_arm64
- - MacCatalyst_x64
- - iOSSimulator_x64
- - iOS_arm64
- - iOS_arm
- jobParameters:
- buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
- nameSuffix: Maui_Packs_Mono
- isOfficialBuild: false
- extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
- extraStepsParameters:
- name: MonoRuntimePacks
+ # Uncomment to reenable package replacement
+ ## build maui runtime packs
+ #- template: /eng/pipelines/common/platform-matrix.yml
+ # parameters:
+ # jobTemplate: /eng/pipelines/common/global-build-job.yml
+ # buildConfig: release
+ # runtimeFlavor: mono
+ # platforms:
+ # - Android_x86
+ # - Android_x64
+ # - Android_arm
+ # - Android_arm64
+ # - MacCatalyst_x64
+ # - iOSSimulator_x64
+ # - iOS_arm64
+ # - iOS_arm
+ # jobParameters:
+ # buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+ # nameSuffix: Maui_Packs_Mono
+ # isOfficialBuild: false
+ # extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
+ # extraStepsParameters:
+ # name: MonoRuntimePacks
# build maui app
- template: /eng/pipelines/common/platform-matrix.yml
@@ -516,15 +517,16 @@ jobs:
platforms:
- iOS_arm64
jobParameters:
- dependsOn:
- - Build_Android_arm_release_Maui_Packs_Mono
- - Build_Android_arm64_release_Maui_Packs_Mono
- - Build_Android_x86_release_Maui_Packs_Mono
- - Build_Android_x64_release_Maui_Packs_Mono
- - Build_MacCatalyst_x64_release_Maui_Packs_Mono
- - Build_iOSSimulator_x64_release_Maui_Packs_Mono
- - Build_iOS_arm_release_Maui_Packs_Mono
- - Build_iOS_arm64_release_Maui_Packs_Mono
+ # Uncomment to reenable package replacement
+ #dependsOn:
+ # - Build_Android_arm_release_Maui_Packs_Mono
+ # - Build_Android_arm64_release_Maui_Packs_Mono
+ # - Build_Android_x86_release_Maui_Packs_Mono
+ # - Build_Android_x64_release_Maui_Packs_Mono
+ # - Build_MacCatalyst_x64_release_Maui_Packs_Mono
+ # - Build_iOSSimulator_x64_release_Maui_Packs_Mono
+ # - Build_iOS_arm_release_Maui_Packs_Mono
+ # - Build_iOS_arm64_release_Maui_Packs_Mono
buildArgs: -s mono -c $(_BuildConfig)
nameSuffix: MACiOSAndroidMaui
isOfficialBuild: false
diff --git a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
index 5ca99a4e844114..d9a8bc6942b354 100644
--- a/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-maui-apps.yml
@@ -19,100 +19,101 @@ parameters:
steps:
- - task: DownloadPipelineArtifact@2
- displayName: Download runtime packages
- inputs:
- artifact: 'IntermediateArtifacts'
- path: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
- patterns: |
- IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-!(*.symbols).nupkg
- IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-!(*.symbols).nupkg
- IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-!(*.symbols).nupkg
- IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-!(*.symbols).nupkg
+ # Uncomment to reenable package replacement
+ #- task: DownloadPipelineArtifact@2
+ # displayName: Download runtime packages
+ # inputs:
+ # artifact: 'IntermediateArtifacts'
+ # path: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
+ # patterns: |
+ # IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-!(*.symbols).nupkg
+ # IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-!(*.symbols).nupkg
+ # IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-!(*.symbols).nupkg
+ # IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-!(*.symbols).nupkg
- # Other artifacts to include once they are being built
- # EX. IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg
-
- - task: CopyFiles@2
- displayName: Flatten packages
- inputs:
- sourceFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
- contents: '*/Shipping/*.nupkg'
- cleanTargetFolder: false
- targetFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
- flattenFolders: true
+ # # Other artifacts to include once they are being built
+ # # EX. IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg
+
+ #- task: CopyFiles@2
+ # displayName: Flatten packages
+ # inputs:
+ # sourceFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
+ # contents: '*/Shipping/*.nupkg'
+ # cleanTargetFolder: false
+ # targetFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
+ # flattenFolders: true
- - script: |
- for file in *.nupkg
- do
- mv -v "$file" "${file%.nupkg}.zip"
- done
- displayName: Change nupkgs to zips
- workingDirectory: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
+ #- script: |
+ # for file in *.nupkg
+ # do
+ # mv -v "$file" "${file%.nupkg}.zip"
+ # done
+ # displayName: Change nupkgs to zips
+ # workingDirectory: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks
- #Unzip the nuget packages to make the actual runtimes accessible
- - task: ExtractFiles@1
- displayName: Extract android-arm runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract android-arm64 runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract android-x86 runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x86.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x86
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract android-x64 runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x64.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x64
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract ios-arm runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract ios-arm64 runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm64.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm64
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract maccatalyst-x64 runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64
- overwriteExistingFiles: true
- cleanDestinationFolder: false
- - task: ExtractFiles@1
- displayName: Extract iossimulator-x64 runtime
- inputs:
- archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64.*.zip
- destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64
- overwriteExistingFiles: true
- cleanDestinationFolder: false
+ ##Unzip the nuget packages to make the actual runtimes accessible
+ #- task: ExtractFiles@1
+ # displayName: Extract android-arm runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract android-arm64 runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-arm64
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract android-x86 runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x86.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x86
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract android-x64 runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x64.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.android-x64
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract ios-arm runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract ios-arm64 runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm64.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.ios-arm64
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract maccatalyst-x64 runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
+ #- task: ExtractFiles@1
+ # displayName: Extract iossimulator-x64 runtime
+ # inputs:
+ # archiveFilePatterns: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64.*.zip
+ # destinationFolder: $(Build.SourcesDirectory)/MauiTesting/ArtifactPacks/Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64
+ # overwriteExistingFiles: true
+ # cleanDestinationFolder: false
- script: |
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
chmod -R a+rx .
- ./dotnet-install.sh --channel 6.0.2xx --quality signed --install-dir .
+ ./dotnet-install.sh --channel 6.0.2xx --quality daily --install-dir .
./dotnet --info
./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/main.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json
displayName: Install MAUI workload
@@ -149,18 +150,21 @@ steps:
- task: PublishBuildArtifacts@1
displayName: 'Publish MauiAndroid binlog'
+ condition: always()
inputs:
pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiAndroid.binlog
artifactName: ${{ parameters.artifactName }}
- task: PublishBuildArtifacts@1
displayName: 'Publish MauiiOS binlog'
+ condition: always()
inputs:
pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiiOS.binlog
artifactName: ${{ parameters.artifactName }}
- task: PublishBuildArtifacts@1
displayName: 'Publish MauiMacCatalyst binlog'
+ condition: always()
inputs:
pathtoPublish: $(Build.SourcesDirectory)/MauiTesting/MauiMacCatalyst.binlog
artifactName: ${{ parameters.artifactName }}
diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
index 0c3151159daecd..5bdcd3be106673 100644
--- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml
+++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
@@ -29,7 +29,7 @@ jobs:
# iOS/tvOS simulator x64/x86
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'tvOSSimulator_x64') }}:
- - OSX.1200.Amd64.Open
+ - OSX.1015.Amd64.Open
# Android arm64
- ${{ if in(parameters.platform, 'Android_arm64') }}:
diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml
index e6951a56e81601..5053dde15fc610 100644
--- a/eng/pipelines/installer/jobs/base-job.yml
+++ b/eng/pipelines/installer/jobs/base-job.yml
@@ -423,18 +423,20 @@ 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, ''), eq(parameters.pgoType, ''))}}:
+ - ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), or(eq(parameters.platform, 'Linux_x64'), eq(parameters.platform, 'Linux_arm64')), 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-
# independent installers on this leg, but we need to do it somewhere.)
- - template: steps/build-linux-package.yml
- parameters:
- packageType: ${{ packageBuild.packageType }}
- image: ${{ packageBuild.image }}
- packageStepDescription: Runtime Deps, Runtime, Framework Packs installers
- subsetArg: $(installersSubsetArg)
- packagingArgs: ${{ packageBuild.packagingArgs }}
+ # Currently, Linux_arm64 supports 'rpm' type only.
+ - ${{ if or(not(eq(parameters.platform, 'Linux_arm64')), eq(packageBuild.packageType, 'rpm')) }}:
+ - template: steps/build-linux-package.yml
+ parameters:
+ packageType: ${{ packageBuild.packageType }}
+ image: ${{ packageBuild.image }}
+ packageStepDescription: Runtime Deps, Runtime, Framework Packs installers
+ subsetArg: $(installersSubsetArg)
+ packagingArgs: ${{ packageBuild.packagingArgs }}
- ${{ if ne(parameters.container, '') }}:
# Files may be owned by root because builds don't set user ID. Later build steps run 'find' in
diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml
index 2c5b604acfc9b0..ee89bcf3e1f6d4 100644
--- a/eng/pipelines/libraries/base-job.yml
+++ b/eng/pipelines/libraries/base-job.yml
@@ -40,6 +40,11 @@ jobs:
condition: and(succeeded(), ${{ parameters.condition }})
helixRepo: dotnet/runtime
pool: ${{ parameters.pool }}
+
+ # Component governance does not work on musl machines
+ ${{ if eq(parameters.osSubGroup, '_musl') }}:
+ disableComponentGovernance: true
+
variables:
- _buildScriptFileName: build
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index b76b762ebc3bb0..dae9a05bec145c 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -105,11 +105,11 @@ jobs:
# iOS Simulator/Mac Catalyst arm64
- ${{ if in(parameters.platform, 'MacCatalyst_arm64', 'iOSSimulator_arm64') }}:
- - OSX.1200.ARM64.Open
+ - OSX.1100.Arm64.Open
# iOS/tvOS simulator x64/x86 & MacCatalyst x64
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64', 'MacCatalyst_x64') }}:
- - OSX.1200.Amd64.Open
+ - OSX.1015.Amd64.Open
# iOS devices
- ${{ if in(parameters.platform, 'iOS_arm64') }}:
@@ -159,7 +159,7 @@ jobs:
- ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}:
- ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- Windows.10.Amd64.ServerRS5.Open
- - Windows.10.Amd64.Server20H2.Open
+ - Windows.Amd64.Server2022.Open
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- Windows.10.Amd64.Server19H1.ES.Open
- Windows.7.Amd64.Open
@@ -182,6 +182,6 @@ jobs:
# WebAssembly windows
- ${{ if eq(parameters.platform, 'Browser_wasm_win') }}:
- - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h2.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20211208140215-544b18c
+ - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h2.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210702131541-6837048
${{ insert }}: ${{ parameters.jobParameters }}
diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml
index a8b6517efeb874..52b5958fd24892 100644
--- a/eng/pipelines/libraries/helix.yml
+++ b/eng/pipelines/libraries/helix.yml
@@ -15,7 +15,7 @@ parameters:
scenarios: ''
steps:
- - script: $(_msbuildCommand) -restore
+ - script: $(_msbuildCommand) $(_warnAsErrorParamHelixOverride) -restore
$(Build.SourcesDirectory)/src/libraries/sendtohelix.proj
/p:RuntimeFlavor=${{ parameters.runtimeFlavor }}
/p:TargetArchitecture=${{ parameters.archType }}
diff --git a/eng/pipelines/runtime-extra-platforms-other.yml b/eng/pipelines/runtime-extra-platforms-other.yml
new file mode 100644
index 00000000000000..a7f533aa89916e
--- /dev/null
+++ b/eng/pipelines/runtime-extra-platforms-other.yml
@@ -0,0 +1,457 @@
+# This contains only jobs that are not runnable by a platform specific
+# pipeline, like runtime-wasm
+# These are run as part of runtime-extra-platforms by default.
+
+parameters:
+ isExtraPlatformsBuild: ''
+
+jobs:
+
+#
+# Build CoreCLR release
+# Always as they are needed by Installer and we always build and test the Installer.
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml
+ buildConfig: release
+ platforms:
+ - Linux_x64
+ - Linux_arm
+ - Linux_arm64
+ - Linux_musl_x64
+ - OSX_x64
+ - windows_x64
+ - windows_x86
+ - windows_arm64
+ jobParameters:
+ testGroup: innerloop
+
+#
+# Build libraries using live CoreLib
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/libraries/build-job.yml
+ buildConfig: Release
+ platforms:
+ - Linux_x64
+ - Linux_arm
+ - Linux_arm64
+ - Linux_musl_x64
+ - OSX_x64
+ - windows_x64
+ - windows_x86
+ - windows_arm64
+
+#
+# Libraries Release Test Execution against a release coreclr runtime
+# Only when the PR contains a libraries change
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/libraries/run-test-job.yml
+ buildConfig: Release
+ platforms:
+ - Linux_x64
+ - Linux_arm
+ - Linux_arm64
+ - Linux_musl_x64
+ - OSX_x64
+ - windows_x64
+ - windows_x86
+ - windows_arm64
+ helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
+ jobParameters:
+ isOfficialBuild: false
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ testScope: innerloop
+ liveRuntimeBuildConfig: release
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+# Run net48 tests on win-x64
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/libraries/build-job.yml
+ buildConfig: Release
+ platforms:
+ - windows_x64
+ helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
+ jobParameters:
+ framework: net48
+ runTests: true
+ testScope: innerloop
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+#### MONO LEGS
+
+#
+# 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:
+ - Windows_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:
+ testScope: innerloop
+ nameSuffix: AllSubsets_Mono
+ buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
+ timeoutInMinutes: 120
+ 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['isRollingBuild'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ condition: >-
+ or(
+ eq(variables['librariesContainsChange'], true),
+ eq(variables['monoContainsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+#
+# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
+# 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:
+ - iOS_arm64
+ - tvOS_arm64
+ 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+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true
+ timeoutInMinutes: 180
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
+ condition: >-
+ or(
+ eq(variables['librariesContainsChange'], true),
+ eq(variables['monoContainsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+#
+# MacCatalyst interp - requires AOT Compilation and Interp flags
+# 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:
+ - MacCatalyst_x64
+ - MacCatalyst_arm64
+ 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:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=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['isRollingBuild'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ condition: >-
+ or(
+ eq(variables['librariesContainsChange'], true),
+ eq(variables['monoContainsChange'], true),
+ eq(variables['isRollingBuild'], true))
+#
+# MacCatalyst interp - requires AOT Compilation and Interp flags
+# Build the whole product using Mono and run libraries tests
+# The test app is built with the App Sandbox entitlement
+#
+- 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:
+ - MacCatalyst_x64
+ - MacCatalyst_arm64
+ 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_AppSandbox
+ buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true /p:EnableAppSandbox=true
+ timeoutInMinutes: 180
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(variables['isRollingBuild'], 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['isRollingBuild'], true))
+
+#
+# Android devices
+# 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:
+ - Android_arm
+ - Android_arm64
+ 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 $(_runSmokeTestsOnlyArg)
+ timeoutInMinutes: 180
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+ condition: >-
+ or(
+ eq(variables['librariesContainsChange'], true),
+ eq(variables['monoContainsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+#
+# Build the whole product using Mono and run runtime tests
+# Build Mono release
+# Only when libraries, mono, or the runtime tests changed
+# Currently only these architectures are needed for the runtime tests.
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+ runtimeFlavor: mono
+ buildConfig: release
+ platforms:
+ - Linux_arm64
+ jobParameters:
+ 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(variables['isRollingBuild'], true))
+
+#
+# Mono Test builds with CoreCLR runtime tests using live libraries debug build
+# Only when Mono is changed
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
+ jobParameters:
+ testGroup: innerloop
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+#
+# Build the whole product using Mono for Android and run runtime tests with Android emulator
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: mono
+ platforms:
+ - Android_x64
+ variables:
+ - ${{ 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_RuntimeTests
+ buildArgs: -s mono+libs -c $(_BuildConfig)
+ timeoutInMinutes: 240
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+
+#
+# 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/coreclr/templates/helix-queues-setup.yml
+ buildConfig: Release
+ runtimeFlavor: mono
+ platforms:
+ - Android_x64
+ variables:
+ - ${{ 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_RuntimeTests_Interp
+ buildArgs: -s mono+libs -c $(_BuildConfig)
+ timeoutInMinutes: 240
+ runtimeVariant: monointerpreter
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+ # NOTE: Per PR test execution is not recommended for runtime tests
+ ${{ if eq(variables['isRollingBuild'], true) }}:
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: Mono_$(_BuildConfig)
+
+#
+# Mono CoreCLR runtime Test executions using live libraries in jit mode
+# Only when Mono is changed
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - Linux_arm64
+ helixQueueGroup: pr
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ jobParameters:
+ testGroup: innerloop
+ liveLibrariesBuildConfig: Release
+ liveRuntimeBuildConfig: release
+ runtimeVariant: minijit
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
+#
+# Mono CoreCLR runtime Test executions using live libraries in interpreter mode
+# Only when Mono is changed
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - Linux_arm64
+ helixQueueGroup: pr
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ jobParameters:
+ testGroup: innerloop
+ liveLibrariesBuildConfig: Release
+ liveRuntimeBuildConfig: release
+ runtimeVariant: monointerpreter
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
diff --git a/eng/pipelines/runtime-extra-platforms-wasm.yml b/eng/pipelines/runtime-extra-platforms-wasm.yml
new file mode 100644
index 00000000000000..9dc8b84d6384ce
--- /dev/null
+++ b/eng/pipelines/runtime-extra-platforms-wasm.yml
@@ -0,0 +1,95 @@
+# This contains only wasm-specific jobs
+# These are run as part of runtime-extra-platforms by default.
+# But can also be triggered manually via `runtime-wasm` name
+# /azp run runtime-wasm
+
+parameters:
+ isWasmOnlyBuild: false
+ isRollingBuild: false
+
+jobs:
+
+#
+# ************ Rolling builds: *************
+# - only run eat, and aot tests
+# - rest are covered by runtime, and runtime-staging
+#
+- ${{ if eq(parameters.isRollingBuild, true) }}:
+ # EAT Library tests - only run on linux
+ - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ nameSuffix: _EAT
+ runAOT: false
+ alwaysRun: true
+
+ # AOT Library tests
+ - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ - Browser_wasm_win
+ nameSuffix: _AOT
+ runAOT: true
+ alwaysRun: true
+
+#
+# ********** For !rolling builds, IOW - PR builds *************
+# - run everything, if relevant paths changed
+# - For runtime-wasm, force run all the jobs
+#
+- ${{ if ne(parameters.isRollingBuild, true) }}:
+ # Library tests
+ - template: /eng/pipelines/common/templates/wasm-library-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ - Browser_wasm_win
+ # Don't run for rolling builds, as this is covered
+ alwaysRun: ${{ parameters.isWasmOnlyBuild }}
+ scenarios:
+ - normal
+ - WasmTestOnBrowser
+ - WasmTestOnNodeJs
+
+ # EAT Library tests - only run on linux
+ - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ nameSuffix: _EAT
+ runAOT: false
+ alwaysRun: ${{ parameters.isWasmOnlyBuild }}
+
+ # AOT Library tests
+ - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ - Browser_wasm_win
+ nameSuffix: _AOT
+ runAOT: true
+ alwaysRun: ${{ parameters.isWasmOnlyBuild }}
+
+ # Wasm.Build.Tests
+ - template: /eng/pipelines/common/templates/wasm-build-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ - Browser_wasm_win
+ alwaysRun: ${{ parameters.isWasmOnlyBuild }}
+
+ # Debugger tests
+ - template: /eng/pipelines/common/templates/wasm-debugger-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ - Browser_wasm_win
+ alwaysRun: ${{ parameters.isWasmOnlyBuild }}
+
+ - template: /eng/pipelines/common/templates/wasm-runtime-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ alwaysRun: ${{ parameters.isWasmOnlyBuild }}
diff --git a/eng/pipelines/runtime-extra-platforms.yml b/eng/pipelines/runtime-extra-platforms.yml
index 729a0187ba562b..02591d91b6b0e3 100644
--- a/eng/pipelines/runtime-extra-platforms.yml
+++ b/eng/pipelines/runtime-extra-platforms.yml
@@ -34,482 +34,14 @@ jobs:
- ${{ if eq(variables.dependOnEvaluatePaths, true) }}:
- template: /eng/pipelines/common/evaluate-default-paths.yml
-#
-# Build CoreCLR release
-# Always as they are needed by Installer and we always build and test the Installer.
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml
- buildConfig: release
- platforms:
- - Linux_x64
- - Linux_arm
- - Linux_arm64
- - Linux_musl_x64
- - OSX_x64
- - windows_x64
- - windows_x86
- - windows_arm64
- jobParameters:
- testGroup: innerloop
-
-#
-# Build libraries using live CoreLib
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/libraries/build-job.yml
- buildConfig: Release
- platforms:
- - Linux_x64
- - Linux_arm
- - Linux_arm64
- - Linux_musl_x64
- - OSX_x64
- - windows_x64
- - windows_x86
- - windows_arm64
-
-#
-# Libraries Release Test Execution against a release coreclr runtime
-# Only when the PR contains a libraries change
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/libraries/run-test-job.yml
- buildConfig: Release
- platforms:
- - Linux_x64
- - Linux_arm
- - Linux_arm64
- - Linux_musl_x64
- - OSX_x64
- - windows_x64
- - windows_x86
- - windows_arm64
- helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
- jobParameters:
- isOfficialBuild: false
- isExtraPlatforms: ${{ variables.isExtraPlatformsBuild }}
- testScope: innerloop
- liveRuntimeBuildConfig: release
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
- eq(variables['isRollingBuild'], true))
-
-# Run net48 tests on win-x64
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/libraries/build-job.yml
- buildConfig: Release
- platforms:
- - windows_x64
- helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
- jobParameters:
- framework: net48
- runTests: true
- testScope: innerloop
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
- eq(variables['isRollingBuild'], true))
-
-#### MONO LEGS
-
-#
-# Build for Browser/wasm, with EnableAggressiveTrimming=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:
- isExtraPlatforms: ${{ variables.isExtraPlatformsBuild }}
- testGroup: innerloop
- nameSuffix: LibraryTests_EAT
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=false
- 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['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true $(_runSmokeTestsOnlyArg)
- scenarios:
- - normal
-
-#
-# 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
- - Browser_wasm_win
- 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:
- isExtraPlatforms: ${{ variables.isExtraPlatformsBuild }}
- testGroup: innerloop
- nameSuffix: LibraryTests_AOT
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true /p:BrowserHost=$(_hostedOs)
- 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['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_AOT_$(_BuildConfig)_$(_hostedOs)
- extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true $(_runSmokeTestsOnlyArg) /p:BrowserHost=$(_hostedOs)
- scenarios:
- - normal
-
-#
-# 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:
- - Windows_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:
- testScope: innerloop
- nameSuffix: AllSubsets_Mono
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
- timeoutInMinutes: 120
- 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['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- condition: >-
- or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true),
- eq(variables['isRollingBuild'], true))
-
-#
-# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
-# 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:
- - iOS_arm64
- - tvOS_arm64
- 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+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
- condition: >-
- or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true),
- eq(variables['isRollingBuild'], 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:
- - Android_arm
- - Android_arm64
- 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 $(_runSmokeTestsOnlyArg)
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- condition: >-
- or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true),
- eq(variables['isRollingBuild'], true))
-
-#
-# Build for Browser/wasm and test it on v8, browser, and nodejs
-#
-- 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
- - Browser_wasm_win
- 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: LibraryTests
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=$(_hostedOs)
- 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['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:BrowserHost=$(_hostedOs)
- scenarios:
- - normal
- - WasmTestOnBrowser
- - WasmTestOnNodeJs
-
-#
-# Build the whole product using Mono and run runtime tests
-# Build Mono release
-# Only when libraries, mono, or the runtime tests changed
-# Currently only these architectures are needed for the runtime tests.
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/mono/templates/build-job.yml
- runtimeFlavor: mono
- buildConfig: release
- platforms:
- - Linux_arm64
- jobParameters:
- 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(variables['isRollingBuild'], true))
-
-#
-# Mono Test builds with CoreCLR runtime tests using live libraries debug build
-# Only when Mono is changed
-- template: /eng/pipelines/common/platform-matrix.yml
+# include this unconditionally, because it has per job conditions
+- template: /eng/pipelines/runtime-extra-platforms-wasm.yml
parameters:
- jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml
- buildConfig: release
- runtimeFlavor: mono
- platforms:
- - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
- jobParameters:
- testGroup: innerloop
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
+ isWasmOnlyBuild: ${{ variables.isWasmOnlyBuild }}
+ isRollingBuild: ${{ variables.isRollingBuild }}
-#
-# Build the whole product using Mono for Android and run runtime tests with Android emulator
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
- buildConfig: Release
- runtimeFlavor: mono
- platforms:
- - Android_x64
- variables:
- - ${{ 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_RuntimeTests
- buildArgs: -s mono+libs -c $(_BuildConfig)
- timeoutInMinutes: 240
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
-
-#
-# 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/coreclr/templates/helix-queues-setup.yml
- buildConfig: Release
- runtimeFlavor: mono
- platforms:
- - Android_x64
- variables:
- - ${{ 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_RuntimeTests_Interp
- buildArgs: -s mono+libs -c $(_BuildConfig)
- timeoutInMinutes: 240
- runtimeVariant: monointerpreter
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # NOTE: Per PR test execution is not recommended for runtime tests
- ${{ if eq(variables['isRollingBuild'], true) }}:
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
-
-#
-# Mono CoreCLR runtime Test executions using live libraries in jit mode
-# Only when Mono is changed
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
- buildConfig: release
- runtimeFlavor: mono
- platforms:
- - Linux_arm64
- helixQueueGroup: pr
- helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
- jobParameters:
- testGroup: innerloop
- liveLibrariesBuildConfig: Release
- liveRuntimeBuildConfig: release
- runtimeVariant: minijit
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
-
-#
-# Mono CoreCLR runtime Test executions using live libraries in interpreter mode
-# Only when Mono is changed
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
- buildConfig: release
- runtimeFlavor: mono
- platforms:
- - Linux_arm64
- helixQueueGroup: pr
- helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
- jobParameters:
- testGroup: innerloop
- liveLibrariesBuildConfig: Release
- liveRuntimeBuildConfig: release
- runtimeVariant: monointerpreter
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
+# Any jobs that are not specific to any platform
+- ${{ if eq(variables.isNotSpecificPlatformOnlyBuild, true) }}:
+ - template: /eng/pipelines/runtime-extra-platforms-other.yml
+ parameters:
+ isExtraPlatformsBuild: ${{ variables.isExtraPlatformsBuild }}
diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml
index 1ad7ad72d31716..a7a06be90592fc 100644
--- a/eng/pipelines/runtime-official.yml
+++ b/eng/pipelines/runtime-official.yml
@@ -392,7 +392,7 @@ stages:
jobParameters:
isOfficialBuild: ${{ variables.isOfficialBuild }}
liveRuntimeBuildConfig: release
- liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
+ liveLibrariesBuildConfig: Release
pgoType: 'PGO'
platforms:
- windows_x64
diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml
index e8f707ff5e6d58..fab86e351727e5 100644
--- a/eng/pipelines/runtime-staging.yml
+++ b/eng/pipelines/runtime-staging.yml
@@ -55,12 +55,49 @@ variables:
- template: /eng/pipelines/common/variables.yml
jobs:
+
#
# Evaluate paths
#
- ${{ if eq(variables.dependOnEvaluatePaths, true) }}:
- template: /eng/pipelines/common/evaluate-default-paths.yml
+#
+# WebAssembly legs - run windows builds. Also, debugger tests which are currently
+# unstable
+#
+- template: /eng/pipelines/common/templates/wasm-library-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm_win
+ alwaysRun: ${{ variables.isRollingBuild }}
+ scenarios:
+ - normal
+ - WasmTestOnBrowser
+
+# AOT Library tests
+- template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm_win
+ nameSuffix: _AOT
+ runSmokeOnlyArg: $(_runSmokeTestsOnlyArg)
+ runAOT: true
+ alwaysRun: ${{ variables.isRollingBuild }}
+
+- template: /eng/pipelines/common/templates/wasm-build-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm_win
+ alwaysRun: ${{ variables.isRollingBuild }}
+
+- template: /eng/pipelines/common/templates/wasm-debugger-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ - Browser_wasm_win
+ alwaysRun: ${{ variables.isRollingBuild }}
+
#
# iOS/tvOS interp - requires AOT Compilation and Interp flags
# Build the whole product using Mono and run libraries tests
@@ -106,94 +143,6 @@ jobs:
eq(variables['monoContainsChange'], true),
eq(variables['isRollingBuild'], true))
-#
-# MacCatalyst interp - requires AOT Compilation and Interp flags
-# 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:
- - MacCatalyst_x64
- # don't run tests on arm64 PRs until we can get significantly more devices
- - ${{ if eq(variables['isRollingBuild'], true) }}:
- - MacCatalyst_arm64
- 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 $(_runSmokeTestsOnlyArg) /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=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['isRollingBuild'], 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['isRollingBuild'], true))
-
-#
-# MacCatalyst interp - requires AOT Compilation and Interp flags
-# Build the whole product using Mono and run libraries tests
-# The test app is built with the App Sandbox entitlement
-#
-- 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:
- - MacCatalyst_x64
- # don't run tests on arm64 PRs until we can get significantly more devices
- - ${{ if eq(variables['isRollingBuild'], true) }}:
- - MacCatalyst_arm64
- 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_AppSandbox
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true /p:EnableAppSandbox=true
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(variables['isRollingBuild'], 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['isRollingBuild'], true))
-
#
# Build the whole product using Mono and run libraries tests
#
@@ -308,184 +257,6 @@ jobs:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
-#
-# 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_win
- variables:
- # map dependencies variables to local variables
- - name: wasmbuildtestsContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'] ]
- jobParameters:
- isExtraPlatforms: ${{ variables.isExtraPlatformsBuild }}
- testGroup: innerloop
- nameSuffix: WasmBuildTests
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmBuildTests=true /p:TestAssemblies=false /p:BrowserHost=$(_hostedOs)
- timeoutInMinutes: 180
- condition: >-
- eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true)
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)_$(_hostedOs)
- extraHelixArguments: /p:BrowserHost=$(_hostedOs)
- scenarios:
- - buildwasmapps
- condition: >-
- eq(variables['wasmbuildtestsContainsChange'], true)
-
-#
-# Build Browser_wasm, on windows, run console and browser 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_win
- 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: LibraryTests
- buildArgs: -subset mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:BrowserHost=windows
- 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))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Windows_wasm_$(_BuildConfig)
- extraHelixArguments: /p:BrowserHost=windows
- scenarios:
- - normal
- - wasmtestonbrowser
- condition: >-
- or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true),
- eq(variables['isRollingBuild'], 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_win
- 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:
- isExtraPlatforms: ${{ variables.isExtraPlatformsBuild }}
- testGroup: innerloop
- nameSuffix: LibraryTests_AOT
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true /p:BrowserHost=$(_hostedOs)
- 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))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_AOT_$(_BuildConfig)_$(_hostedOs)
- extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true $(_runSmokeTestsOnlyArg) /p:BrowserHost=$(_hostedOs)
- scenarios:
- - normal
- condition: >-
- or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true))
-
-# Wasm debugger tests - windows
-- 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_win
- variables:
- # map dependencies variables to local variables
- - name: wasmdebuggertestsContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'] ]
- jobParameters:
- testGroup: innerloop
- nameSuffix: Mono_DebuggerTests
- buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmDebuggerTests=true /p:TestAssemblies=false /p:BrowserHost=windows
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:BrowserHost=windows
- scenarios:
- - wasmdebuggertests
-
-# Wasm debugger tests - linux
-- 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: wasmdebuggertestsContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'] ]
- jobParameters:
- testGroup: innerloop
- nameSuffix: Mono_DebuggerTests
- buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmDebuggerTests=true /p:TestAssemblies=false
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmdebuggertests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- scenarios:
- - wasmdebuggertests
-
#
# Build the whole product using Mono for Android and run runtime tests with Android devices
#
diff --git a/eng/pipelines/runtime-wasm.yml b/eng/pipelines/runtime-wasm.yml
new file mode 100644
index 00000000000000..62de930be9d1f9
--- /dev/null
+++ b/eng/pipelines/runtime-wasm.yml
@@ -0,0 +1,21 @@
+# This is a wrapper yml for `runtime-extra-platforms-wasm.yml`, which
+# has all the wasm jobs. This file is essentially so we can have point
+# the pipeline in azdo UI to this, and thus avoid any scheduled triggers
+
+trigger: none
+
+variables:
+ - template: /eng/pipelines/common/variables.yml
+
+jobs:
+
+#
+# Evaluate paths
+#
+- ${{ if eq(variables.dependOnEvaluatePaths, true) }}:
+ - template: /eng/pipelines/common/evaluate-default-paths.yml
+
+- template: /eng/pipelines/runtime-extra-platforms-wasm.yml
+ parameters:
+ isWasmOnlyBuild: ${{ variables.isWasmOnlyBuild }}
+ isRollingBuild: ${{ variables.isRollingBuild }}
diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml
index 9d3bbfe477d8e0..d6ab57e50d6555 100644
--- a/eng/pipelines/runtime.yml
+++ b/eng/pipelines/runtime.yml
@@ -160,21 +160,6 @@ jobs:
jobParameters:
testGroup: innerloop
-#
-# Build PGO CoreCLR release
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml
- buildConfig: release
- platforms:
- - windows_x64
- - windows_x86
- - Linux_x64
- jobParameters:
- testGroup: innerloop
- pgoType: 'PGO'
-
#
# Build CoreCLR Formatting Job
# Only when CoreCLR is changed, and only in the 'main' branch (no release branches;
@@ -211,7 +196,7 @@ jobs:
testGroup: innerloop
timeoutInMinutes: 120
nameSuffix: NativeAOT
- buildArgs: -s clr.jit+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc $(_BuildConfig) -lc Release
+ buildArgs: -s clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc $(_BuildConfig) -lc Release
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
condition: >-
or(
@@ -233,7 +218,7 @@ jobs:
testGroup: innerloop
timeoutInMinutes: 120
nameSuffix: NativeAOT
- buildArgs: -s clr.jit+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc $(_BuildConfig) -lc Release
+ buildArgs: -s clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc $(_BuildConfig) -lc Release
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
condition: >-
or(
@@ -242,7 +227,7 @@ jobs:
eq(variables['isFullMatrix'], true))
#
-# CoreCLR NativeAOT checked build and smoke tests
+# CoreCLR NativeAOT release build and smoke tests
# Only when CoreCLR is changed
#
- template: /eng/pipelines/common/platform-matrix.yml
@@ -257,7 +242,7 @@ jobs:
testGroup: innerloop
timeoutInMinutes: 120
nameSuffix: NativeAOT
- buildArgs: -s clr.jit+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc $(_BuildConfig) -lc Release
+ buildArgs: -s clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs -rc $(_BuildConfig) -lc Release
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
condition: >-
or(
@@ -265,6 +250,34 @@ jobs:
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(variables['isFullMatrix'], true))
+#
+# CoreCLR NativeAOT release build and libraries tests
+# Only when CoreCLR is changed
+#
+- 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
+ platforms:
+ - windows_arm64
+ - Linux_arm64
+ jobParameters:
+ testGroup: innerloop
+ isSingleFile: true
+ nameSuffix: NativeAOT
+ buildArgs: -s clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:ArchiveTests=true
+ timeoutInMinutes: 120
+ # extra steps, run tests
+ extraStepsTemplate: /eng/pipelines/libraries/helix.yml
+ extraStepsParameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
+ condition: >-
+ or(
+ eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
+ eq(variables['isFullMatrix'], true))
+
# Build and test clr tools
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -308,11 +321,8 @@ jobs:
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
runtimeFlavor: mono
platforms:
- - MacCatalyst_x64
- - MacCatalyst_arm64
- tvOSSimulator_x64
- iOSSimulator_x86
- - iOS_arm64
- Linux_arm
jobParameters:
testGroup: innerloop
@@ -331,7 +341,6 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
- - tvOS_arm64
- iOS_arm
- Linux_musl_x64
jobParameters:
@@ -346,85 +355,52 @@ jobs:
eq(variables['isRollingBuild'], true))
#
-# Build the whole product using Mono and run libraries tests, multi-scenario
+# WebAssembly legs
#
-- template: /eng/pipelines/common/platform-matrix.yml
+- template: /eng/pipelines/common/templates/wasm-library-tests.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: LibraryTests
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=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['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- scenarios:
- - normal
- - WasmTestOnBrowser
- condition: >-
- or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true),
- eq(variables['isRollingBuild'], true))
+ - Browser_wasm
+ alwaysRun: ${{ variables.isRollingBuild }}
+ scenarios:
+ - normal
+ - WasmTestOnBrowser
-#
-# Build the whole product using Mono and run libraries tests, for Wasm.Build.Tests
-#
-- template: /eng/pipelines/common/platform-matrix.yml
+# EAT Library tests - only run on linux
+- template: /eng/pipelines/common/templates/wasm-library-aot-tests.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: wasmbuildtestsContainsChange
- value: $[ dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'] ]
- jobParameters:
- testGroup: innerloop
- nameSuffix: WasmBuildTests
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmBuildTests=true /p:TestAssemblies=false
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- scenarios:
- - buildwasmapps
- condition: >-
- or(
- eq(variables['wasmbuildtestsContainsChange'], true),
- eq(variables['isRollingBuild'], true))
+ - Browser_wasm
+ nameSuffix: _EAT
+ runAOT: false
+ runSmokeOnlyArg: $(_runSmokeTestsOnlyArg)
+ alwaysRun: ${{ variables.isRollingBuild }}
+
+# AOT Library tests
+- template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ nameSuffix: _AOT
+ runAOT: true
+ runSmokeOnlyArg: $(_runSmokeTestsOnlyArg)
+ alwaysRun: ${{ variables.isRollingBuild }}
+
+- template: /eng/pipelines/common/templates/wasm-build-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ alwaysRun: ${{ variables.isRollingBuild }}
+
+- template: /eng/pipelines/common/templates/wasm-runtime-tests.yml
+ parameters:
+ platforms:
+ - Browser_wasm
+ alwaysRun: ${{ variables.isRollingBuild }}
#
-# Build for Browser/wasm, with EnableAggressiveTrimming=true
+# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
+# Build the whole product using Mono and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -433,7 +409,8 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
- - Browser_wasm
+ - iOS_arm64
+ - tvOS_arm64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
@@ -442,8 +419,8 @@ jobs:
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
jobParameters:
testGroup: innerloop
- nameSuffix: LibraryTests_EAT
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=false
+ nameSuffix: AllSubsets_Mono
+ buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true
timeoutInMinutes: 180
condition: >-
or(
@@ -456,9 +433,7 @@ jobs:
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true $(_runSmokeTestsOnlyArg)
- scenarios:
- - normal
+ extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true
condition: >-
or(
eq(variables['librariesContainsChange'], true),
@@ -466,7 +441,8 @@ jobs:
eq(variables['isRollingBuild'], true))
#
-# Build for Browser/wasm with RunAOTCompilation=true
+# MacCatalyst interp - requires AOT Compilation and Interp flags
+# Build the whole product using Mono and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -475,7 +451,9 @@ jobs:
buildConfig: Release
runtimeFlavor: mono
platforms:
- - Browser_wasm
+ - MacCatalyst_x64
+ - ${{ if eq(variables['isRollingBuild'], true) }}:
+ - MacCatalyst_arm64
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
@@ -484,8 +462,8 @@ jobs:
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
jobParameters:
testGroup: innerloop
- nameSuffix: LibraryTests_AOT
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:EnableAggressiveTrimming=true /p:BuildAOTTestsOnHelix=true /p:RunAOTCompilation=true
+ nameSuffix: AllSubsets_Mono
+ buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true
timeoutInMinutes: 180
condition: >-
or(
@@ -498,72 +476,11 @@ jobs:
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
- extraHelixArguments: /p:NeedsToBuildWasmAppsOnHelix=true $(_runSmokeTestsOnlyArg)
- scenarios:
- - normal
condition: >-
or(
- eq(variables['librariesContainsChange'], true),
- eq(variables['monoContainsChange'], true),
- eq(variables['isRollingBuild'], true))
-
-#
-# Build the whole product using Mono and run runtime tests
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
- buildConfig: Release
- runtimeFlavor: mono
- platforms:
- - Browser_wasm
- variables:
- - ${{ 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: 10
- - name: timeoutPerTestCollectionInMinutes
- value: 200
- jobParameters:
- testGroup: innerloop
- nameSuffix: AllSubsets_Mono_RuntimeTests
- buildArgs: -s mono+libs -c $(_BuildConfig)
- timeoutInMinutes: 180
- condition: >-
- or(
- eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
- eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
- eq(variables['isRollingBuild'], true))
- extraStepsTemplate: /eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: Mono_$(_BuildConfig)
-
-# Build and test libraries under single-file publishing
-- 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
- platforms:
- - windows_x64
- - Linux_x64
- jobParameters:
- testGroup: innerloop
- isSingleFile: true
- nameSuffix: SingleFile
- buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:TestSingleFile=true /p:ArchiveTests=true
- timeoutInMinutes: 120
- # extra steps, run tests
- extraStepsTemplate: /eng/pipelines/libraries/helix.yml
- extraStepsParameters:
- creator: dotnet-bot
- testRunNamePrefixSuffix: SingleFile_$(_BuildConfig)
+ eq(variables['librariesContainsChange'], true),
+ eq(variables['monoContainsChange'], true),
+ eq(variables['isRollingBuild'], true))
#
# Build Mono and Installer on LLVMJIT mode
@@ -917,22 +834,6 @@ jobs:
liveRuntimeBuildConfig: release
liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
-#
-# PGO Build
-#
-- template: /eng/pipelines/installer/installer-matrix.yml
- parameters:
- buildConfig: Release
- jobParameters:
- isOfficialBuild: ${{ variables.isOfficialBuild }}
- liveRuntimeBuildConfig: release
- liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
- pgoType: 'PGO'
- platforms:
- - windows_x64
- - windows_x86
- - Linux_x64
-
#
# CoreCLR Test builds using live libraries release build
# Only when CoreCLR is changed
diff --git a/eng/referenceAssemblies.props b/eng/referenceAssemblies.props
index ac60b93d57b37a..f61d15a3926b52 100644
--- a/eng/referenceAssemblies.props
+++ b/eng/referenceAssemblies.props
@@ -22,10 +22,12 @@
$(NoWarn);CS8617
+
-
-
-
+
+
+ <_Parameter1>(System.Reflection.AssemblyNameFlags)0x70
+ <_Parameter1_IsLiteral>true
+
diff --git a/eng/references.targets b/eng/references.targets
index 7cfb60411ed182..4603fb98566a91 100644
--- a/eng/references.targets
+++ b/eng/references.targets
@@ -7,31 +7,52 @@
<_FindDependencies>false
-
-
-
-
-
-
+
false
+
+ <_coreLibProjectReference Include="@(ProjectReference->WithMetadataValue('Identity', '$(CoreLibProject)'))" />
+
+
+ $(UndefineProperties);TargetFramework;Platform
+ Configuration=$(CoreCLRConfiguration)
+ Configuration=$(MonoConfiguration)
+ false
+
+
+
+
+
+
+
+
+ None
+
+
+
- <_transitiveProjectReferenceWithExclusion Include="@(ProjectReference)">
- %(DefaultReferenceExclusion.Identity)
-
-
+ <_transitiveProjectReferenceWithProjectName Include="@(ProjectReference->Metadata('NuGetPackageId'))"
+ OriginalIdentity="%(Identity)" />
+ <_transitiveIncludedProjectReferenceWithProjectName Include="@(_transitiveProjectReferenceWithProjectName)"
+ Exclude="@(DefaultReferenceExclusion)" />
+ <_transitiveExcludedProjectReferenceWithProjectName Include="@(_transitiveProjectReferenceWithProjectName)"
+ Exclude="@(_transitiveIncludedProjectReferenceWithProjectName)" />
+
@@ -55,8 +76,10 @@
-
-
+
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets
index cff60b79eb225f..327273a100e2d4 100644
--- a/eng/resolveContract.targets
+++ b/eng/resolveContract.targets
@@ -42,12 +42,10 @@
- <_resolvedP2PFiltered Include="@(ProjectReference)">
- $([System.IO.Path]::GetFullPath('%(ProjectReference.Identity)'))
- %(ProjectReference.SkipUseReferenceAssembly)
-
- <_ResolvedProjectReferencePaths Update="@(_resolvedP2PFiltered)"
- Condition="'%(_resolvedP2PFiltered.ProjectReferenceItemSpec)' == '%(_resolvedP2PFiltered.MSBuildSourceProjectFile)' and
+ <_resolvedP2PFiltered Include="@(ProjectReference)"
+ ProjectReferenceItemSpec="$([System.IO.Path]::GetFullPath('%(ProjectReference.Identity)'))"
+ SkipUseReferenceAssembly="%(ProjectReference.SkipUseReferenceAssembly)" />
+ <_ResolvedProjectReferencePaths Condition="'%(_resolvedP2PFiltered.ProjectReferenceItemSpec)' == '%(_resolvedP2PFiltered.MSBuildSourceProjectFile)' and
'%(_resolvedP2PFiltered.SkipUseReferenceAssembly)' == 'true'"
ReferenceAssembly="" />
diff --git a/eng/slngen.targets b/eng/slngen.targets
index 5f21150497c949..4b68c388938aea 100644
--- a/eng/slngen.targets
+++ b/eng/slngen.targets
@@ -1,5 +1,6 @@
+ gen
ref
tests
src
@@ -7,7 +8,7 @@
- false
+ false
diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props
deleted file mode 100644
index f7074fe3e199f4..00000000000000
--- a/eng/targetframeworksuffix.props
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
- true
- true
-
-
- 0.0
- $(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1))))
-
-
-
- 1.0
-
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index 150ddf7401c9ea..33551569c647fe 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -142,16 +142,18 @@
AfterTargets="ResolveTargetingPackAssets">
<_targetingPackReferenceExclusion Include="$(TargetName)" />
- <_targetingPackReferenceExclusion Include="@(_ResolvedProjectReferencePaths->'%(Filename)')" />
+ <_targetingPackReferenceExclusion Include="@(_ResolvedProjectReferencePaths->Metadata('Filename'))" />
<_targetingPackReferenceExclusion Include="@(DefaultReferenceExclusion)" />
- <_targetingPackReferenceWithExclusion Include="@(Reference)">
- %(_targetingPackReferenceExclusion.Identity)
-
-
+ <_targetingPackReferenceWithProjectName Include="@(Reference->WithMetadataValue('ExternallyResolved', 'true')->Metadata('Filename'))"
+ OriginalIdentity="%(Identity)" />
+ <_targetingPackIncludedReferenceWithProjectName Include="@(_targetingPackReferenceWithProjectName)"
+ Exclude="@(_targetingPackReferenceExclusion)" />
+ <_targetingPackExcludedReferenceWithProjectName Include="@(_targetingPackReferenceWithProjectName)"
+ Exclude="@(_targetingPackIncludedReferenceWithProjectName)" />
+
diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh
index bfaa743ef6f414..c0f2362601fe3b 100644
--- a/eng/testing/RunnerTemplate.sh
+++ b/eng/testing/RunnerTemplate.sh
@@ -132,7 +132,13 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
# files already in /cores/ at this point. This is being done to prevent
# inadvertently flooding the CI machines with dumps.
if [[ ! -d "/cores" || ! "$(ls -A /cores)" ]]; then
- ulimit -c unlimited
+ # Disabling core dumps on macOS. System dumps are large (even for very small
+ # programs) and not configurable. As a result, if a single PR build causes a
+ # lot of tests to crash, we can take out the entire queue.
+ # See discussions in:
+ # https://github.com/dotnet/core-eng/issues/15333
+ # https://github.com/dotnet/core-eng/issues/15597
+ ulimit -c 0
fi
elif [[ "$(uname -s)" == "Linux" ]]; then
diff --git a/eng/testing/WasmRunnerTemplate.cmd b/eng/testing/WasmRunnerTemplate.cmd
index 2ebcbcf8e93a97..a668ce2c6a464c 100644
--- a/eng/testing/WasmRunnerTemplate.cmd
+++ b/eng/testing/WasmRunnerTemplate.cmd
@@ -54,7 +54,7 @@ if /I [%XHARNESS_COMMAND%] == [test] (
)
if [%XHARNESS_ARGS%] == [] (
- set "XHARNESS_ARGS=%JS_ENGINE% %JS_ENGINE_ARGS% %BROWSER_PATH% %MAIN_JS% %WASM_XHARNESS_MONO_ARGS%"
+ set "XHARNESS_ARGS=%JS_ENGINE% %JS_ENGINE_ARGS% %BROWSER_PATH% %MAIN_JS%"
)
echo EXECUTION_DIR=%EXECUTION_DIR%
diff --git a/eng/testing/WasmRunnerTemplate.sh b/eng/testing/WasmRunnerTemplate.sh
index d4e352976e8075..ae78d5304e8aed 100644
--- a/eng/testing/WasmRunnerTemplate.sh
+++ b/eng/testing/WasmRunnerTemplate.sh
@@ -50,7 +50,7 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
fi
if [[ -z "$XHARNESS_ARGS" ]]; then
- XHARNESS_ARGS="$JS_ENGINE $JS_ENGINE_ARGS $MAIN_JS $WASM_XHARNESS_MONO_ARGS"
+ XHARNESS_ARGS="$JS_ENGINE $JS_ENGINE_ARGS $MAIN_JS"
fi
echo EXECUTION_DIR=$EXECUTION_DIR
diff --git a/eng/testing/performance/android_scenarios.proj b/eng/testing/performance/android_scenarios.proj
index fefff6deeefe08..761e92b485c98b 100644
--- a/eng/testing/performance/android_scenarios.proj
+++ b/eng/testing/performance/android_scenarios.proj
@@ -25,37 +25,37 @@
$(WorkItemDirectory)
- cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py
+ cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --apk-name HelloAndroid.apk
$(Python) test.py sod --scenario-name "%(Identity)"
$(Python) post.py
$(WorkItemDirectory)
- cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --unzip
+ cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --unzip --apk-name HelloAndroid.apk
$(Python) test.py sod --scenario-name "%(Identity)"
$(Python) post.py
$(WorkItemDirectory)
- cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .; $(Python) pre.py
+ cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .; $(Python) pre.py --apk-name MauiAndroidDefault.apk
$(Python) test.py sod --scenario-name "%(Identity)"
$(Python) post.py
$(WorkItemDirectory)
- cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .; $(Python) pre.py --unzip
+ cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .; $(Python) pre.py --unzip --apk-name MauiAndroidDefault.apk
$(Python) test.py sod --scenario-name "%(Identity)"
$(Python) post.py
$(WorkItemDirectory)
- echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py
+ echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)helloandroid;copy %HELIX_CORRELATION_PAYLOAD%\HelloAndroid.apk .;$(Python) pre.py --apk-name HelloAndroid.apk
$(Python) test.py devicestartup --device-type android --package-path pub\HelloAndroid.apk --package-name net.dot.HelloAndroid --scenario-name "%(Identity)"
$(Python) post.py
$(WorkItemDirectory)
- echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .;$(Python) pre.py
+ echo on;set XHARNESSPATH=$(XharnessPath);cd $(ScenarioDirectory)mauiandroid;copy %HELIX_CORRELATION_PAYLOAD%\MauiAndroidDefault.apk .;$(Python) pre.py --apk-name MauiAndroidDefault.apk
$(Python) test.py devicestartup --device-type android --package-path pub\MauiAndroidDefault.apk --package-name com.companyname.mauitesting --scenario-name "%(Identity)"
$(Python) post.py
diff --git a/eng/testing/tests.props b/eng/testing/tests.props
index f23f4cc62e9560..e91ec1bbcf0e38 100644
--- a/eng/testing/tests.props
+++ b/eng/testing/tests.props
@@ -34,8 +34,8 @@
-
-
+
+
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index e6783add3640a3..e5f12a683a9f79 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -22,11 +22,15 @@
$(CoreCLRILCompilerDir)
+ $(CoreCLRCrossILCompilerDir)
+ clang-9
+ $(ROOTFS_DIR)
$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll
$(CoreCLRAotSdkDir)
$(NetCoreAppCurrentTestHostSharedFrameworkPath)
- $(NoWarn);IL3050;IL3052;IL3055;IL1005
+ $(NoWarn);IL3050;IL3051;IL3052;IL3055;IL1005
false
+ true
true
diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets
index bed571a3064021..4e3addd55acb28 100644
--- a/eng/testing/tests.wasm.targets
+++ b/eng/testing/tests.wasm.targets
@@ -23,6 +23,10 @@
local
+
+ <_AOT_InternalForceInterpretAssemblies Include="@(HighAotMemoryUsageAssembly)" />
+
+
$HARNESS_RUNNER $(_XHarnessArgs) %24XHARNESS_ARGS %24WasmXHarnessArgs -- $(WasmXHarnessMonoArgs) %24WasmXHarnessMonoArgs $(_AppArgs) %24WasmTestAppArgs
%HARNESS_RUNNER% $(_XHarnessArgs) %XHARNESS_ARGS% %WasmXHarnessArgs% -- $(WasmXHarnessMonoArgs) %WasmXHarnessMonoArgs% $(_AppArgs) %WasmTestAppArgs%
@@ -118,7 +124,7 @@
<_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity)
$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))
- -Oz -Wl%252C-O0 -Wl%252C-lto-O0
+ -Oz -Wl,-O0 -Wl,-lto-O0
@@ -169,6 +175,9 @@
<_WasmItemsToPass Include="@(BundleFiles)" OriginalItemName__="BundleFiles" ConditionToUse__="'$(Foo)' != 'true'" />
-->
+
+ <_WasmItemsToPass Include="@(_AOT_InternalForceInterpretAssemblies)" OriginalItemName__="_AOT_InternalForceInterpretAssemblies" />
+
diff --git a/eng/versioning.targets b/eng/versioning.targets
index 4dacec01a8686b..3a40200c173e73 100644
--- a/eng/versioning.targets
+++ b/eng/versioning.targets
@@ -1,32 +1,74 @@
- true
-
+
+ false
+ false
-
- $(IntermediateOutputPath)_AssemblyInfo.cs
- $(IntermediateOutputPath)_AssemblyInfo.vb
+
+ $(AssemblyName)
-
-
-
-
-
- True
-
-
- True
-
-
- True
-
+
+
+ <_Parameter1>.NETFrameworkAssembly
+ <_Parameter2>
+
+
+ <_Parameter1>Serviceable
+ <_Parameter2>True
+
+
+ <_Parameter1>PreferInbox
+ <_Parameter2>True
+
+
+ <_Parameter1>IsTrimmable
+ <_Parameter2>True
+
-
- true
+
+
+ <_Parameter1>$(AssemblyName)
+
+
+ <_Parameter1>en-US
+
+
+ <_Parameter1>true
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+
+
+
+ |
+ Or
+
+
+
+
+ <_Parameter1>System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory $(AssemblyAttributeOrOperator) System.Runtime.InteropServices.DllImportSearchPath.System32
+ <_Parameter1_IsLiteral>true
+
+
+
+
+
+ true
@@ -38,16 +80,23 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
@@ -64,106 +115,36 @@
-
<_Parameter1>%(_unsupportedOSPlatforms.Identity)
-
+
-
<_Parameter1>%(_supportedOSPlatforms.Identity)
-
+
-
-
-
-
-
-
-
- false
- false
-
-
- $(AssemblyName)
-
-
-
+
+
-
- <_Parameter1>$(AssemblyName)
-
-
-
- <_Parameter1>en-US
-
-
-
- <_Parameter1>%(AssemblyMetadata.Identity)
- <_Parameter2>%(AssemblyMetadata.Value)
-
-
-
-
-
-
-
-
-
-
- false
-
- true
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
$(ArtifactsObjDir)runtime_version.h
@@ -193,15 +174,6 @@
Lines="$(_RuntimeVersionFileContents)"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
-
-
-
-
-
-
-
-
-
diff --git a/global.json b/global.json
index cdc6966b29227b..7850e7db3d0240 100644
--- a/global.json
+++ b/global.json
@@ -12,11 +12,11 @@
"python3": "3.7.1"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22080.1",
- "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22080.1",
- "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22080.1",
+ "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22114.7",
+ "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22114.7",
+ "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22114.7",
"Microsoft.Build.NoTargets": "3.1.0",
"Microsoft.Build.Traversal": "3.0.23",
- "Microsoft.NET.Sdk.IL": "7.0.0-preview.2.22080.2"
+ "Microsoft.NET.Sdk.IL": "7.0.0-preview.2.22113.2"
}
}
diff --git a/src/coreclr/.nuget/coreclr-packages.proj b/src/coreclr/.nuget/coreclr-packages.proj
index 5d6391b6124e22..80e3f60a9192f6 100644
--- a/src/coreclr/.nuget/coreclr-packages.proj
+++ b/src/coreclr/.nuget/coreclr-packages.proj
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs
index 1bb64cf6f4cf34..4492eac6d3adab 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.PlatformNotSupported.cs
@@ -4,6 +4,8 @@
using System;
using System.Runtime.InteropServices;
+#pragma warning disable IDE0060
+
namespace Internal.Runtime.InteropServices
{
public static class ComActivator
diff --git a/src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs b/src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs
index 3886195966ebd4..958199de5a5d44 100644
--- a/src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs
@@ -72,12 +72,8 @@ internal static class OAVariantLib
* Variant and the types that CLR supports explicitly in the
* CLR Variant class.
*/
- internal static Variant ChangeType(Variant source, Type targetClass, short options, CultureInfo culture)
+ internal static Variant ChangeType(Variant source, Type targetClass!!, short options, CultureInfo culture!!)
{
- if (targetClass == null)
- throw new ArgumentNullException(nameof(targetClass));
- if (culture == null)
- throw new ArgumentNullException(nameof(culture));
Variant result = default;
ChangeTypeEx(ref result, ref source,
culture.LCID,
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs
index 482752ba46ffbe..4bec5538507021 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs
@@ -521,7 +521,7 @@ internal void set_Item(int index, T value)
_this[index] = value;
}
- private void Add(T value)
+ private void Add(T _)
{
// Not meaningful for arrays.
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_FixedSizeCollection);
@@ -556,20 +556,20 @@ private int IndexOf(T value)
return Array.IndexOf(_this, value, 0, _this.Length);
}
- private void Insert(int index, T value)
+ private void Insert(int _, T _1)
{
// Not meaningful for arrays
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_FixedSizeCollection);
}
- private bool Remove(T value)
+ private bool Remove(T _)
{
// Not meaningful for arrays
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_FixedSizeCollection);
return default;
}
- private void RemoveAt(int index)
+ private void RemoveAt(int _)
{
// Not meaningful for arrays
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_FixedSizeCollection);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
index 90261791d0c8d5..f33849d2a949e5 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
@@ -450,14 +450,8 @@ public static Attribute[] GetCustomAttributes(MemberInfo element, Type attribute
return GetCustomAttributes(element, attributeType, true);
}
- public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType, bool inherit)
+ public static Attribute[] GetCustomAttributes(MemberInfo element!!, Type attributeType!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -474,11 +468,8 @@ public static Attribute[] GetCustomAttributes(MemberInfo element)
return GetCustomAttributes(element, true);
}
- public static Attribute[] GetCustomAttributes(MemberInfo element, bool inherit)
+ public static Attribute[] GetCustomAttributes(MemberInfo element!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
return element.MemberType switch
{
MemberTypes.Property => InternalGetCustomAttributes((PropertyInfo)element, typeof(Attribute), inherit),
@@ -492,15 +483,9 @@ public static bool IsDefined(MemberInfo element, Type attributeType)
return IsDefined(element, attributeType, true);
}
- public static bool IsDefined(MemberInfo element, Type attributeType, bool inherit)
+ public static bool IsDefined(MemberInfo element!!, Type attributeType!!, bool inherit)
{
// Returns true if a custom attribute subclass of attributeType class/interface with inheritance walk
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -543,14 +528,8 @@ public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attrib
return GetCustomAttributes(element, attributeType, true);
}
- public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType, bool inherit)
+ public static Attribute[] GetCustomAttributes(ParameterInfo element!!, Type attributeType!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -565,11 +544,8 @@ public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attrib
return (element.GetCustomAttributes(attributeType, inherit) as Attribute[])!;
}
- public static Attribute[] GetCustomAttributes(ParameterInfo element, bool inherit)
+ public static Attribute[] GetCustomAttributes(ParameterInfo element!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
if (element.Member == null)
throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element));
@@ -586,14 +562,9 @@ public static bool IsDefined(ParameterInfo element, Type attributeType)
return IsDefined(element, attributeType, true);
}
- public static bool IsDefined(ParameterInfo element, Type attributeType, bool inherit)
+ public static bool IsDefined(ParameterInfo element!!, Type attributeType!!, bool inherit)
{
// Returns true is a custom attribute subclass of attributeType class/interface with inheritance walk
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -653,22 +624,13 @@ public static Attribute[] GetCustomAttributes(Module element)
return GetCustomAttributes(element, true);
}
- public static Attribute[] GetCustomAttributes(Module element, bool inherit)
+ public static Attribute[] GetCustomAttributes(Module element!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
return (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit);
}
- public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit)
+ public static Attribute[] GetCustomAttributes(Module element!!, Type attributeType!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -680,14 +642,9 @@ public static bool IsDefined(Module element, Type attributeType)
return IsDefined(element, attributeType, false);
}
- public static bool IsDefined(Module element, Type attributeType, bool inherit)
+ public static bool IsDefined(Module element!!, Type attributeType!!, bool inherit)
{
// Returns true is a custom attribute subclass of attributeType class/interface with no inheritance walk
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -723,14 +680,8 @@ public static Attribute[] GetCustomAttributes(Assembly element, Type attributeTy
return GetCustomAttributes(element, attributeType, true);
}
- public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit)
+ public static Attribute[] GetCustomAttributes(Assembly element!!, Type attributeType!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
@@ -742,11 +693,8 @@ public static Attribute[] GetCustomAttributes(Assembly element)
return GetCustomAttributes(element, true);
}
- public static Attribute[] GetCustomAttributes(Assembly element, bool inherit)
+ public static Attribute[] GetCustomAttributes(Assembly element!!, bool inherit)
{
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
return (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit);
}
@@ -755,14 +703,9 @@ public static bool IsDefined(Assembly element, Type attributeType)
return IsDefined(element, attributeType, true);
}
- public static bool IsDefined(Assembly element, Type attributeType, bool inherit)
+ public static bool IsDefined(Assembly element!!, Type attributeType!!, bool inherit)
{
// Returns true is a custom attribute subclass of attributeType class/interface with no inheritance walk
- if (element == null)
- throw new ArgumentNullException(nameof(element));
-
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
index bb9d40bc38db3c..e63e57a3f4a11e 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
@@ -33,11 +33,8 @@ IEnumerator IEnumerable.GetEnumerator()
// ICollection members
- public void CopyTo(Array array, int index)
+ public void CopyTo(Array array!!, int index)
{
- if (array == null)
- throw new ArgumentNullException(nameof(array));
-
if (array.Rank != 1)
throw new ArgumentException(SR.Arg_RankMultiDimNotSupported);
@@ -58,23 +55,14 @@ public void CopyTo(Array array, int index)
// IDictionary members
- public object? this[object key]
+ public object? this[object key!!]
{
get
{
- if (key == null)
- {
- throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
- }
return null;
}
set
{
- if (key == null)
- {
- throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
- }
-
if (!key.GetType().IsSerializable)
throw new ArgumentException(SR.Argument_NotSerializable, nameof(key));
@@ -94,13 +82,8 @@ public bool Contains(object key)
return false;
}
- public void Add(object key, object? value)
+ public void Add(object key!!, object? value)
{
- if (key == null)
- {
- throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
- }
-
if (!key.GetType().IsSerializable)
throw new ArgumentException(SR.Argument_NotSerializable, nameof(key));
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
index 23567e475d99b9..3afbff9eb08000 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
@@ -34,14 +34,8 @@ public abstract partial class Delegate : ICloneable, ISerializable
// This constructor is called from the class generated by the
// compiler generated code
[RequiresUnreferencedCode("The target method might be removed")]
- protected Delegate(object target, string method)
+ protected Delegate(object target!!, string method!!)
{
- if (target == null)
- throw new ArgumentNullException(nameof(target));
-
- if (method == null)
- throw new ArgumentNullException(nameof(method));
-
// This API existed in v1/v1.1 and only expected to create closed
// instance delegates. Constrain the call to BindToMethodName to
// such and don't allow relaxed signature matching (which could make
@@ -57,17 +51,10 @@ protected Delegate(object target, string method)
// This constructor is called from a class to generate a
// delegate based upon a static method name and the Type object
// for the class defining the method.
- protected Delegate([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method)
+ protected Delegate([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target!!, string method!!)
{
- if (target == null)
- throw new ArgumentNullException(nameof(target));
-
if (target.ContainsGenericParameters)
throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target));
-
- if (method == null)
- throw new ArgumentNullException(nameof(method));
-
if (!(target is RuntimeType rtTarget))
throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target));
@@ -220,15 +207,8 @@ protected virtual MethodInfo GetMethodImpl()
// V1 API.
[RequiresUnreferencedCode("The target method might be removed")]
- public static Delegate? CreateDelegate(Type type, object target, string method, bool ignoreCase, bool throwOnBindFailure)
+ public static Delegate? CreateDelegate(Type type!!, object target!!, string method!!, bool ignoreCase, bool throwOnBindFailure)
{
- if (type == null)
- throw new ArgumentNullException(nameof(type));
- if (target == null)
- throw new ArgumentNullException(nameof(target));
- if (method == null)
- throw new ArgumentNullException(nameof(method));
-
if (!(type is RuntimeType rtType))
throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
if (!rtType.IsDelegate())
@@ -258,17 +238,10 @@ protected virtual MethodInfo GetMethodImpl()
}
// V1 API.
- public static Delegate? CreateDelegate(Type type, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target, string method, bool ignoreCase, bool throwOnBindFailure)
+ public static Delegate? CreateDelegate(Type type!!, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type target!!, string method!!, bool ignoreCase, bool throwOnBindFailure)
{
- if (type == null)
- throw new ArgumentNullException(nameof(type));
- if (target == null)
- throw new ArgumentNullException(nameof(target));
if (target.ContainsGenericParameters)
throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target));
- if (method == null)
- throw new ArgumentNullException(nameof(method));
-
if (!(type is RuntimeType rtType))
throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
if (!(target is RuntimeType rtTarget))
@@ -297,13 +270,9 @@ protected virtual MethodInfo GetMethodImpl()
}
// V1 API.
- public static Delegate? CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure)
+ public static Delegate? CreateDelegate(Type type!!, MethodInfo method!!, bool throwOnBindFailure)
{
// Validate the parameters.
- if (type == null)
- throw new ArgumentNullException(nameof(type));
- if (method == null)
- throw new ArgumentNullException(nameof(method));
if (!(type is RuntimeType rtType))
throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
@@ -374,11 +343,9 @@ protected virtual MethodInfo GetMethodImpl()
//
// V2 internal API.
- internal static Delegate CreateDelegateNoSecurityCheck(Type type, object? target, RuntimeMethodHandle method)
+ internal static Delegate CreateDelegateNoSecurityCheck(Type type!!, object? target, RuntimeMethodHandle method)
{
// Validate the parameters.
- if (type == null)
- throw new ArgumentNullException(nameof(type));
if (method.IsNullHandle())
throw new ArgumentNullException(nameof(method));
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs
index 21f121b24f02a6..d4938c14002edc 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.CoreCLR.cs
@@ -40,11 +40,8 @@ private static unsafe partial ulong Enable(
[GeneratedDllImport(RuntimeHelpers.QCall, EntryPoint = "EventPipeInternal_DeleteProvider")]
internal static partial void DeleteProvider(IntPtr provHandle);
-#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
- // TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we annotate blittable types used in interop in CoreLib (like Guid)
- [DllImport(RuntimeHelpers.QCall, EntryPoint = "EventPipeInternal_EventActivityIdControl")]
- internal static extern int EventActivityIdControl(uint controlCode, ref Guid activityId);
-#pragma warning restore DLLIMPORTGENANALYZER015
+ [GeneratedDllImport(RuntimeHelpers.QCall, EntryPoint = "EventPipeInternal_EventActivityIdControl")]
+ internal static partial int EventActivityIdControl(uint controlCode, ref Guid activityId);
[GeneratedDllImport(RuntimeHelpers.QCall, EntryPoint = "EventPipeInternal_WriteEventData")]
internal static unsafe partial void WriteEventData(IntPtr eventHandle, EventProvider.EventData* pEventData, uint dataCount, Guid* activityId, Guid* relatedActivityId);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs
index ab53609931660d..48397813c61265 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs
@@ -52,7 +52,9 @@ private void BuildStackFrame(int skipFrames, bool needFileInfo)
}
}
+#pragma warning disable IDE0060
private static bool AppendStackFrameWithoutMethodBase(StringBuilder sb) => false;
+#pragma warning restore IDE0060
[GeneratedDllImport(RuntimeHelpers.QCall, EntryPoint = "StackFrame_GetMethodDescFromNativeIP")]
private static partial RuntimeMethodHandleInternal GetMethodDescFromNativeIP(IntPtr ip);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/GC.cs b/src/coreclr/System.Private.CoreLib/src/System/GC.cs
index 7597672f683164..3e28ba7d3947d5 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/GC.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/GC.cs
@@ -303,10 +303,8 @@ public static void WaitForPendingFinalizers()
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void _SuppressFinalize(object o);
- public static void SuppressFinalize(object obj)
+ public static void SuppressFinalize(object obj!!)
{
- if (obj == null)
- throw new ArgumentNullException(nameof(obj));
_SuppressFinalize(obj);
}
@@ -317,10 +315,8 @@ public static void SuppressFinalize(object obj)
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void _ReRegisterForFinalize(object o);
- public static void ReRegisterForFinalize(object obj)
+ public static void ReRegisterForFinalize(object obj!!)
{
- if (obj == null)
- throw new ArgumentNullException(nameof(obj));
_ReRegisterForFinalize(obj);
}
@@ -609,10 +605,7 @@ internal static void RegisterMemoryLoadChangeNotification(float lowMemoryPercent
{
throw new ArgumentOutOfRangeException(nameof(lowMemoryPercent));
}
- if (notification == null)
- {
- throw new ArgumentNullException(nameof(notification));
- }
+ ArgumentNullException.ThrowIfNull(notification);
lock (s_notifications)
{
@@ -625,13 +618,8 @@ internal static void RegisterMemoryLoadChangeNotification(float lowMemoryPercent
}
}
- internal static void UnregisterMemoryLoadChangeNotification(Action notification)
+ internal static void UnregisterMemoryLoadChangeNotification(Action notification!!)
{
- if (notification == null)
- {
- throw new ArgumentNullException(nameof(notification));
- }
-
lock (s_notifications)
{
for (int i = 0; i < s_notifications.Count; ++i)
diff --git a/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs
index 6abac717392c37..4166d91f4f02ed 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs
@@ -571,6 +571,7 @@ protected override MethodInfo GetMethodImpl()
private static void ThrowNullThisInDelegateToInstance() =>
throw new ArgumentException(SR.Arg_DlgtNullInst);
+#pragma warning disable IDE0060
[System.Diagnostics.DebuggerNonUserCode]
private void CtorClosed(object target, IntPtr methodPtr)
{
@@ -635,5 +636,6 @@ private void CtorCollectibleVirtualDispatch(object target, IntPtr methodPtr, Int
this._methodPtrAux = GetCallStub(methodPtr);
this._methodBase = System.Runtime.InteropServices.GCHandle.InternalGet(gchandle);
}
+#pragma warning restore IDE0060
}
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs
index 282d713232b660..651c4aed685f46 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs
@@ -23,11 +23,8 @@ public static Assembly Load(string assemblyString)
[Obsolete("Assembly.LoadWithPartialName has been deprecated. Use Assembly.Load() instead.")]
[System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod
- public static Assembly? LoadWithPartialName(string partialName)
+ public static Assembly? LoadWithPartialName(string partialName!!)
{
- if (partialName == null)
- throw new ArgumentNullException(nameof(partialName));
-
if ((partialName.Length == 0) || (partialName[0] == '\0'))
throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName));
@@ -45,11 +42,8 @@ public static Assembly Load(string assemblyString)
// Locate an assembly by its name. The name can be strong or
// weak. The assembly is loaded into the domain of the caller.
[System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod
- public static Assembly Load(AssemblyName assemblyRef)
+ public static Assembly Load(AssemblyName assemblyRef!!)
{
- if (assemblyRef == null)
- throw new ArgumentNullException(nameof(assemblyRef));
-
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return RuntimeAssembly.InternalLoad(assemblyRef, ref stackMark, AssemblyLoadContext.CurrentContextualReflectionContext);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs
index 3e8bd014fb0aa3..b821a1141fa75a 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs
@@ -1,29 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-// For each dynamic assembly there will be two AssemblyBuilder objects: the "internal"
-// AssemblyBuilder object and the "external" AssemblyBuilder object.
-// 1. The "internal" object is the real assembly object that the VM creates and knows about. However,
-// you can perform RefEmit operations on it only if you have its granted permission. From the AppDomain
-// and other "internal" objects like the "internal" ModuleBuilders and runtime types, you can only
-// get the "internal" objects. This is to prevent low-trust code from getting a hold of the dynamic
-// AssemblyBuilder/ModuleBuilder/TypeBuilder/MethodBuilder/etc other people have created by simply
-// enumerating the AppDomain and inject code in it.
-// 2. The "external" object is merely an wrapper of the "internal" object and all operations on it
-// are directed to the internal object. This is the one you get by calling DefineDynamicAssembly
-// on AppDomain and the one you can always perform RefEmit operations on. You can get other "external"
-// objects from the "external" AssemblyBuilder, ModuleBuilder, TypeBuilder, MethodBuilder, etc. Note
-// that VM doesn't know about this object. So every time we call into the VM we need to pass in the
-// "internal" object.
-//
-// "internal" and "external" ModuleBuilders are similar
-
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.SymbolStore;
using System.Globalization;
using System.IO;
+using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
@@ -73,20 +57,26 @@ internal ModuleBuilder GetModuleBuilder(RuntimeModule module)
#region Constructor
- internal AssemblyBuilder(AssemblyName name,
+ internal AssemblyBuilder(AssemblyName name!!,
AssemblyBuilderAccess access,
- ref StackCrawlMark stackMark,
+ Assembly? callingAssembly,
AssemblyLoadContext? assemblyLoadContext,
IEnumerable? unsafeAssemblyAttributes)
{
- if (name == null)
- {
- throw new ArgumentNullException(nameof(name));
- }
if (access != AssemblyBuilderAccess.Run && access != AssemblyBuilderAccess.RunAndCollect)
{
throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)access), nameof(access));
}
+ if (callingAssembly == null)
+ {
+ // Called either from interop or async delegate invocation. Rejecting because we don't
+ // know how to set the correct context of the new dynamic assembly.
+ throw new InvalidOperationException();
+ }
+ if (assemblyLoadContext == null)
+ {
+ assemblyLoadContext = AssemblyLoadContext.GetLoadContext(callingAssembly);
+ }
// Clone the name in case the caller modifies it underneath us.
name = (AssemblyName)name.Clone();
@@ -104,7 +94,6 @@ internal AssemblyBuilder(AssemblyName name,
RuntimeAssembly? retAssembly = null;
CreateDynamicAssembly(ObjectHandleOnStack.Create(ref name),
- new StackCrawlMarkHandle(ref stackMark),
(int)access,
ObjectHandleOnStack.Create(ref assemblyLoadContext),
ObjectHandleOnStack.Create(ref retAssembly));
@@ -150,39 +139,31 @@ private void InitManifestModule()
#region DefineDynamicAssembly
- ///
- /// If an AssemblyName has a public key specified, the assembly is assumed
- /// to have a strong name and a hash will be computed when the assembly
- /// is saved.
- ///
- [DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod.
+ [DynamicSecurityMethod] // Required to make Assembly.GetCallingAssembly reliable.
public static AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)
{
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return InternalDefineDynamicAssembly(name,
access,
- ref stackMark,
+ Assembly.GetCallingAssembly(),
AssemblyLoadContext.CurrentContextualReflectionContext,
null);
}
- [DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod.
+ [DynamicSecurityMethod] // Required to make Assembly.GetCallingAssembly reliable.
public static AssemblyBuilder DefineDynamicAssembly(
AssemblyName name,
AssemblyBuilderAccess access,
IEnumerable? assemblyAttributes)
{
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return InternalDefineDynamicAssembly(name,
access,
- ref stackMark,
+ Assembly.GetCallingAssembly(),
AssemblyLoadContext.CurrentContextualReflectionContext,
assemblyAttributes);
}
[GeneratedDllImport(RuntimeHelpers.QCall, EntryPoint = "AppDomain_CreateDynamicAssembly")]
private static partial void CreateDynamicAssembly(ObjectHandleOnStack name,
- StackCrawlMarkHandle stackMark,
int access,
ObjectHandleOnStack assemblyLoadContext,
ObjectHandleOnStack retAssembly);
@@ -192,7 +173,7 @@ private static partial void CreateDynamicAssembly(ObjectHandleOnStack name,
internal static AssemblyBuilder InternalDefineDynamicAssembly(
AssemblyName name,
AssemblyBuilderAccess access,
- ref StackCrawlMark stackMark,
+ Assembly? callingAssembly,
AssemblyLoadContext? assemblyLoadContext,
IEnumerable? unsafeAssemblyAttributes)
{
@@ -201,7 +182,7 @@ internal static AssemblyBuilder InternalDefineDynamicAssembly(
// We can only create dynamic assemblies in the current domain
return new AssemblyBuilder(name,
access,
- ref stackMark,
+ callingAssembly,
assemblyLoadContext,
unsafeAssemblyAttributes);
}
@@ -215,7 +196,6 @@ internal static AssemblyBuilder InternalDefineDynamicAssembly(
/// modules within an Assembly with the same name. This dynamic module is
/// a transient module.
///
- [DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod.
public ModuleBuilder DefineDynamicModule(string name)
{
lock (SyncRoot)
@@ -387,17 +367,8 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? vers
///
/// Use this function if client decides to form the custom attribute blob themselves.
///
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- {
- throw new ArgumentNullException(nameof(con));
- }
- if (binaryAttribute == null)
- {
- throw new ArgumentNullException(nameof(binaryAttribute));
- }
-
lock (SyncRoot)
{
TypeBuilder.DefineCustomAttribute(
@@ -411,13 +382,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
///
/// Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder.
///
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- {
- throw new ArgumentNullException(nameof(customBuilder));
- }
-
lock (SyncRoot)
{
customBuilder.CreateCustomAttribute(_manifestModuleBuilder, AssemblyBuilderData.AssemblyDefToken);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
index 1038d9ba86504a..f910b8a7e7da0d 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
@@ -48,20 +48,8 @@ public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, Fi
// public constructor to form the custom attribute with constructor and constructor
// parameters.
- public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, PropertyInfo[] namedProperties, object?[] propertyValues, FieldInfo[] namedFields, object?[] fieldValues)
+ public CustomAttributeBuilder(ConstructorInfo con!!, object?[] constructorArgs!!, PropertyInfo[] namedProperties!!, object?[] propertyValues!!, FieldInfo[] namedFields!!, object?[] fieldValues!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
- if (constructorArgs == null)
- throw new ArgumentNullException(nameof(constructorArgs));
- if (namedProperties == null)
- throw new ArgumentNullException(nameof(namedProperties));
- if (propertyValues == null)
- throw new ArgumentNullException(nameof(propertyValues));
- if (namedFields == null)
- throw new ArgumentNullException(nameof(namedFields));
- if (fieldValues == null)
- throw new ArgumentNullException(nameof(fieldValues));
#pragma warning disable CA2208 // Instantiate argument exceptions correctly, combination of arguments used
if (namedProperties.Length != propertyValues.Length)
throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedProperties, propertyValues");
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
index ff832cff7e14a2..d5d36a60b4231f 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
@@ -32,11 +32,9 @@ internal void GetCallableMethod(RuntimeModule module, DynamicMethod dm)
// *** ILGenerator api ***
- public override LocalBuilder DeclareLocal(Type localType, bool pinned)
+ public override LocalBuilder DeclareLocal(Type localType!!, bool pinned)
{
LocalBuilder localBuilder;
- if (localType == null)
- throw new ArgumentNullException(nameof(localType));
RuntimeType? rtType = localType as RuntimeType;
@@ -55,11 +53,8 @@ public override LocalBuilder DeclareLocal(Type localType, bool pinned)
// Token resolution calls
//
//
- public override void Emit(OpCode opcode, MethodInfo meth)
+ public override void Emit(OpCode opcode, MethodInfo meth!!)
{
- if (meth == null)
- throw new ArgumentNullException(nameof(meth));
-
int stackchange = 0;
int token;
DynamicMethod? dynMeth = meth as DynamicMethod;
@@ -110,11 +105,8 @@ public override void Emit(OpCode opcode, MethodInfo meth)
PutInteger4(token);
}
- public override void Emit(OpCode opcode, ConstructorInfo con)
+ public override void Emit(OpCode opcode, ConstructorInfo con!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
-
RuntimeConstructorInfo? rtConstructor = con as RuntimeConstructorInfo;
if (rtConstructor == null)
throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con));
@@ -137,11 +129,8 @@ public override void Emit(OpCode opcode, ConstructorInfo con)
PutInteger4(token);
}
- public override void Emit(OpCode opcode, Type type)
+ public override void Emit(OpCode opcode, Type type!!)
{
- if (type == null)
- throw new ArgumentNullException(nameof(type));
-
RuntimeType? rtType = type as RuntimeType;
if (rtType == null)
@@ -153,11 +142,8 @@ public override void Emit(OpCode opcode, Type type)
PutInteger4(token);
}
- public override void Emit(OpCode opcode, FieldInfo field)
+ public override void Emit(OpCode opcode, FieldInfo field!!)
{
- if (field == null)
- throw new ArgumentNullException(nameof(field));
-
RuntimeFieldInfo? runtimeField = field as RuntimeFieldInfo;
if (runtimeField == null)
throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(field));
@@ -173,11 +159,8 @@ public override void Emit(OpCode opcode, FieldInfo field)
PutInteger4(token);
}
- public override void Emit(OpCode opcode, string str)
+ public override void Emit(OpCode opcode, string str!!)
{
- if (str == null)
- throw new ArgumentNullException(nameof(str));
-
int tempVal = GetTokenForString(str);
EnsureCapacity(7);
InternalEmit(opcode);
@@ -264,11 +247,8 @@ public override void EmitCalli(OpCode opcode, CallingConvention unmanagedCallCon
PutInteger4(token);
}
- public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes)
+ public override void EmitCall(OpCode opcode, MethodInfo methodInfo!!, Type[]? optionalParameterTypes)
{
- if (methodInfo == null)
- throw new ArgumentNullException(nameof(methodInfo));
-
if (!(opcode.Equals(OpCodes.Call) || opcode.Equals(OpCodes.Callvirt) || opcode.Equals(OpCodes.Newobj)))
throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode));
@@ -303,11 +283,8 @@ public override void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? opti
PutInteger4(tk);
}
- public override void Emit(OpCode opcode, SignatureHelper signature)
+ public override void Emit(OpCode opcode, SignatureHelper signature!!)
{
- if (signature == null)
- throw new ArgumentNullException(nameof(signature));
-
int stackchange = 0;
EnsureCapacity(7);
InternalEmit(opcode);
@@ -376,8 +353,7 @@ public override void BeginCatchBlock(Type exceptionType)
else
{
// execute this branch if previous clause is Catch or Fault
- if (exceptionType == null)
- throw new ArgumentNullException(nameof(exceptionType));
+ ArgumentNullException.ThrowIfNull(exceptionType);
if (rtType == null)
throw new ArgumentException(SR.Argument_MustBeRuntimeType);
@@ -895,8 +871,8 @@ public unsafe void SetCode(byte* code, int codeSize, int maxStackSize)
{
if (codeSize < 0)
throw new ArgumentOutOfRangeException(nameof(codeSize), SR.ArgumentOutOfRange_GenericPositive);
- if (codeSize > 0 && code == null)
- throw new ArgumentNullException(nameof(code));
+ if (codeSize > 0)
+ ArgumentNullException.ThrowIfNull(code);
m_code = new Span(code, codeSize).ToArray();
m_maxStackSize = maxStackSize;
@@ -913,8 +889,8 @@ public unsafe void SetExceptions(byte* exceptions, int exceptionsSize)
if (exceptionsSize < 0)
throw new ArgumentOutOfRangeException(nameof(exceptionsSize), SR.ArgumentOutOfRange_GenericPositive);
- if (exceptionsSize > 0 && exceptions == null)
- throw new ArgumentNullException(nameof(exceptions));
+ if (exceptionsSize > 0)
+ ArgumentNullException.ThrowIfNull(exceptions);
m_exceptions = new Span(exceptions, exceptionsSize).ToArray();
}
@@ -930,8 +906,8 @@ public unsafe void SetLocalSignature(byte* localSignature, int signatureSize)
if (signatureSize < 0)
throw new ArgumentOutOfRangeException(nameof(signatureSize), SR.ArgumentOutOfRange_GenericPositive);
- if (signatureSize > 0 && localSignature == null)
- throw new ArgumentNullException(nameof(localSignature));
+ if (signatureSize > 0)
+ ArgumentNullException.ThrowIfNull(localSignature);
m_localSignature = new Span(localSignature, signatureSize).ToArray();
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
index c98d78da4c84bf..e1819a363d3866 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs
@@ -5,6 +5,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
+using System.Runtime.Loader;
using System.Text;
using System.Threading;
@@ -82,11 +83,8 @@ public DynamicMethod(string name,
public DynamicMethod(string name,
Type? returnType,
Type[]? parameterTypes,
- Module m)
+ Module m!!)
{
- if (m == null)
- throw new ArgumentNullException(nameof(m));
-
Init(name,
MethodAttributes.Public | MethodAttributes.Static,
CallingConventions.Standard,
@@ -101,12 +99,9 @@ public DynamicMethod(string name,
public DynamicMethod(string name,
Type? returnType,
Type[]? parameterTypes,
- Module m,
+ Module m!!,
bool skipVisibility)
{
- if (m == null)
- throw new ArgumentNullException(nameof(m));
-
Init(name,
MethodAttributes.Public | MethodAttributes.Static,
CallingConventions.Standard,
@@ -123,12 +118,9 @@ public DynamicMethod(string name,
CallingConventions callingConvention,
Type? returnType,
Type[]? parameterTypes,
- Module m,
+ Module m!!,
bool skipVisibility)
{
- if (m == null)
- throw new ArgumentNullException(nameof(m));
-
Init(name,
attributes,
callingConvention,
@@ -143,11 +135,8 @@ public DynamicMethod(string name,
public DynamicMethod(string name,
Type? returnType,
Type[]? parameterTypes,
- Type owner)
+ Type owner!!)
{
- if (owner == null)
- throw new ArgumentNullException(nameof(owner));
-
Init(name,
MethodAttributes.Public | MethodAttributes.Static,
CallingConventions.Standard,
@@ -162,12 +151,9 @@ public DynamicMethod(string name,
public DynamicMethod(string name,
Type? returnType,
Type[]? parameterTypes,
- Type owner,
+ Type owner!!,
bool skipVisibility)
{
- if (owner == null)
- throw new ArgumentNullException(nameof(owner));
-
Init(name,
MethodAttributes.Public | MethodAttributes.Static,
CallingConventions.Standard,
@@ -184,12 +170,9 @@ public DynamicMethod(string name,
CallingConventions callingConvention,
Type? returnType,
Type[]? parameterTypes,
- Type owner,
+ Type owner!!,
bool skipVisibility)
{
- if (owner == null)
- throw new ArgumentNullException(nameof(owner));
-
Init(name,
attributes,
callingConvention,
@@ -234,12 +217,11 @@ private static RuntimeModule GetDynamicMethodsModule()
return s_anonymouslyHostedDynamicMethodsModule;
AssemblyName assemblyName = new AssemblyName("Anonymously Hosted DynamicMethods Assembly");
- StackCrawlMark stackMark = StackCrawlMark.LookForMe;
AssemblyBuilder assembly = AssemblyBuilder.InternalDefineDynamicAssembly(
assemblyName,
AssemblyBuilderAccess.Run,
- ref stackMark,
+ typeof(object).Assembly,
null,
null);
@@ -253,17 +235,17 @@ private static RuntimeModule GetDynamicMethodsModule()
[MemberNotNull(nameof(m_parameterTypes))]
[MemberNotNull(nameof(m_returnType))]
[MemberNotNull(nameof(m_dynMethod))]
- private void Init(string name,
- MethodAttributes attributes,
- CallingConventions callingConvention,
- Type? returnType,
- Type[]? signature,
- Type? owner,
- Module? m,
- bool skipVisibility,
- bool transparentMethod)
+ private void Init(string name!!,
+ MethodAttributes attributes,
+ CallingConventions callingConvention,
+ Type? returnType,
+ Type[]? signature,
+ Type? owner,
+ Module? m,
+ bool skipVisibility,
+ bool transparentMethod)
{
- DynamicMethod.CheckConsistency(attributes, callingConvention);
+ CheckConsistency(attributes, callingConvention);
// check and store the signature
if (signature != null)
@@ -329,10 +311,6 @@ private void Init(string name,
m_ilGenerator = null;
m_fInitLocals = true;
m_methodHandle = null;
-
- if (name == null)
- throw new ArgumentNullException(nameof(name));
-
m_dynMethod = new RTDynamicMethod(this, name, attributes, callingConvention);
}
@@ -655,11 +633,8 @@ public override object[] GetCustomAttributes(bool inherit)
return new object[] { new MethodImplAttribute((MethodImplOptions)GetMethodImplementationFlags()) };
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.IsAssignableFrom(typeof(MethodImplAttribute)))
return true;
else
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs
index be0ed200842094..c393d8dd1d6857 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs
@@ -46,13 +46,8 @@ internal int GetEventToken()
return m_evToken;
}
- private void SetMethodSemantics(MethodBuilder mdBuilder, MethodSemanticsAttributes semantics)
+ private void SetMethodSemantics(MethodBuilder mdBuilder!!, MethodSemanticsAttributes semantics)
{
- if (mdBuilder == null)
- {
- throw new ArgumentNullException(nameof(mdBuilder));
- }
-
m_type.ThrowIfCreated();
ModuleBuilder module = m_module;
TypeBuilder.DefineMethodSemantics(
@@ -84,12 +79,8 @@ public void AddOtherMethod(MethodBuilder mdBuilder)
// Use this function if client decides to form the custom attribute blob themselves
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
- if (binaryAttribute == null)
- throw new ArgumentNullException(nameof(binaryAttribute));
m_type.ThrowIfCreated();
TypeBuilder.DefineCustomAttribute(
@@ -100,12 +91,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
}
// Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- {
- throw new ArgumentNullException(nameof(customBuilder));
- }
m_type.ThrowIfCreated();
customBuilder.CreateCustomAttribute(m_module, m_evToken);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs
index c3e22c5d340719..5c65ff31c00b67 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.cs
@@ -154,14 +154,8 @@ public void SetConstant(object? defaultValue)
TypeBuilder.SetConstantValue(m_typeBuilder.GetModuleBuilder(), m_fieldTok, m_fieldType, defaultValue);
}
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
-
- if (binaryAttribute == null)
- throw new ArgumentNullException(nameof(binaryAttribute));
-
ModuleBuilder module = (m_typeBuilder.Module as ModuleBuilder)!;
m_typeBuilder.ThrowIfCreated();
@@ -170,11 +164,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
m_fieldTok, module.GetConstructorToken(con), binaryAttribute);
}
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- throw new ArgumentNullException(nameof(customBuilder));
-
m_typeBuilder.ThrowIfCreated();
ModuleBuilder? module = m_typeBuilder.Module as ModuleBuilder;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs
index 1b35f5cdbb15f0..65d97cd384e7d3 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs
@@ -474,11 +474,8 @@ public virtual void Emit(OpCode opcode, int arg)
PutInteger4(arg);
}
- public virtual void Emit(OpCode opcode, MethodInfo meth)
+ public virtual void Emit(OpCode opcode, MethodInfo meth!!)
{
- if (meth == null)
- throw new ArgumentNullException(nameof(meth));
-
if (opcode.Equals(OpCodes.Call) || opcode.Equals(OpCodes.Callvirt) || opcode.Equals(OpCodes.Newobj))
{
EmitCall(opcode, meth, null);
@@ -586,11 +583,8 @@ public virtual void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv
PutInteger4(modBuilder.GetSignatureToken(sig));
}
- public virtual void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes)
+ public virtual void EmitCall(OpCode opcode, MethodInfo methodInfo!!, Type[]? optionalParameterTypes)
{
- if (methodInfo == null)
- throw new ArgumentNullException(nameof(methodInfo));
-
if (!(opcode.Equals(OpCodes.Call) || opcode.Equals(OpCodes.Callvirt) || opcode.Equals(OpCodes.Newobj)))
throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode));
@@ -621,11 +615,8 @@ public virtual void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optio
PutInteger4(tk);
}
- public virtual void Emit(OpCode opcode, SignatureHelper signature)
+ public virtual void Emit(OpCode opcode, SignatureHelper signature!!)
{
- if (signature == null)
- throw new ArgumentNullException(nameof(signature));
-
int stackchange = 0;
ModuleBuilder modBuilder = (ModuleBuilder)m_methodBuilder.Module;
int sig = modBuilder.GetSignatureToken(signature);
@@ -655,11 +646,8 @@ public virtual void Emit(OpCode opcode, SignatureHelper signature)
PutInteger4(tempVal);
}
- public virtual void Emit(OpCode opcode, ConstructorInfo con)
+ public virtual void Emit(OpCode opcode, ConstructorInfo con!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
-
int stackchange = 0;
// Constructors cannot be generic so the value of UseMethodDef doesn't matter.
@@ -772,11 +760,8 @@ public virtual void Emit(OpCode opcode, Label label)
}
}
- public virtual void Emit(OpCode opcode, Label[] labels)
+ public virtual void Emit(OpCode opcode, Label[] labels!!)
{
- if (labels == null)
- throw new ArgumentNullException(nameof(labels));
-
// Emitting a switch table
int i;
@@ -818,14 +803,9 @@ public virtual void Emit(OpCode opcode, string str)
PutInteger4(tempVal);
}
- public virtual void Emit(OpCode opcode, LocalBuilder local)
+ public virtual void Emit(OpCode opcode, LocalBuilder local!!)
{
// Puts the opcode onto the IL stream followed by the information for local variable local.
-
- if (local == null)
- {
- throw new ArgumentNullException(nameof(local));
- }
int tempVal = local.GetLocalIndex();
if (local.GetMethodBuilder() != m_methodBuilder)
{
@@ -1022,10 +1002,7 @@ public virtual void BeginCatchBlock(Type exceptionType)
else
{
// execute this branch if previous clause is Catch or Fault
- if (exceptionType == null)
- {
- throw new ArgumentNullException(nameof(exceptionType));
- }
+ ArgumentNullException.ThrowIfNull(exceptionType);
Emit(OpCodes.Leave, current.GetEndLabel());
}
@@ -1188,18 +1165,13 @@ public virtual void EmitWriteLine(LocalBuilder localBuilder)
Emit(OpCodes.Callvirt, mi);
}
- public virtual void EmitWriteLine(FieldInfo fld)
+ public virtual void EmitWriteLine(FieldInfo fld!!)
{
// Emits the IL necessary to call WriteLine with fld. It is
// an error to call EmitWriteLine with a fld which is not of
// one of the types for which Console.WriteLine implements overloads. (e.g.
// we do *not* call ToString on the fields.
- if (fld == null)
- {
- throw new ArgumentNullException(nameof(fld));
- }
-
Type consoleType = Type.GetType(ConsoleTypeFullName, throwOnError: true)!;
MethodInfo prop = consoleType.GetMethod("get_Out")!;
Emit(OpCodes.Call, prop);
@@ -1252,10 +1224,7 @@ public virtual LocalBuilder DeclareLocal(Type localType, bool pinned)
throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated);
}
- if (localType == null)
- {
- throw new ArgumentNullException(nameof(localType));
- }
+ ArgumentNullException.ThrowIfNull(localType);
if (methodBuilder.m_bIsBaked)
{
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
index 9d11aacaf53ea8..8c1c738f0d390b 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/MethodBuilder.cs
@@ -130,14 +130,10 @@ internal MethodBuilder(string name, MethodAttributes attributes, CallingConventi
#region Internal Members
- internal void CreateMethodBodyHelper(ILGenerator il)
+ internal void CreateMethodBodyHelper(ILGenerator il!!)
{
// Sets the IL of the method. An ILGenerator is passed as an argument and the method
// queries this instance to get all of the information which it needs.
- if (il == null)
- {
- throw new ArgumentNullException(nameof(il));
- }
__ExceptionInfo[] excp;
int counter = 0;
@@ -517,11 +513,8 @@ public override MethodInfo MakeGenericMethod(params Type[] typeArguments)
return MethodBuilderInstantiation.MakeGenericMethod(this, typeArguments);
}
- public GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names)
+ public GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names!!)
{
- if (names == null)
- throw new ArgumentNullException(nameof(names));
-
if (names.Length == 0)
throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
@@ -529,8 +522,7 @@ public GenericTypeParameterBuilder[] DefineGenericParameters(params string[] nam
throw new InvalidOperationException(SR.InvalidOperation_GenericParametersAlreadySet);
for (int i = 0; i < names.Length; i++)
- if (names[i] == null)
- throw new ArgumentNullException(nameof(names));
+ ArgumentNullException.ThrowIfNull(names[i], nameof(names));
if (m_token != 0)
throw new InvalidOperationException(SR.InvalidOperation_MethodBuilderBaked);
@@ -734,13 +726,8 @@ internal Module GetModule()
return GetModuleBuilder();
}
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con is null)
- throw new ArgumentNullException(nameof(con));
- if (binaryAttribute is null)
- throw new ArgumentNullException(nameof(binaryAttribute));
-
ThrowIfGeneric();
TypeBuilder.DefineCustomAttribute(m_module, MetadataToken,
@@ -751,11 +738,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
ParseCA(con);
}
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- throw new ArgumentNullException(nameof(customBuilder));
-
ThrowIfGeneric();
customBuilder.CreateCustomAttribute((ModuleBuilder)m_module, MetadataToken);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
index f1ffa97874925f..3bf175e13e1f62 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs
@@ -216,14 +216,9 @@ private int GetTypeRefNested(Type type, Module? refedModule, string? strRefedMod
return GetTypeRef(new QCallModule(ref thisModule), typeName, new QCallModule(ref refedRuntimeModule), strRefedModuleFileName, tkResolution);
}
- internal int InternalGetConstructorToken(ConstructorInfo con, bool usingRef)
+ internal int InternalGetConstructorToken(ConstructorInfo con!!, bool usingRef)
{
// Helper to get constructor token. If usingRef is true, we will never use the def token
- if (con == null)
- {
- throw new ArgumentNullException(nameof(con));
- }
-
int tr;
int mr;
@@ -1033,13 +1028,8 @@ internal int GetTypeToken(Type type)
return GetTypeTokenInternal(type, getGenericDefinition: true);
}
- private int GetTypeTokenWorkerNoLock(Type type, bool getGenericDefinition)
+ private int GetTypeTokenWorkerNoLock(Type type!!, bool getGenericDefinition)
{
- if (type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
-
AssemblyBuilder.CheckContext(type);
// Return a token for the class relative to the Module. Tokens
@@ -1131,15 +1121,10 @@ internal int GetMethodToken(MethodInfo method)
// 1. GetMethodToken
// 2. ldtoken (see ILGenerator)
// For all other occasions we should return the method on the generic type instantiated on the formal parameters.
- private int GetMethodTokenNoLock(MethodInfo method, bool getGenericTypeDefinition)
+ private int GetMethodTokenNoLock(MethodInfo method!!, bool getGenericTypeDefinition)
{
// Return a MemberRef token if MethodInfo is not defined in this module. Or
// return the MethodDef token.
- if (method == null)
- {
- throw new ArgumentNullException(nameof(method));
- }
-
int tr;
int mr;
@@ -1370,13 +1355,8 @@ internal int GetFieldToken(FieldInfo field)
}
}
- private int GetFieldTokenNoLock(FieldInfo field)
+ private int GetFieldTokenNoLock(FieldInfo field!!)
{
- if (field == null)
- {
- throw new ArgumentNullException(nameof(field));
- }
-
int tr;
int mr;
@@ -1448,41 +1428,26 @@ private int GetFieldTokenNoLock(FieldInfo field)
return mr;
}
- internal int GetStringConstant(string str)
+ internal int GetStringConstant(string str!!)
{
- if (str == null)
- {
- throw new ArgumentNullException(nameof(str));
- }
-
// Returns a token representing a String constant. If the string
// value has already been defined, the existing token will be returned.
ModuleBuilder thisModule = this;
return GetStringConstant(new QCallModule(ref thisModule), str, str.Length);
}
- internal int GetSignatureToken(SignatureHelper sigHelper)
+ internal int GetSignatureToken(SignatureHelper sigHelper!!)
{
// Define signature token given a signature helper. This will define a metadata
// token for the signature described by SignatureHelper.
- if (sigHelper == null)
- {
- throw new ArgumentNullException(nameof(sigHelper));
- }
-
- // get the signature in byte form
+ // Get the signature in byte form.
byte[] sigBytes = sigHelper.InternalGetSignature(out int sigLength);
ModuleBuilder thisModule = this;
return TypeBuilder.GetTokenFromSig(new QCallModule(ref thisModule), sigBytes, sigLength);
}
- internal int GetSignatureToken(byte[] sigBytes, int sigLength)
+ internal int GetSignatureToken(byte[] sigBytes!!, int sigLength)
{
- if (sigBytes == null)
- {
- throw new ArgumentNullException(nameof(sigBytes));
- }
-
byte[] localSigBytes = new byte[sigBytes.Length];
Buffer.BlockCopy(sigBytes, 0, localSigBytes, 0, sigBytes.Length);
@@ -1494,17 +1459,8 @@ internal int GetSignatureToken(byte[] sigBytes, int sigLength)
#region Other
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- {
- throw new ArgumentNullException(nameof(con));
- }
- if (binaryAttribute == null)
- {
- throw new ArgumentNullException(nameof(binaryAttribute));
- }
-
TypeBuilder.DefineCustomAttribute(
this,
1, // This is hard coding the module token to 1
@@ -1512,13 +1468,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
binaryAttribute);
}
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- {
- throw new ArgumentNullException(nameof(customBuilder));
- }
-
customBuilder.CreateCustomAttribute(this, 1); // This is hard coding the module token to 1
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs
index 79379c535874c7..6be9a88cfe9210 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ParameterBuilder.cs
@@ -18,17 +18,8 @@ public virtual void SetConstant(object? defaultValue)
}
// Use this function if client decides to form the custom attribute blob themselves
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- {
- throw new ArgumentNullException(nameof(con));
- }
- if (binaryAttribute == null)
- {
- throw new ArgumentNullException(nameof(binaryAttribute));
- }
-
TypeBuilder.DefineCustomAttribute(
_methodBuilder.GetModuleBuilder(),
_token,
@@ -37,12 +28,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
}
// Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- {
- throw new ArgumentNullException(nameof(customBuilder));
- }
customBuilder.CreateCustomAttribute((ModuleBuilder)(_methodBuilder.GetModule()), _token);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs
index 89accc39caeb98..cb619bde1353da 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/PropertyBuilder.cs
@@ -28,7 +28,6 @@ public sealed class PropertyBuilder : PropertyInfo
internal PropertyBuilder(
ModuleBuilder mod, // the module containing this PropertyBuilder
string name, // property name
- SignatureHelper sig, // property signature descriptor info
PropertyAttributes attr, // property attribute such as DefaultProperty, Bindable, DisplayBind, etc
Type returnType, // return type of the property.
int prToken, // the metadata token for this property
@@ -67,13 +66,8 @@ public void SetConstant(object? defaultValue)
public override Module Module => m_containingType.Module;
- private void SetMethodSemantics(MethodBuilder mdBuilder, MethodSemanticsAttributes semantics)
+ private void SetMethodSemantics(MethodBuilder mdBuilder!!, MethodSemanticsAttributes semantics)
{
- if (mdBuilder == null)
- {
- throw new ArgumentNullException(nameof(mdBuilder));
- }
-
m_containingType.ThrowIfCreated();
ModuleBuilder module = m_moduleBuilder;
TypeBuilder.DefineMethodSemantics(
@@ -102,13 +96,8 @@ public void AddOtherMethod(MethodBuilder mdBuilder)
// Use this function if client decides to form the custom attribute blob themselves
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
- if (binaryAttribute == null)
- throw new ArgumentNullException(nameof(binaryAttribute));
-
m_containingType.ThrowIfCreated();
TypeBuilder.DefineCustomAttribute(
m_moduleBuilder,
@@ -118,12 +107,8 @@ public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
}
// Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- {
- throw new ArgumentNullException(nameof(customBuilder));
- }
m_containingType.ThrowIfCreated();
customBuilder.CreateCustomAttribute(m_moduleBuilder, m_tkProperty);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs
index 9dd3a2fbb63e89..cacb7ac0121c55 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs
@@ -167,14 +167,8 @@ public static SignatureHelper GetPropertySigHelper(Module? mod, CallingConventio
return sigHelp;
}
- internal static SignatureHelper GetTypeSigToken(Module module, Type type)
+ internal static SignatureHelper GetTypeSigToken(Module module!!, Type type!!)
{
- if (module == null)
- throw new ArgumentNullException(nameof(module));
-
- if (type == null)
- throw new ArgumentNullException(nameof(type));
-
return new SignatureHelper(module, type);
}
#endregion
@@ -308,8 +302,7 @@ private void AddOneArgTypeHelper(Type clsArgument, Type[]? requiredCustomModifie
{
Type t = requiredCustomModifiers[i];
- if (t == null)
- throw new ArgumentNullException(nameof(requiredCustomModifiers));
+ ArgumentNullException.ThrowIfNull(t, nameof(requiredCustomModifiers));
if (t.HasElementType)
throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers));
@@ -746,11 +739,8 @@ public void AddArgument(Type clsArgument)
AddArgument(clsArgument, null, null);
}
- public void AddArgument(Type argument, bool pinned)
+ public void AddArgument(Type argument!!, bool pinned)
{
- if (argument == null)
- throw new ArgumentNullException(nameof(argument));
-
IncrementArgCounts();
AddOneArgTypeHelper(argument, pinned);
}
@@ -777,8 +767,7 @@ public void AddArgument(Type argument, Type[]? requiredCustomModifiers, Type[]?
if (m_sigDone)
throw new ArgumentException(SR.Argument_SigIsFinalized);
- if (argument == null)
- throw new ArgumentNullException(nameof(argument));
+ ArgumentNullException.ThrowIfNull(argument);
IncrementArgCounts();
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
index f714e5ebd59975..735956362086dd 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SymbolType.cs
@@ -224,11 +224,8 @@ internal SymbolType(TypeKind typeKind)
#endregion
#region Internal Members
- internal void SetElementType(Type baseType)
+ internal void SetElementType(Type baseType!!)
{
- if (baseType is null)
- throw new ArgumentNullException(nameof(baseType));
-
m_baseType = baseType;
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs
index ad80acad078350..f5823d837f3844 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.cs
@@ -25,23 +25,14 @@ private sealed class CustAttr
private readonly byte[]? m_binaryAttribute;
private readonly CustomAttributeBuilder? m_customBuilder;
- public CustAttr(ConstructorInfo con, byte[] binaryAttribute)
+ public CustAttr(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con is null)
- throw new ArgumentNullException(nameof(con));
-
- if (binaryAttribute is null)
- throw new ArgumentNullException(nameof(binaryAttribute));
-
m_con = con;
m_binaryAttribute = binaryAttribute;
}
- public CustAttr(CustomAttributeBuilder customBuilder)
+ public CustAttr(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder is null)
- throw new ArgumentNullException(nameof(customBuilder));
-
m_customBuilder = customBuilder;
}
@@ -509,11 +500,8 @@ internal TypeBuilder(
{
for (i = 0; i < interfaces.Length; i++)
{
- if (interfaces[i] == null)
- {
- // cannot contain null in the interface list
- throw new ArgumentNullException(nameof(interfaces));
- }
+ // cannot contain null in the interface list
+ ArgumentNullException.ThrowIfNull(interfaces[i], nameof(interfaces));
}
interfaceTokens = new int[interfaces.Length + 1];
for (i = 0; i < interfaces.Length; i++)
@@ -1120,8 +1108,7 @@ public override object[] GetCustomAttributes(Type attributeType, bool inherit)
if (!IsCreated())
throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated);
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
+ ArgumentNullException.ThrowIfNull(attributeType);
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
@@ -1134,8 +1121,7 @@ public override bool IsDefined(Type attributeType, bool inherit)
if (!IsCreated())
throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated);
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
+ ArgumentNullException.ThrowIfNull(attributeType);
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
@@ -1161,17 +1147,13 @@ internal void SetInterfaces(params Type[]? interfaces)
}
}
- public GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names)
+ public GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names!!)
{
- if (names == null)
- throw new ArgumentNullException(nameof(names));
-
if (names.Length == 0)
throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
for (int i = 0; i < names.Length; i++)
- if (names[i] == null)
- throw new ArgumentNullException(nameof(names));
+ ArgumentNullException.ThrowIfNull(names[i], nameof(names));
if (m_inst != null)
throw new InvalidOperationException();
@@ -1214,14 +1196,8 @@ public void DefineMethodOverride(MethodInfo methodInfoBody, MethodInfo methodInf
}
}
- private void DefineMethodOverrideNoLock(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
+ private void DefineMethodOverrideNoLock(MethodInfo methodInfoBody!!, MethodInfo methodInfoDeclaration!!)
{
- if (methodInfoBody == null)
- throw new ArgumentNullException(nameof(methodInfoBody));
-
- if (methodInfoDeclaration == null)
- throw new ArgumentNullException(nameof(methodInfoDeclaration));
-
ThrowIfCreated();
if (!ReferenceEquals(methodInfoBody.DeclaringType, this))
@@ -1700,11 +1676,8 @@ public FieldBuilder DefineInitializedData(string name, byte[] data, FieldAttribu
}
}
- private FieldBuilder DefineInitializedDataNoLock(string name, byte[] data, FieldAttributes attributes)
+ private FieldBuilder DefineInitializedDataNoLock(string name, byte[] data!!, FieldAttributes attributes)
{
- if (data == null)
- throw new ArgumentNullException(nameof(data));
-
// This method will define an initialized Data in .sdata.
// We will create a fake TypeDef to represent the data with size. This TypeDef
// will be the signature for the Field.
@@ -1801,7 +1774,6 @@ private PropertyBuilder DefinePropertyNoLock(string name, PropertyAttributes att
return new PropertyBuilder(
m_module,
name,
- sigHelper,
attributes,
returnType,
prToken,
@@ -2096,13 +2068,8 @@ public void SetParent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes
}
}
- public void AddInterfaceImplementation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
+ public void AddInterfaceImplementation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType!!)
{
- if (interfaceType == null)
- {
- throw new ArgumentNullException(nameof(interfaceType));
- }
-
AssemblyBuilder.CheckContext(interfaceType);
ThrowIfCreated();
@@ -2125,23 +2092,14 @@ internal int TypeToken
}
}
- public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
+ public void SetCustomAttribute(ConstructorInfo con!!, byte[] binaryAttribute!!)
{
- if (con == null)
- throw new ArgumentNullException(nameof(con));
-
- if (binaryAttribute == null)
- throw new ArgumentNullException(nameof(binaryAttribute));
-
DefineCustomAttribute(m_module, m_tdType, ((ModuleBuilder)m_module).GetConstructorToken(con),
binaryAttribute);
}
- public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
+ public void SetCustomAttribute(CustomAttributeBuilder customBuilder!!)
{
- if (customBuilder == null)
- throw new ArgumentNullException(nameof(customBuilder));
-
customBuilder.CreateCustomAttribute((ModuleBuilder)m_module, m_tdType);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs
index 3f2cadc852e6af..4e195408633ece 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs
@@ -24,13 +24,11 @@ internal static Type MakeGenericType(Type type, Type[] typeArguments)
if (!type.IsGenericTypeDefinition)
throw new InvalidOperationException();
- if (typeArguments == null)
- throw new ArgumentNullException(nameof(typeArguments));
+ ArgumentNullException.ThrowIfNull(typeArguments);
foreach (Type t in typeArguments)
{
- if (t == null)
- throw new ArgumentNullException(nameof(typeArguments));
+ ArgumentNullException.ThrowIfNull(t, nameof(typeArguments));
}
return new TypeBuilderInstantiation(type, typeArguments);
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs
index 7d5736ee88de11..fe79a0e8e7c83f 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/MemberInfo.Internal.cs
@@ -7,11 +7,8 @@ public abstract partial class MemberInfo
{
internal virtual bool CacheEquals(object? o) { throw new NotImplementedException(); }
- internal bool HasSameMetadataDefinitionAsCore(MemberInfo other) where TOther : MemberInfo
+ internal bool HasSameMetadataDefinitionAsCore(MemberInfo other!!) where TOther : MemberInfo
{
- if (other is null)
- throw new ArgumentNullException(nameof(other));
-
// Ensure that "other" is a runtime-implemented MemberInfo. Do this check before calling any methods on it!
if (!(other is TOther))
return false;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs
index 332dd6301cde09..fa7385a02dfc66 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs
@@ -28,13 +28,8 @@ public static partial class AssemblyExtensions
/// The caller is responsible for keeping the assembly object alive while accessing the metadata blob.
///
[CLSCompliant(false)] // out byte* blob
- public static unsafe bool TryGetRawMetadata(this Assembly assembly, out byte* blob, out int length)
+ public static unsafe bool TryGetRawMetadata(this Assembly assembly!!, out byte* blob, out int length)
{
- if (assembly == null)
- {
- throw new ArgumentNullException(nameof(assembly));
- }
-
blob = null;
length = 0;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
index 87366de57eb010..462df732af729c 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
@@ -36,7 +36,7 @@ public static void ApplyUpdate(Assembly assembly, ReadOnlySpan metadataDel
{
if (assembly is not RuntimeAssembly runtimeAssembly)
{
- if (assembly is null) throw new ArgumentNullException(nameof(assembly));
+ ArgumentNullException.ThrowIfNull(assembly);
throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs
index 7eed453959c668..1b66fb3c8244c1 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs
@@ -88,12 +88,22 @@ public override string? CodeBase
{
get
{
- var codeBase = GetCodeBase();
+ if (IsDynamic)
+ {
+ throw new NotSupportedException(SR.NotSupported_DynamicAssembly);
+ }
+
+ string? codeBase = GetCodeBase();
if (codeBase is null)
{
- // Not supported if the assembly was loaded from memory
+ // Not supported if the assembly was loaded from single-file bundle.
throw new NotSupportedException(SR.NotSupported_CodeBase);
}
+ if (codeBase.Length == 0)
+ {
+ // For backward compatibility, return CoreLib codebase for assemblies loaded from memory.
+ codeBase = typeof(object).Assembly.CodeBase;
+ }
return codeBase;
}
}
@@ -174,12 +184,10 @@ private static partial void GetType(QCallAssembly assembly,
ObjectHandleOnStack assemblyLoadContext);
[RequiresUnreferencedCode("Types might be removed")]
- public override Type? GetType(string name, bool throwOnError, bool ignoreCase)
+ public override Type? GetType(
+ string name!!, // throw on null strings regardless of the value of "throwOnError"
+ bool throwOnError, bool ignoreCase)
{
- // throw on null strings regardless of the value of "throwOnError"
- if (name == null)
- throw new ArgumentNullException(nameof(name));
-
RuntimeType? type = null;
object? keepAlive = null;
AssemblyLoadContext? assemblyLoadContextStack = AssemblyLoadContext.CurrentContextualReflectionContext;
@@ -252,8 +260,8 @@ public override bool IsCollectible
// Load a resource based on the NameSpace of the type.
public override Stream? GetManifestResourceStream(Type type, string name)
{
- if (type == null && name == null)
- throw new ArgumentNullException(nameof(type));
+ if (name == null)
+ ArgumentNullException.ThrowIfNull(type);
string? nameSpace = type?.Namespace;
@@ -294,22 +302,16 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
return CustomAttribute.GetCustomAttributes(this, attributeRuntimeType);
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
@@ -566,11 +568,8 @@ public override Assembly GetSatelliteAssembly(CultureInfo culture)
}
// Useful for binding to a very specific version of a satellite assembly
- public override Assembly GetSatelliteAssembly(CultureInfo culture, Version? version)
+ public override Assembly GetSatelliteAssembly(CultureInfo culture!!, Version? version)
{
- if (culture == null)
- throw new ArgumentNullException(nameof(culture));
-
return InternalGetSatelliteAssembly(culture, version, throwOnFileNotFound: true)!;
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs
index 7f34d5438c6bea..267b738794a63a 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs
@@ -115,22 +115,16 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
return CustomAttribute.GetCustomAttributes(this, attributeRuntimeType);
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs
index edf7aeb269c26b..9eecc089e72c40 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs
@@ -679,11 +679,8 @@ private static extern void ParseAttributeArguments(
internal static void ParseAttributeArguments(ConstArray attributeBlob,
ref CustomAttributeCtorParameter[] customAttributeCtorParameters,
ref CustomAttributeNamedParameter[] customAttributeNamedParameters,
- RuntimeModule customAttributeModule)
+ RuntimeModule customAttributeModule!!)
{
- if (customAttributeModule is null)
- throw new ArgumentNullException(nameof(customAttributeModule));
-
Debug.Assert(customAttributeCtorParameters is not null);
Debug.Assert(customAttributeNamedParameters is not null);
@@ -713,11 +710,8 @@ internal readonly struct CustomAttributeNamedParameter
private readonly CustomAttributeType m_type;
private readonly CustomAttributeEncodedArgument m_encodedArgument;
- public CustomAttributeNamedParameter(string argumentName, CustomAttributeEncoding fieldOrProperty, CustomAttributeType type)
+ public CustomAttributeNamedParameter(string argumentName!!, CustomAttributeEncoding fieldOrProperty, CustomAttributeType type)
{
- if (argumentName is null)
- throw new ArgumentNullException(nameof(argumentName));
-
m_argumentName = argumentName;
m_fieldOrProperty = fieldOrProperty;
m_padding = fieldOrProperty;
@@ -1873,12 +1867,6 @@ internal static bool IsDefined(RuntimeFieldInfo field, RuntimeType? caType)
}
type.GetRuntimeModule().MetadataImport.GetClassLayout(type.MetadataToken, out int pack, out int size);
- // Metadata parameter checking should not have allowed 0 for packing size.
- // The runtime later converts a packing size of 0 to 8 so do the same here
- // because it's more useful from a user perspective.
- if (pack == 0)
- pack = 8; // DEFAULT_PACKING_SIZE
-
StructLayoutAttribute attribute = new StructLayoutAttribute(layoutKind);
attribute.Pack = pack;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs
index 6abf767636e0dd..b0d5805804208c 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs
@@ -76,22 +76,16 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
return CustomAttribute.GetCustomAttributes(this, attributeRuntimeType);
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
index 10605ef5f533c1..d2ddb1f36091c1 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
@@ -61,22 +61,16 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
return CustomAttribute.GetCustomAttributes(this, attributeRuntimeType);
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs
index 43984c60a5468d..2b26b90cb7770f 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs
@@ -205,22 +205,16 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!, inherit);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
return CustomAttribute.GetCustomAttributes(this, attributeRuntimeType, inherit);
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
@@ -417,12 +411,9 @@ public override Delegate CreateDelegate(Type delegateType, object? target)
DelegateBindingFlags.RelaxedSignature);
}
- private Delegate CreateDelegateInternal(Type delegateType, object? firstArgument, DelegateBindingFlags bindingFlags)
+ private Delegate CreateDelegateInternal(Type delegateType!!, object? firstArgument, DelegateBindingFlags bindingFlags)
{
// Validate the parameters.
- if (delegateType == null)
- throw new ArgumentNullException(nameof(delegateType));
-
RuntimeType? rtType = delegateType as RuntimeType;
if (rtType == null)
throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(delegateType));
@@ -443,11 +434,8 @@ private Delegate CreateDelegateInternal(Type delegateType, object? firstArgument
#region Generics
[RequiresUnreferencedCode("If some of the generic arguments are annotated (either with DynamicallyAccessedMembersAttribute, or generic constraints), trimming can't validate that the requirements of those annotations are met.")]
- public override MethodInfo MakeGenericMethod(params Type[] methodInstantiation)
+ public override MethodInfo MakeGenericMethod(params Type[] methodInstantiation!!)
{
- if (methodInstantiation == null)
- throw new ArgumentNullException(nameof(methodInstantiation));
-
RuntimeType[] methodInstantionRuntimeType = new RuntimeType[methodInstantiation.Length];
if (!IsGenericMethodDefinition)
@@ -457,9 +445,7 @@ public override MethodInfo MakeGenericMethod(params Type[] methodInstantiation)
for (int i = 0; i < methodInstantiation.Length; i++)
{
Type methodInstantiationElem = methodInstantiation[i];
-
- if (methodInstantiationElem == null)
- throw new ArgumentNullException();
+ ArgumentNullException.ThrowIfNull(methodInstantiationElem, null);
RuntimeType? rtMethodInstantiationElem = methodInstantiationElem as RuntimeType;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
index e8b52d01d5e0da..4b5760f14c713e 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs
@@ -385,22 +385,16 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
return CustomAttribute.GetCustomAttributes(this, attributeRuntimeType);
}
- public override bool IsDefined(Type attributeType, bool inherit)
+ public override bool IsDefined(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
@@ -420,12 +414,10 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
}
[RequiresUnreferencedCode("Types might be removed")]
- public override Type? GetType(string className, bool throwOnError, bool ignoreCase)
+ public override Type? GetType(
+ string className!!, // throw on null strings regardless of the value of "throwOnError"
+ bool throwOnError, bool ignoreCase)
{
- // throw on null strings regardless of the value of "throwOnError"
- if (className == null)
- throw new ArgumentNullException(nameof(className));
-
RuntimeType? retType = null;
object? keepAlive = null;
RuntimeModule thisAsLocal = this;
@@ -483,15 +475,9 @@ public override FieldInfo[] GetFields(BindingFlags bindingFlags)
}
[RequiresUnreferencedCode("Fields might be removed")]
- public override FieldInfo? GetField(string name, BindingFlags bindingAttr)
+ public override FieldInfo? GetField(string name!!, BindingFlags bindingAttr)
{
- if (name == null)
- throw new ArgumentNullException(nameof(name));
-
- if (RuntimeType == null)
- return null;
-
- return RuntimeType.GetField(name, bindingAttr);
+ return RuntimeType?.GetField(name, bindingAttr);
}
[RequiresUnreferencedCode("Methods might be removed")]
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
index 173caf6855a0aa..33777c745dbfcb 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs
@@ -507,11 +507,8 @@ public override object[] GetCustomAttributes(bool inherit)
return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!);
}
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ public override object[] GetCustomAttributes(Type attributeType!!, bool inherit)
{
- if (attributeType == null)
- throw new ArgumentNullException(nameof(attributeType));
-
if (MdToken.IsNullToken(m_tkParamDef))
return Array.Empty