|
| area-Setup | @MichaelSimons | @NikolaMilosavljevic | Distro-specific (Linux, Mac and Windows) setup packages and msi files |
| area-Single-File | @agocke | @elinor-fung @vsadov | |
| area-Snap | @MichaelSimons | @NikolaMilosavljevic @leecow @MichaelSimons | |
| area-System.Buffers | @jeffhandley | @dotnet/area-system-buffers | |
-| area-System.ClientModel | @terrajobst | @dotnet/fxdc | Bugs and feature requests should go to https://github.com/Azure/azure-sdk-for-net/issues. We don't own the code, but FXDC reviews changes to determine overlap with other `System` concepts. The Azure SDK team will post API updates in this repo for us to review. |
-| area-System.CodeDom | @ericstj | @dotnet/area-system-codedom | |
+| area-System.ClientModel | @jeffhandley | @dotnet/fxdc | Bugs and feature requests should go to https://github.com/Azure/azure-sdk-for-net/issues. We don't own the code, but FXDC reviews changes to determine overlap with other `System` concepts. The Azure SDK team will post API updates in this repo for us to review. |
+| area-System.CodeDom | @jeffhandley | @dotnet/area-system-codedom | |
| area-System.Collections | @jeffhandley | @dotnet/area-system-collections | Excluded:
|
+| area-System.ServiceModel.Syndication | @StephenMolloy | @StephenMolloy @dotnet/Tellurium | |
+| area-System.ServiceProcess | @jeffhandley | @dotnet/area-system-serviceprocess | |
+| area-System.Speech | @jeffhandley | @dotnet/area-system-speech | |
+| area-System.Text.Encoding | @jeffhandley | @dotnet/area-system-text-encoding | |
+| area-System.Text.Encodings.Web | @jeffhandley | @dotnet/area-system-text-encodings-web | |
| area-System.Text.Json | @jeffhandley | @dotnet/area-system-text-json | |
-| area-System.Text.RegularExpressions | @ericstj | @dotnet/area-system-text-regularexpressions | Consultants: @stephentoub |
+| area-System.Text.RegularExpressions | @jeffhandley | @dotnet/area-system-text-regularexpressions | Consultants: @stephentoub |
| area-System.Threading | @mangod9 | @kouvel @vsadov | |
| area-System.Threading.Channels | @jeffhandley | @dotnet/area-system-threading-channels | Consultants: @stephentoub |
| area-System.Threading.RateLimiting | @rafikiassumani-msft | @BrennanConroy @halter73 | |
@@ -141,7 +141,7 @@ Note: Editing this file doesn't update the mapping used by `@dotnet-policy-servi
| area-System.Xml | @jeffhandley | @dotnet/area-system-xml | |
| area-TieredCompilation-coreclr | @mangod9 | @kouvel | |
| area-Tools-ILLink | @agocke | @dotnet/illink | |
-| area-Tools-ILVerification | @JulieLeeMSFT | @BruceForstall @dotnet/jit-contrib | |
+| area-Tools-ILVerification | @JulieLeeMSFT | @dotnet/jit-contrib | |
| area-Tracing-coreclr | @steveisok | @dotnet/area-tracing-coreclr | .NET runtime issues for EventPipe and ICorProfiler |
| area-Tracing-mono | @steveisok | @dotnet/dotnet-diag @thaystg | |
| area-TypeSystem-coreclr | @mangod9 | @davidwrighton @MichalStrehovsky @janvorli @mangod9 | |
diff --git a/docs/coding-guidelines/framework-design-guidelines-digest.md b/docs/coding-guidelines/framework-design-guidelines-digest.md
index d48ecc60727dc2..bb512540d38e20 100644
--- a/docs/coding-guidelines/framework-design-guidelines-digest.md
+++ b/docs/coding-guidelines/framework-design-guidelines-digest.md
@@ -107,7 +107,7 @@ characters.
✓ **DO** name types and properties with nouns or noun phrases.
✓ **DO** name methods and events with verbs or verb phrases. Always give
-events names that have a concept of before and after using the present particle
+events names that have a concept of before and after using the present participle
and simple past tense. For example, an event that is raised before a `Form`
closes should be named `Closing`. An event raised after a `Form` is closed
should be named `Closed`.
diff --git a/docs/coding-guidelines/interop-guidelines.md b/docs/coding-guidelines/interop-guidelines.md
index 8338f4c1d04e23..8f3c9e931b508d 100644
--- a/docs/coding-guidelines/interop-guidelines.md
+++ b/docs/coding-guidelines/interop-guidelines.md
@@ -15,12 +15,6 @@ We have the following goals related to interop code being used in dotnet/runtime
- Ensure maximal managed code reuse across different OS flavors which have the same API but not the same ABI.
- This is the case for UNIX and addressing it is a work-in-progress (see issue #2137 and section on "shims" below.)
-## Submitting Changes
-
-Interop code implicitly defines the native platform dependencies that .NET has. These dependencies are tracked and modeled according to the [Tracking Platform Dependencies design](https://github.com/dotnet/designs/blob/main/accepted/2021/platform-dependencies/platform-dependencies.md). Whenever a PR is submitted that changes interop code, it needs to be reviewed to determine whether a change to the platform dependencies model is required.
-
-By default, any change to `src/libraries/Common/src/Interop` folder will add @dotnet/platform-deps-team as a reviewer. If necessary, update the corresponding `https://github.com/dotnet/core/blob/main/release-notes//runtime-deps.json` file to reflect the dependency change. The scope of dependencies is at the file/package level, not individual functions, so interop changes rarely require an update to the model.
-
## Approach
### Interop type
diff --git a/docs/coding-guidelines/project-guidelines.md b/docs/coding-guidelines/project-guidelines.md
index c6c49bf3e131f5..b6e350f9d9eaf7 100644
--- a/docs/coding-guidelines/project-guidelines.md
+++ b/docs/coding-guidelines/project-guidelines.md
@@ -151,7 +151,7 @@ src\\tests - Contains the test code for a library.
## ref
Reference assemblies are required for any library that has more than one implementation or uses a facade. A reference assembly is a surface-area-only assembly that represents the public API of the library. To generate a reference assembly source file you can use the [GenAPI tool](https://www.nuget.org/packages/Microsoft.DotNet.BuildTools.GenAPI). If a library is a pure portable library with a single implementation it need not use a reference assembly at all. Instructions on updating reference sources can be found [here](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/updating-ref-source.md).
-In the ref directory for the library there should be at most **one** `.csproj` that contains the latest API for the reference assembly for the library. That project can contain multiple entries in its `TargetFrameworks` property. Ref projects should use `` for its dependencies.
+In the ref directory for the library there should be at most **one** `.csproj` that contains the latest API for the reference assembly for the library. That project can contain multiple entries in its `TargetFrameworks` property.
### ref output
All ref outputs should be under
@@ -159,11 +159,11 @@ All ref outputs should be under
`bin\$(MSBuildProjectName)\ref\$(TargetFramework)`
## src
-In the src directory for a library there should be only **one** `.csproj` file that contains any information necessary to build the library in various target frameworks. All supported target frameworks should be listed in the `TargetFrameworks` property.
+In the src directory for a library there should be only **one** `.csproj` file that contains any information necessary to build the library for various target frameworks. All supported target frameworks should be listed in the `TargetFramework` or `TargetFrameworks` property.
-All libraries should use `` for all their references to libraries that compose the shared framework of the current .NETCoreApp. That will cause them to be resolved against the locally built targeting pack which is located at `artifacts\bin\microsoft.netcore.app.ref`. The only exception to that rule right now is for partial facades which directly reference System.Private.CoreLib and thus need to directly reference other partial facades to avoid type conflicts.
+Libraries should use `ProjectReference` items to reference live dependencies.
-Other target frameworks than .NETCoreApp latest (i.e. `netstandard2.0`, `net462`, `net8.0`) should use ProjectReference items to reference dependencies.
+`Reference` items should only be used when targeting .NET Framework to reference prebuilt assemblies from the targeting pack and which aren't included by default (i.e. `System.DirectoryServices`). For anything else, `Reference` items should not be used as they are not supported in those frameworks.
### src\ILLink
Contains the files used to direct the trimming tool. See [ILLink files](../workflow/trimming/ILLink-files.md).
diff --git a/docs/coding-guidelines/vectorization-guidelines.md b/docs/coding-guidelines/vectorization-guidelines.md
index ab85676263afd6..9ac773872947a9 100644
--- a/docs/coding-guidelines/vectorization-guidelines.md
+++ b/docs/coding-guidelines/vectorization-guidelines.md
@@ -523,7 +523,7 @@ int ManagedReferencesSum(int[] buffer)
Vector128 sum = Vector128.Zero;
- while (!Unsafe.IsAddressGreaterThan(ref current, ref oneVectorAwayFromEnd))
+ while (Unsafe.IsAddressLessThanOrEqualTo(ref current, ref oneVectorAwayFromEnd))
{
sum += Vector128.LoadUnsafe(ref current);
@@ -561,7 +561,7 @@ do
return ...;
}
-while (!Unsafe.IsAddressLessThan(ref currentSearchSpace, ref searchSpace));
+while (Unsafe.IsAddressGreaterThanOrEqualTo(ref currentSearchSpace, ref searchSpace));
```
It was part of `LastIndexOf` implementation, where we were iterating from the end to the beginning of the buffer. In the last iteration of the loop, `currentSearchSpace` could become a pointer to unknown memory that lied before the beginning of the buffer:
@@ -573,7 +573,7 @@ currentSearchSpace = ref Unsafe.Subtract(ref currentSearchSpace, Vector128 GetILCodeVersions(TargetPointer methodDesc);
+// Return all of the Native code versions for a given ILCodeVersion
+public virtual IEnumerable GetNativeCodeVersions(TargetPointer methodDesc, ILCodeVersionHandle ilCodeVersionHandle);
// Return a handle to the version of the native code that includes the given instruction pointer
public virtual NativeCodeVersionHandle GetNativeCodeVersionForIP(TargetCodePointer ip);
// Return a handle to the active version of the native code for a given method descriptor and IL code version. The IL code version and method descriptor must represent the same method
@@ -132,7 +134,7 @@ IEnumerable ICodeVersions.GetILCodeVersions(TargetPointer m
// CodeVersionManager::GetILCodeVersions
GetModuleAndMethodDesc(methodDesc, out TargetPointer module, out uint methodDefToken);
- ModuleHandle moduleHandle = _target.Contracts.Loader.GetModuleHandle(module);
+ ModuleHandle moduleHandle = _target.Contracts.Loader.GetModuleHandleFromModulePtr(module);
TargetPointer ilCodeVersionTable = _target.Contracts.Loader.GetLookupTables(moduleHandle).MethodDefToILCodeVersioningState;
TargetPointer ilVersionStateAddress = _target.Contracts.Loader.GetModuleLookupMapElement(ilCodeVersionTable, methodDefToken, out var _);
@@ -193,18 +195,18 @@ NativeCodeVersionHandle GetSpecificNativeCodeVersion(MethodDescHandle md, Target
return first;
}
- return FindFirstCodeVersion(rts, md, (codeVersion) =>
+ return FindNativeCodeVersionNodes(rts, md, (codeVersion) =>
{
return codeVersion.MethodDesc == md.Address && codeVersion.NativeCode == startAddress;
- });
+ }).FirstOrDefault(NativeCodeVersionHandle.Invalid);
}
-NativeCodeVersionHandle FindFirstCodeVersion(IRuntimeTypeSystem rts, MethodDescHandle md, Func predicate)
+IEnumerable FindNativeCodeVersionNodes(IRuntimeTypeSystem rts, MethodDescHandle md, Func predicate)
{
// ImplicitCodeVersion stage of NativeCodeVersionIterator::Next()
TargetPointer versioningStateAddr = rts.GetMethodDescVersioningState(md);
if (versioningStateAddr == TargetPointer.Null)
- return NativeCodeVersionHandle.Invalid;
+ yield break;
Data.MethodDescVersioningState versioningState = _target.ProcessedData.GetOrAdd(versioningStateAddr);
@@ -215,14 +217,45 @@ NativeCodeVersionHandle FindFirstCodeVersion(IRuntimeTypeSystem rts, MethodDescH
Data.NativeCodeVersionNode current = _target.ProcessedData.GetOrAdd(currentAddress);
if (predicate(current))
{
- return NativeCodeVersionHandle.OfExplicit(currentAddress);
+ yield return NativeCodeVersionHandle.OfExplicit(currentAddress);
}
currentAddress = current.Next;
}
- return NativeCodeVersionHandle.Invalid;
+ yield break;
+}
+```
+
+### Finding all of the native code versions of an ILCodeVersion for a method descriptor
+
+```csharp
+IEnumerable ICodeVersions.GetNativeCodeVersions(TargetPointer methodDesc, ILCodeVersionHandle ilCodeVersionHandle)
+{
+ if (!ilCodeVersionHandle.IsValid)
+ yield break;
+
+ if (!ilCodeVersionHandle.IsExplicit)
+ {
+ // if the ILCodeVersion is synthetic, then yield the synthetic NativeCodeVersion
+ NativeCodeVersionHandle provisionalHandle = NativeCodeVersionHandle.CreateSynthetic(methodDesc);
+ yield return provisionalHandle;
+ }
+
+ // Iterate through versioning state nodes and return the active one, matching any IL code version
+ Contracts.IRuntimeTypeSystem rts = _target.Contracts.RuntimeTypeSystem;
+ MethodDescHandle md = rts.GetMethodDescHandle(methodDesc);
+ TargetNUInt ilVersionId = GetId(ilCodeVersionHandle);
+ IEnumerable nativeCodeVersions = FindNativeCodeVersionNodes(
+ rts,
+ md,
+ (codeVersion) => ilVersionId == codeVersion.ILVersionId);
+ foreach (NativeCodeVersionHandle nativeCodeVersion in nativeCodeVersions)
+ {
+ yield return nativeCodeVersion;
+ }
}
```
+
### Finding the active native code version of an ILCodeVersion for a method descriptor
```csharp
public virtual NativeCodeVersionHandle GetActiveNativeCodeVersionForILCodeVersion(TargetPointer methodDesc, ILCodeVersionHandle ilCodeVersionHandle);
@@ -247,7 +280,7 @@ bool ICodeVersions.CodeVersionManagerSupportsMethod(TargetPointer methodDescAddr
TypeHandle mt = rts.GetTypeHandle(mtAddr);
TargetPointer modAddr = rts.GetModule(mt);
ILoader loader = _target.Contracts.Loader;
- ModuleHandle mod = loader.GetModuleHandle(modAddr);
+ ModuleHandle mod = loader.GetModuleHandleFromModulePtr(modAddr);
ModuleFlags modFlags = loader.GetFlags(mod);
if (modFlags.HasFlag(ModuleFlags.EditAndContinue))
return false;
diff --git a/docs/design/datacontracts/DacStreams.md b/docs/design/datacontracts/DacStreams.md
index 4ddc1eb84ad3ab..a2da0c4ab1eaf3 100644
--- a/docs/design/datacontracts/DacStreams.md
+++ b/docs/design/datacontracts/DacStreams.md
@@ -54,8 +54,8 @@ Following the EENameStream header, there are CountOfNames entries. Each entry be
``` csharp
string StringFromEEAddress(TargetPointer address)
{
- TargetPointer miniMetaDataBuffAddress = _target.Read(_target.ReadGlobalPointer(Constants.Globals.MiniMetaDataBuffAddress));
- uint miniMetaDataBuffMaxSize = _target.Read(_target.ReadGlobalPointer(Constants.Globals.MiniMetaDataBuffMaxSize));
+ TargetPointer miniMetaDataBuffAddress = _target.Read(_target.ReadGlobalPointer("MiniMetaDataBuffAddress"));
+ uint miniMetaDataBuffMaxSize = _target.Read(_target.ReadGlobalPointer("MiniMetaDataBuffMaxSize"));
// Parse MiniMetadataStream according the the format described above to produce a dictionary from pointer to string from the EENameStream.
// Then lookup in the dictionary, to produce a result if it was present in the table.
diff --git a/docs/design/datacontracts/DebugInfo.md b/docs/design/datacontracts/DebugInfo.md
new file mode 100644
index 00000000000000..034eb3609900ed
--- /dev/null
+++ b/docs/design/datacontracts/DebugInfo.md
@@ -0,0 +1,219 @@
+# Contract DebugInfo
+
+This contract is for fetching information related to DebugInfo associated with native code.
+
+## APIs of contract
+
+```csharp
+[Flags]
+public enum SourceTypes : uint
+{
+ SourceTypeInvalid = 0x00, // To indicate that nothing else applies
+ StackEmpty = 0x01, // The stack is empty here
+ CallInstruction = 0x02 // The actual instruction of a call.
+}
+```
+
+```csharp
+public readonly struct OffsetMapping
+{
+ public uint NativeOffset { get; init; }
+ public uint ILOffset { get; init; }
+ public SourceTypes SourceType { get; init; }
+}
+```
+
+```csharp
+// Given a code pointer, return the associated native/IL offset mapping and codeOffset.
+// If preferUninstrumented, will always read the uninstrumented bounds.
+// Otherwise will read the instrumented bounds and fallback to the uninstrumented bounds.
+IEnumerable GetMethodNativeMap(TargetCodePointer pCode, bool preferUninstrumented, out uint codeOffset);
+```
+
+## Version 1
+
+Data descriptors used:
+| Data Descriptor Name | Field | Meaning |
+| --- | --- | --- |
+| `PatchpointInfo` | `LocalCount` | Number of locals in the method associated with the patchpoint. |
+
+Contracts used:
+| Contract Name |
+| --- |
+| `CodeVersions` |
+| `ExecutionManager` |
+
+Constants:
+| Constant Name | Meaning | Value |
+| --- | --- | --- |
+| IL_OFFSET_BIAS | IL offsets are encoded in the DebugInfo with this bias. | `0xfffffffd` (-3) |
+| DEBUG_INFO_BOUNDS_HAS_INSTRUMENTED_BOUNDS | Indicates bounds data contains instrumented bounds | `0xFFFFFFFF` |
+| EXTRA_DEBUG_INFO_PATCHPOINT | Indicates debug info contains patchpoint information | 0x1 |
+| EXTRA_DEBUG_INFO_RICH | Indicates debug info contains rich information | 0x2 |
+
+### DebugInfo Stream Encoding
+
+The DebugInfo stream is encoded using variable length 32-bit values with the following scheme:
+
+A value can be stored using one or more nibbles (a nibble is a 4-bit value). 3 bits of a nibble are used to store 3 bits of the value, and the top bit indicates if the following nibble contains rest of the value. If the top bit is not set, then this nibble is the last part of the value. The higher bits of the value are written out first, and the lowest 3 bits are written out last.
+
+In the encoded stream of bytes, the lower nibble of a byte is used before the high nibble.
+
+A binary value ABCDEFGHI (where A is the highest bit) is encoded as
+the follow two bytes : 1DEF1ABC XXXX0GHI
+
+Examples:
+| Decimal Value | Hex Value | Encoded Result |
+| --- | --- | --- |
+| 0 | 0x0 | X0 |
+| 1 | 0x1 | X1 |
+| 7 | 0x7 | X7 |
+| 8 | 0x8 | 09 |
+| 9 | 0x9 | 19 |
+| 63 | 0x3F | 7F |
+| 64 | 0x40 | F9 X0 |
+| 65 | 0x41 | F9 X1 |
+| 511 | 0x1FF | FF X7 |
+| 512 | 0x200 | 89 08 |
+| 513 | 0x201 | 89 18 |
+
+Based on the encoding specification, we use a decoder defined originally for r2r dump `NibbleReader.cs`
+
+### Bounds Data Encoding (R2R Major Version 16+)
+
+For R2R major version 16 and above, the bounds data uses a bit-packed encoding algorithm:
+
+1. The bounds entry count, bits needed for native deltas, and bits needed for IL offsets are encoded using the nibble scheme above
+2. Each bounds entry is then bit-packed with:
+ - 2 bits for source type (SourceTypeInvalid=0, CallInstruction=1, StackEmpty=2, StackEmpty|CallInstruction=3)
+ - Variable bits for native offset delta (accumulated from previous offset)
+ - Variable bits for IL offset (with IL_OFFSET_BIAS applied)
+
+The bit-packed data is read byte by byte, collecting bits until enough are available for each entry.
+
+### Implementation
+
+``` csharp
+IEnumerable IDebugInfo.GetMethodNativeMap(TargetCodePointer pCode, bool preferUninstrumented, out uint codeOffset)
+{
+ // Get the method's DebugInfo
+ if (_eman.GetCodeBlockHandle(pCode) is not CodeBlockHandle cbh)
+ throw new InvalidOperationException($"No CodeBlockHandle found for native code {pCode}.");
+ TargetPointer debugInfo = _eman.GetDebugInfo(cbh, out bool hasFlagByte);
+
+ TargetCodePointer nativeCodeStart = _eman.GetStartAddress(cbh);
+ codeOffset = (uint)(CodePointerUtils.AddressFromCodePointer(pCode, _target) - CodePointerUtils.AddressFromCodePointer(nativeCodeStart, _target));
+
+ return RestoreBoundaries(debugInfo, hasFlagByte, preferUninstrumented);
+}
+
+private IEnumerable RestoreBoundaries(TargetPointer debugInfo, bool hasFlagByte, bool preferUninstrumented)
+{
+ if (hasFlagByte)
+ {
+ // Check flag byte and skip over any patchpoint info
+ byte flagByte = _target.Read(debugInfo++);
+
+ if ((flagByte & EXTRA_DEBUG_INFO_PATCHPOINT) != 0)
+ {
+ uint localCount = _target.Read(debugInfo + /*PatchpointInfo::LocalCount offset*/)
+ debugInfo += /*size of PatchpointInfo*/ + (localCount * 4);
+ }
+
+ if ((flagByte & EXTRA_DEBUG_INFO_RICH) != 0)
+ {
+ uint richDebugInfoSize = _target.Read(debugInfo);
+ debugInfo += 4;
+ debugInfo += richDebugInfoSize;
+ }
+ }
+
+ NativeReader nibbleNativeReader = new(new TargetStream(_target, debugInfo, 24 /*maximum size of 4 32bit ints compressed*/), _target.IsLittleEndian);
+ NibbleReader nibbleReader = new(nibbleNativeReader, 0);
+
+ uint cbBounds = nibbleReader.ReadUInt();
+ uint cbUninstrumentedBounds = 0;
+ if (cbBounds == DEBUG_INFO_BOUNDS_HAS_INSTRUMENTED_BOUNDS)
+ {
+ // This means we have instrumented bounds.
+ cbBounds = nibbleReader.ReadUInt();
+ cbUninstrumentedBounds = nibbleReader.ReadUInt();
+ }
+ uint _ /*cbVars*/ = nibbleReader.ReadUInt();
+
+ TargetPointer addrBounds = debugInfo + (uint)nibbleReader.GetNextByteOffset();
+ // TargetPointer addrVars = addrBounds + cbBounds + cbUninstrumentedBounds;
+
+ if (preferUninstrumented && cbUninstrumentedBounds != 0)
+ {
+ // If we have uninstrumented bounds, we will use them instead of the regular bounds.
+ addrBounds += cbBounds;
+ cbBounds = cbUninstrumentedBounds;
+ }
+
+ if (cbBounds > 0)
+ {
+ NativeReader boundsNativeReader = new(new TargetStream(_target, addrBounds, cbBounds), _target.IsLittleEndian);
+ return DoBounds(boundsNativeReader);
+ }
+
+ return Enumerable.Empty();
+}
+
+private static IEnumerable DoBounds(NativeReader nativeReader)
+{
+ NibbleReader reader = new(nativeReader, 0);
+
+ uint boundsEntryCount = reader.ReadUInt();
+
+ uint bitsForNativeDelta = reader.ReadUInt() + 1; // Number of bits needed for native deltas
+ uint bitsForILOffsets = reader.ReadUInt() + 1; // Number of bits needed for IL offsets
+
+ uint bitsPerEntry = bitsForNativeDelta + bitsForILOffsets + 2; // 2 bits for source type
+ ulong bitsMeaningfulMask = (1UL << ((int)bitsPerEntry)) - 1;
+ int offsetOfActualBoundsData = reader.GetNextByteOffset();
+
+ uint bitsCollected = 0;
+ ulong bitTemp = 0;
+ uint curBoundsProcessed = 0;
+
+ uint previousNativeOffset = 0;
+
+ while (curBoundsProcessed < boundsEntryCount)
+ {
+ bitTemp |= ((uint)nativeReader[offsetOfActualBoundsData++]) << (int)bitsCollected;
+ bitsCollected += 8;
+ while (bitsCollected >= bitsPerEntry)
+ {
+ ulong mappingDataEncoded = bitsMeaningfulMask & bitTemp;
+ bitTemp >>= (int)bitsPerEntry;
+ bitsCollected -= bitsPerEntry;
+
+ SourceTypes sourceType = (mappingDataEncoded & 0x3) switch
+ {
+ 0 => SourceTypes.SourceTypeInvalid,
+ 1 => SourceTypes.CallInstruction,
+ 2 => SourceTypes.StackEmpty,
+ 3 => SourceTypes.StackEmpty | SourceTypes.CallInstruction,
+ _ => throw new InvalidOperationException($"Unknown source type encoding: {mappingDataEncoded & 0x3}")
+ };
+
+ mappingDataEncoded >>= 2;
+ uint nativeOffsetDelta = (uint)(mappingDataEncoded & ((1UL << (int)bitsForNativeDelta) - 1));
+ previousNativeOffset += nativeOffsetDelta;
+ uint nativeOffset = previousNativeOffset;
+
+ mappingDataEncoded >>= (int)bitsForNativeDelta;
+ uint ilOffset = (uint)mappingDataEncoded + IL_OFFSET_BIAS;
+
+ yield return new OffsetMapping()
+ {
+ NativeOffset = nativeOffset,
+ ILOffset = ilOffset,
+ SourceType = sourceType
+ };
+ curBoundsProcessed++;
+ }
+ }
+}
+```
diff --git a/docs/design/datacontracts/ECall.md b/docs/design/datacontracts/ECall.md
deleted file mode 100644
index f1ea6c4f8cc07d..00000000000000
--- a/docs/design/datacontracts/ECall.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Contract ECall
-
-This contract is for fetching information related to native calls into the runtime.
-
-## APIs of contract
-
-``` csharp
-// Given an FCall entrypoint returns the corresponding MethodDesc.
-// If the address does not correspond to an FCall, returns TargetPointer.Null.
-TargetPointer MapTargetBackToMethodDesc(TargetCodePointer address);
-```
-
-## Version 1
-
-Global variables used
-| Global Name | Type | Purpose |
-| --- | --- | --- |
-| FCallMethods | ECHash[] | Hash table containing ECHash structures |
-| FCallHashSize | uint | Number of buckets in the hash table |
-
-
-Data descriptors used:
-| Data Descriptor Name | Field | Meaning |
-| --- | --- | --- |
-| `ECHash` | `Next` | Pointer to the next ECHash in the chain |
-| `ECHash` | `Implementation` | FCall's Entrypoint address |
-| `ECHash` | `MethodDesc` | Pointer to the FCall's method desc |
-
-
-``` csharp
-TargetPointer IECall.MapTargetBackToMethodDesc(TargetCodePointer codePointer)
-```
-
-To map an FCall entrypoint back to a MethodDesc, we read the global `FCallMethods` hash table. This is a array of pointers to `ECHash` objects. The length of this array is defined by the global `FCallHashSize` where each element is an `ECHash` which can form a chain. It uses a simple hash function: ` = codePointer % FCallHashSize` to map code entry points to buckets. To map a `codePointer` back to a MethodDesc pointer:
-
-1. Calculate the `` corresponding to the given `codePointer`.
-2. Take the `` offset into the `FCallMethods` array.
-3. Now that we have the correct `ECHash` chain, iterate the chain using the `ECHash.Next` pointer until we find an `ECHash` where the `Implementation` field matches the `codePointer`. If found, return the `MethodDesc` field.
-4. If no `ECHash` matches return `TargetPointer.Null` to indicate a MethodDesc was not found.
diff --git a/docs/design/datacontracts/ExecutionManager.md b/docs/design/datacontracts/ExecutionManager.md
index 1b5e360f6ec308..103aac455a2a48 100644
--- a/docs/design/datacontracts/ExecutionManager.md
+++ b/docs/design/datacontracts/ExecutionManager.md
@@ -29,6 +29,9 @@ struct CodeBlockHandle
TargetPointer GetUnwindInfo(CodeBlockHandle codeInfoHandle);
// Gets the base address the UnwindInfo of codeInfoHandle is relative to
TargetPointer GetUnwindInfoBaseAddress(CodeBlockHandle codeInfoHandle);
+ // Gets the DebugInfo associated with the code block and specifies if the DebugInfo contains
+ // the flag byte which modifies how DebugInfo is parsed.
+ TargetPointer GetDebugInfo(CodeBlockHandle codeInfoHandle, out bool hasFlagByte);
// Gets the GCInfo associated with the code block and its version
// **Currently GetGCInfo only supports X86**
void GetGCInfo(CodeBlockHandle codeInfoHandle, out TargetPointer gcInfo, out uint gcVersion);
@@ -66,9 +69,11 @@ Data descriptors used:
| `CodeHeapListNode` | `EndAddress` | End address of the used portion of the code heap |
| `CodeHeapListNode` | `MapBase` | Start of the map - start address rounded down based on OS page size |
| `CodeHeapListNode` | `HeaderMap` | Bit array used to find the start of methods - relative to `MapBase` |
+| `EEJitManager` | `StoreRichDebugInfo` | Boolean value determining if debug info associated with the JitManager contains rich info. |
| `RealCodeHeader` | `MethodDesc` | Pointer to the corresponding `MethodDesc` |
| `RealCodeHeader` | `NumUnwindInfos` | Number of Unwind Infos |
| `RealCodeHeader` | `UnwindInfos` | Start address of Unwind Infos |
+| `RealCodeHeader` | `DebugInfo` | Pointer to the DebugInfo |
| `RealCodeHeader` | `GCInfo` | Pointer to the GCInfo encoding |
| `Module` | `ReadyToRunInfo` | Pointer to the `ReadyToRunInfo` for the module |
| `ReadyToRunInfo` | `ReadyToRunHeader` | Pointer to the ReadyToRunHeader |
@@ -78,6 +83,7 @@ Data descriptors used:
| `ReadyToRunInfo` | `NumHotColdMap` | Number of entries in the `HotColdMap` |
| `ReadyToRunInfo` | `HotColdMap` | Pointer to an array of 32-bit integers - [see R2R format](../coreclr/botr/readytorun-format.md#readytorunsectiontypehotcoldmap-v80) |
| `ReadyToRunInfo` | `DelayLoadMethodCallThunks` | Pointer to an `ImageDataDirectory` for the delay load method call thunks |
+| `ReadyToRunInf` | `DebugInfo` | Pointer to an `ImageDataDirectory` for the debug info |
| `ReadyToRunInfo` | `EntryPointToMethodDescMap` | `HashMap` of entry point addresses to `MethodDesc` pointers |
| `ReadyToRunHeader` | `MajorVersion` | ReadyToRun major version |
| `ReadyToRunHeader` | `MinorVersion` | ReadyToRun minor version |
@@ -100,6 +106,7 @@ Global variables used:
| `HashMapValueMask` | uint64 | Bitmask used when storing values in a `HashMap` |
| `FeatureEHFunclets` | uint8 | 1 if EH funclets are enabled, 0 otherwise |
| `GCInfoVersion` | uint32 | JITted code GCInfo version |
+| `FeatureOnStackReplacement` | uint8 | 1 if FEATURE_ON_STACK_REPLACEMENT is enabled, 0 otherwise |
Contracts used:
| Contract Name |
@@ -266,9 +273,16 @@ The `GetMethodDesc`, `GetStartAddress`, and `GetRelativeOffset` APIs extract fie
Unwind info (`RUNTIME_FUNCTION`) use relative addressing. For managed code, these values are relative to the start of the code's containing range in the RangeSectionMap (described below). This could be the beginning of a `CodeHeap` for jitted code or the base address of the loaded image for ReadyToRun code.
`GetUnwindInfoBaseAddress` finds this base address for a given `CodeBlockHandle`.
+`IExecutionManager.GetDebugInfo` gets a pointer to the relevant DebugInfo for a `CodeBlockHandle`. The ExecutionManager delegates to the JitManager implementations as the DebugInfo is stored in different ways on jitted and R2R code.
+
+* For Jitted code (`EEJitManager`) a pointer to the `DebugInfo` is stored on the `RealCodeHeader` which is accessed in the same way as `GetMethodInfo` described above. `hasFlagByte` is `true` if either the global `FeatureOnStackReplacement` is `true` or `StoreRichDebugInfo` is `true` on the `EEJitManager`.
+
+* For R2R code (`ReadyToRunJitManager`) the `DebugInfo` is stored as part of the R2R image. The relevant `ReadyToRunInfo` stores a pointer to the an `ImageDataDirectory` representing the `DebugInfo` directory. Read the `VirtualAddress` of this data directory as a `NativeArray` containing the `DebugInfos`. To find the specific `DebugInfo`, index into the array using the `index` of the beginning of the R2R function as found like in `GetMethodInfo` above. This yields an offset `offset` value relative to the image base. Read the first variable length uint at `imageBase + offset`, `lookBack`. If `lookBack != 0`, return `imageBase + offset - lookback`. Otherwise return `offset + size of reading lookback`.
+For R2R images, `hasFlagByte` is always `false`.
+
`IExecutionManager.GetGCInfo` gets a pointer to the relevant GCInfo for a `CodeBlockHandle`. The ExecutionManager delegates to the JitManager implementations as the GCInfo is stored differently on jitted and R2R code.
-* For jitted code (`EEJitManager`) a pointer to the `GCInfo` is stored on the `RealCodeHeader` which is accessed in the same was as `GetMethodInfo` described above. This can simply be returned as is. The `GCInfoVersion` is defined by the runtime global `GCInfoVersion`.
+* For jitted code (`EEJitManager`) a pointer to the `GCInfo` is stored on the `RealCodeHeader` which is accessed in the same way as `GetMethodInfo` described above. This can simply be returned as is. The `GCInfoVersion` is defined by the runtime global `GCInfoVersion`.
* For R2R code (`ReadyToRunJitManager`), the `GCInfo` is stored directly after the `UnwindData`. This in turn is found by looking up the `UnwindInfo` (`RUNTIME_FUNCTION`) and reading the `UnwindData` offset. We find the `UnwindInfo` as described above in `IExecutionManager.GetUnwindInfo`. Once we have the relevant unwind data, we calculate the size of the unwind data and return a pointer to the following byte (first byte of the GCInfo). The size of the unwind data is a platform specific. Currently only X86 is supported with a constant unwind data size of 32-bits.
* The `GCInfoVersion` of R2R code is mapped from the R2R MajorVersion and MinorVersion which is read from the ReadyToRunHeader which itself is read from the ReadyToRunInfo (can be found as in GetMethodInfo). The current GCInfoVersion mapping is:
@@ -301,6 +315,10 @@ On 64-bit targets, we take advantage of the fact that most architectures don't s
That is, level 5 has 256 entires pointing to level 4 maps (or nothing if there's no
code allocated in that address range), level 4 entires point to level 3 maps and so on. Each level 1 map has 256 entries covering a 128 KiB chunk and pointing to a linked list of range section fragments that fall within that 128 KiB chunk.
+### Native Format
+
+The ReadyToRun image stores data in a compressed native foramt defined in [nativeformatreader.h](../../../src/coreclr/vm/nativeformatreader.h).
+
### NibbleMap
The ExecutionManager contract depends on a "nibble map" data structure
diff --git a/docs/design/datacontracts/Loader.md b/docs/design/datacontracts/Loader.md
index 107e7d5617dfc2..30372f60e6eb71 100644
--- a/docs/design/datacontracts/Loader.md
+++ b/docs/design/datacontracts/Loader.md
@@ -52,9 +52,12 @@ record struct ModuleLookupTables(
```
``` csharp
-ModuleHandle GetModuleHandle(TargetPointer module);
-IEnumerable GetModules(TargetPointer appDomain, AssemblyIterationFlags iterationFlags);
+ModuleHandle GetModuleHandleFromModulePtr(TargetPointer module);
+ModuleHandle GetModuleHandleFromAssemblyPtr(TargetPointer assemblyPointer);
+IEnumerable GetModuleHandles(TargetPointer appDomain, AssemblyIterationFlags iterationFlags);
TargetPointer GetRootAssembly();
+string GetAppDomainFriendlyName();
+TargetPointer GetModule(ModuleHandle handle);
TargetPointer GetAssembly(ModuleHandle handle);
TargetPointer GetPEAssembly(ModuleHandle handle);
bool TryGetLoadedImageContents(ModuleHandle handle, out TargetPointer baseAddress, out uint size, out uint imageFlags);
@@ -67,12 +70,16 @@ ModuleFlags GetFlags(ModuleHandle handle);
string GetPath(ModuleHandle handle);
string GetFileName(ModuleHandle handle);
TargetPointer GetLoaderAllocator(ModuleHandle handle);
-TargetPointer GetThunkHeap(ModuleHandle handle);
TargetPointer GetILBase(ModuleHandle handle);
+TargetPointer GetAssemblyLoadContext(ModuleHandle handle);
ModuleLookupTables GetLookupTables(ModuleHandle handle);
TargetPointer GetModuleLookupMapElement(TargetPointer table, uint token, out TargetNUInt flags);
bool IsCollectible(ModuleHandle handle);
bool IsAssemblyLoaded(ModuleHandle handle);
+TargetPointer GetGlobalLoaderAllocator();
+TargetPointer GetHighFrequencyHeap(TargetPointer loaderAllocatorPointer);
+TargetPointer GetLowFrequencyHeap(TargetPointer loaderAllocatorPointer);
+TargetPointer GetStubHeap(TargetPointer loaderAllocatorPointer);
```
## Version 1
@@ -85,7 +92,6 @@ bool IsAssemblyLoaded(ModuleHandle handle);
| `Module` | `Base` | Pointer to start of PE file in memory |
| `Module` | `Flags` | Assembly of the Module |
| `Module` | `LoaderAllocator` | LoaderAllocator of the Module |
-| `Module` | `ThunkHeap` | Pointer to the thunk heap |
| `Module` | `Path` | Path of the Module (UTF-16, null-terminated) |
| `Module` | `FileName` | File name of the Module (UTF-16, null-terminated) |
| `Module` | `GrowableSymbolStream` | Pointer to the in memory symbol stream |
@@ -107,6 +113,8 @@ bool IsAssemblyLoaded(ModuleHandle handle);
| `Assembly` | `NotifyFlags` | Flags relating to the debugger/profiler notification state of the assembly |
| `Assembly` | `Level` | File load level of the assembly |
| `PEAssembly` | `PEImage` | Pointer to the PEAssembly's PEImage |
+| `PEAssembly` | `AssemblyBinder` | Pointer to the PEAssembly's binder |
+| `AssemblyBinder` | `AssemblyLoadContext` | Pointer to the AssemblyBinder's AssemblyLoadContext |
| `PEImage` | `LoadedImageLayout` | Pointer to the PEImage's loaded PEImageLayout |
| `PEImage` | `ProbeExtensionResult` | PEImage's ProbeExtensionResult |
| `ProbeExtensionResult` | `Type` | Type of ProbeExtensionResult |
@@ -117,7 +125,12 @@ bool IsAssemblyLoaded(ModuleHandle handle);
| `CGrowableSymbolStream` | `Size` | Size of the raw symbol stream buffer |
| `AppDomain` | `RootAssembly` | Pointer to the root assembly |
| `AppDomain` | `DomainAssemblyList` | ArrayListBase of assemblies in the AppDomain |
+| `AppDomain` | `FriendlyName` | Friendly name of the AppDomain |
+| `SystemDomain` | `GlobalLoaderAllocator` | global LoaderAllocator |
| `LoaderAllocator` | `ReferenceCount` | Reference count of LoaderAllocator |
+| `LoaderAllocator` | `HighFrequencyHeap` | High-frequency heap of LoaderAllocator |
+| `LoaderAllocator` | `LowFrequencyHeap` | Low-frequency heap of LoaderAllocator |
+| `LoaderAllocator` | `StubHeap` | Stub heap of LoaderAllocator |
| `ArrayListBase` | `Count` | Total number of elements in the ArrayListBase |
| `ArrayListBase` | `FirstBlock` | First ArrayListBlock |
| `ArrayListBlock` | `Next` | Next ArrayListBlock in chain |
@@ -137,6 +150,7 @@ bool IsAssemblyLoaded(ModuleHandle handle);
| Global Name | Type | Purpose |
| --- | --- | --- |
| `AppDomain` | TargetPointer | Pointer to the global AppDomain |
+| `SystemDomain` | TargetPointer | Pointer to the global SystemDomain |
### Contract Constants:
@@ -159,12 +173,18 @@ private enum ModuleFlags_1 : uint
### Method Implementations
``` csharp
-ModuleHandle GetModuleHandle(TargetPointer modulePointer)
+ModuleHandle GetModuleHandleFromModulePtr(TargetPointer modulePointer)
{
return new ModuleHandle(modulePointer);
}
-IEnumerable GetModules(TargetPointer appDomain, AssemblyIterationFlags iterationFlags)
+ModuleHandle ILoader.GetModuleHandleFromAssemblyPtr(TargetPointer assemblyPointer)
+{
+ Data.Assembly assembly = // read Assembly object at assemblyPointer
+ return new ModuleHandle(assembly.Module);
+}
+
+IEnumerable GetModuleHandles(TargetPointer appDomain, AssemblyIterationFlags iterationFlags)
{
if (appDomain == TargetPointer.Null) throw new ArgumentException("appDomain must not be null");
@@ -263,11 +283,25 @@ IEnumerable GetModules(TargetPointer appDomain, AssemblyIterationF
TargetPointer GetRootAssembly()
{
- TargetPointer appDomainPointer = target.ReadGlobalPointer(Constants.Globals.AppDomain);
+ TargetPointer appDomainPointer = target.ReadGlobalPointer("AppDomain");
AppDomain appDomain = // read AppDomain object starting at appDomainPointer
return appDomain.RootAssembly;
}
+string ILoader.GetAppDomainFriendlyName()
+{
+ TargetPointer appDomainPointer = target.ReadGlobalPointer("AppDomain");
+ TargetPointer appDomain = target.ReadPointer(appDomainPointer)
+ TargetPointer pathStart = appDomain + /* AppDomain::FriendlyName offset */;
+ char[] name = // Read from target starting at pathStart until null terminator
+ return new string(name);
+}
+
+TargetPointer ILoader.GetModule(ModuleHandle handle)
+{
+ return handle.Address;
+}
+
TargetPointer GetAssembly(ModuleHandle handle)
{
return target.ReadPointer(handle.Address + /* Module::Assembly offset */);
@@ -385,14 +419,17 @@ TargetPointer GetLoaderAllocator(ModuleHandle handle)
return target.ReadPointer(handle.Address + /* Module::LoaderAllocator offset */);
}
-TargetPointer GetThunkHeap(ModuleHandle handle)
+TargetPointer GetILBase(ModuleHandle handle)
{
- return target.ReadPointer(handle.Address + /* Module::ThunkHeap offset */);
+ return target.ReadPointer(handle.Address + /* Module::Base offset */);
}
-TargetPointer GetILBase(ModuleHandle handle)
+TargetPointer ILoader.GetAssemblyLoadContext(ModuleHandle handle)
{
- return target.ReadPointer(handle.Address + /* Module::Base offset */);
+ PEAssembly peAssembly = target.ReadPointer(handle.Address + /* Module::PEAssembly offset */);
+ AssemblyBinder binder = target.ReadPointer(peAssembly + /* PEAssembly::AssemblyBinder offset */);
+ ObjectHandle objectHandle = new ObjectHandle(binder);
+ return objectHandle.Object;
}
ModuleLookupTables GetLookupTables(ModuleHandle handle)
@@ -417,40 +454,61 @@ TargetPointer GetModuleLookupMapElement(TargetPointer table, uint token, out Tar
uint index = rid;
// have to read lookupMap an extra time upfront because only the first map
// has valid supportedFlagsMask
- TargetNUInt supportedFlagsMask = _target.ReadNUInt(table + /* ModuleLookupMap::SupportedFlagsMask */);
+ TargetNUInt supportedFlagsMask = target.ReadNUInt(table + /* ModuleLookupMap::SupportedFlagsMask */);
do
{
- if (index < _target.Read(table + /*ModuleLookupMap::Count*/))
+ if (index < target.Read(table + /*ModuleLookupMap::Count*/))
{
- TargetPointer entryAddress = _target.ReadPointer(lookupMap + /*ModuleLookupMap::TableData*/) + (ulong)(index * _target.PointerSize);
- TargetPointer rawValue = _target.ReadPointer(entryAddress);
+ TargetPointer entryAddress = target.ReadPointer(lookupMap + /*ModuleLookupMap::TableData*/) + (ulong)(index * target.PointerSize);
+ TargetPointer rawValue = target.ReadPointer(entryAddress);
flags = rawValue & supportedFlagsMask;
return rawValue & ~(supportedFlagsMask.Value);
}
else
{
- table = _target.ReadPointer(lookupMap + /*ModuleLookupMap::Next*/);
- index -= _target.Read(lookupMap + /*ModuleLookupMap::Count*/);
+ table = target.ReadPointer(lookupMap + /*ModuleLookupMap::Next*/);
+ index -= target.Read(lookupMap + /*ModuleLookupMap::Count*/);
}
} while (table != TargetPointer.Null);
return TargetPointer.Null;
}
-```
-```csharp
-bool ILoader.IsCollectible(ModuleHandle handle)
+bool IsCollectible(ModuleHandle handle)
{
- TargetPointer assembly = _target.ReadPointer(handle.Address + /*Module::Assembly*/);
- byte isCollectible = _target.Read(assembly + /* Assembly::IsCollectible*/);
+ TargetPointer assembly = target.ReadPointer(handle.Address + /*Module::Assembly*/);
+ byte isCollectible = target.Read(assembly + /* Assembly::IsCollectible*/);
return isCollectible != 0;
}
-bool ILoader.IsAssemblyLoaded(ModuleHandle handle)
+bool IsAssemblyLoaded(ModuleHandle handle)
{
- TargetPointer assembly = _target.ReadPointer(handle.Address + /*Module::Assembly*/);
- uint loadLevel = _target.Read(assembly + /* Assembly::Level*/);
+ TargetPointer assembly = target.ReadPointer(handle.Address + /*Module::Assembly*/);
+ uint loadLevel = target.Read(assembly + /* Assembly::Level*/);
return assembly.Level >= ASSEMBLY_LEVEL_LOADED;
}
+
+TargetPointer GetGlobalLoaderAllocator()
+{
+ TargetPointer systemDomainPointer = target.ReadGlobalPointer("SystemDomain");
+ TargetPointer systemDomain = target.ReadPointer(systemDomainPointer);
+ return target.ReadPointer(systemDomain + /* SystemDomain::GlobalLoaderAllocator offset */);
+}
+
+TargetPointer GetHighFrequencyHeap(TargetPointer loaderAllocatorPointer)
+{
+ return target.ReadPointer(loaderAllocatorPointer + /* LoaderAllocator::HighFrequencyHeap offset */);
+}
+
+TargetPointer GetLowFrequencyHeap(TargetPointer loaderAllocatorPointer)
+{
+ return target.ReadPointer(loaderAllocatorPointer + /* LoaderAllocator::LowFrequencyHeap offset */);
+}
+
+TargetPointer GetStubHeap(TargetPointer loaderAllocatorPointer)
+{
+ return target.ReadPointer(loaderAllocatorPointer + /* LoaderAllocator::StubHeap offset */);
+}
+
```
### DacEnumerableHash (EETypeHashTable and InstMethodHashTable)
diff --git a/docs/design/datacontracts/PrecodeStubs.md b/docs/design/datacontracts/PrecodeStubs.md
index 83f593fcf2c0ad..b336b433ac2e13 100644
--- a/docs/design/datacontracts/PrecodeStubs.md
+++ b/docs/design/datacontracts/PrecodeStubs.md
@@ -9,22 +9,32 @@ This contract provides support for examining [precode](../coreclr/botr/method-de
TargetPointer GetMethodDescFromStubAddress(TargetCodePointer entryPoint);
```
-## Version 1 and 2
+## Version 1, 2, and 3
Data descriptors used:
| Data Descriptor Name | Field | Meaning |
| --- | --- | --- |
-| PrecodeMachineDescriptor | OffsetOfPrecodeType | See `ReadPrecodeType` |
-| PrecodeMachineDescriptor | ShiftOfPrecodeType | See `ReadPrecodeType` |
-| PrecodeMachineDescriptor | ReadWidthOfPrecodeType | See `ReadPrecodeType` |
+| PrecodeMachineDescriptor | OffsetOfPrecodeType | See `ReadPrecodeType` (Version 1 and 2 only) |
+| PrecodeMachineDescriptor | ShiftOfPrecodeType | See `ReadPrecodeType` (Version 1 and 2 only) |
+| PrecodeMachineDescriptor | ReadWidthOfPrecodeType | See `ReadPrecodeType` (Version 1 and 2 only) |
| PrecodeMachineDescriptor | StubCodePageSize | Size of a precode code page (in bytes) |
| PrecodeMachineDescriptor | CodePointerToInstrPointerMask | mask to apply to code pointers to get an address (see arm32 note)
| PrecodeMachineDescriptor | StubPrecodeType | precode sort byte for stub precodes |
| PrecodeMachineDescriptor | HasPInvokeImportPrecode | 1 if platform supports PInvoke precode stubs |
-| PrecodeMachineDescriptor | PInvokeImportPrecodeType| precode sort byte for PInvoke precode stubs, if supported |
+| PrecodeMachineDescriptor | PInvokeImportPrecodeType | precode sort byte for PInvoke precode stubs, if supported |
| PrecodeMachineDescriptor | HasFixupPrecode | 1 if platform supports fixup precode stubs |
-| PrecodeMachineDescriptor | FixupPrecodeType| precode sort byte for fixup precode stubs, if supported |
+| PrecodeMachineDescriptor | FixupPrecodeType | precode sort byte for fixup precode stubs, if supported |
| PrecodeMachineDescriptor | ThisPointerRetBufPrecodeType | precode sort byte for this pointer ret buf precodes |
+| PrecodeMachineDescriptor | FixupStubPrecodeSize | Byte size of `FixupBytes` and `FixupIgnoredBytes` (Version 3 only) |
+| PrecodeMachineDescriptor | FixupBytes | Assembly code of a FixupStub (Version 3 only) |
+| PrecodeMachineDescriptor | FixupIgnoredBytes | Bytes to ignore of when comparing `FixupBytes` to an actual block of memory in the target process. (Version 3 only) |
+| PrecodeMachineDescriptor | StubPrecodeSize | Byte size of `StubBytes` and `StubIgnoredBytes` (Version 3 only) |
+| PrecodeMachineDescriptor | StubBytes | Assembly code of a StubPrecode (Version 3 only) |
+| PrecodeMachineDescriptor | StubIgnoredBytes | Bytes to ignore of when comparing `StubBytes` to an actual block of memory in the target process. (Version 3 only) |
+| PrecodeMachineDescriptor | FixupCodeOffset | Offset of second entrypoint into a `FixupStub` (Present in data for Version 3 and above only.) |
+| PrecodeMachineDescriptor | InterpreterPrecodeType | precode sort byte for the entrypoint into the interpreter (Version 3 only) |
+| PrecodeMachineDescriptor | UMEntryPrecodeType | precode sort byte for the entrypoint into the UMEntry thunk (Version 3 only) |
+| PrecodeMachineDescriptor | DynamicHelperPrecodeType | precode sort byte for the entrypoint into a dynamic helper (Version 3 only) |
| StubPrecodeData | MethodDesc | pointer to the MethodDesc associated with this stub precode (Version 1 only) |
| StubPrecodeData | SecretParam | pointer to the MethodDesc associated with this stub precode or a second stub data pointer for other types (Version 2 only) |
| StubPrecodeData | Type | precise sort of stub precode |
@@ -44,12 +54,75 @@ Contracts used:
| --- |
| `PlatformMetadata` |
-### Determining the precode type
+### Determining the precode type (Version 3)
+``` csharp
+ private bool ReadBytesAndCompare(TargetPointer instrAddress, byte[] expectedBytePattern, byte[] bytesToIgnore)
+ {
+ byte[] localCopy = new byte[expectedBytePattern.Length];
+ for (int i = 0; i < expectedBytePattern.Length; i++)
+ {
+ if (bytesToIgnore[i] == 0)
+ {
+ byte targetBytePattern = _target.Read(instrAddress + i);
+ if (expectedBytePattern[i] != targetBytePattern)
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+ private KnownPrecodeType? TryGetKnownPrecodeType(TargetPointer instrAddress)
+ {
+ KnownPrecodeType? basicPrecodeType = default;
+ if (ReadBytesAndCompare(instrAddress, MachineDescriptor.StubBytes, MachineDescriptor.StubIgnoredBytes))
+ {
+ // get the actual type from the StubPrecodeData
+ Data.StubPrecodeData stubPrecodeData = GetStubPrecodeData(instrAddress);
+ byte exactPrecodeType = stubPrecodeData.Type;
+ if (exactPrecodeType == 0)
+ return null;
+
+ if (exactPrecodeType == MachineDescriptor.StubPrecodeType)
+ {
+ return KnownPrecodeType.Stub;
+ }
+ else if (MachineDescriptor.PInvokeImportPrecodeType is byte compareByte1 && compareByte1 == exactPrecodeType)
+ {
+ return KnownPrecodeType.PInvokeImport;
+ }
+ else if (MachineDescriptor.ThisPointerRetBufPrecodeType is byte compareByte2 && compareByte2 == exactPrecodeType)
+ {
+ return KnownPrecodeType.ThisPtrRetBuf;
+ }
+ else if (MachineDescriptor.UMEntryPrecodeType is byte compareByte3 && compareByte3 == exactPrecodeType)
+ {
+ return KnownPrecodeType.UMEntry;
+ }
+ else if (MachineDescriptor.InterpreterPrecodeType is byte compareByte4 && compareByte4 == exactPrecodeType)
+ {
+ return KnownPrecodeType.Interpreter;
+ }
+ else if (MachineDescriptor.DynamicHelperPrecodeType is byte compareByte5 && compareByte5 == exactPrecodeType)
+ {
+ return KnownPrecodeType.DynamicHelper;
+ }
+ }
+ else if (ReadBytesAndCompare(instrAddress, MachineDescriptor.FixupBytes, MachineDescriptor.FixupIgnoredBytes))
+ {
+ return KnownPrecodeType.Fixup;
+ }
+ return null;
+ }
+```
+
+### Determining the precode type (Version 1 and 2)
An initial approximation of the precode type relies on a particular pattern at a known offset from the precode entrypoint.
The precode type is expected to be encoded as an immediate. On some platforms the value is spread over multiple instruction bytes and may need to be right-shifted.
-```
+```csharp
private byte ReadPrecodeType(TargetPointer instrPointer)
{
if (MachineDescriptor.ReadWidthOfPrecodeType == 1)
@@ -121,9 +194,12 @@ After the initial precode type is determined, for stub precodes a refined precod
internal enum KnownPrecodeType
{
Stub = 1,
- PInvokeImport, // also known as NDirectImport in the runtime
+ PInvokeImport,
Fixup,
ThisPtrRetBuf,
+ UMEntry,
+ DynamicHelper,
+ Interpreter
}
internal abstract class ValidPrecode
diff --git a/docs/design/datacontracts/RuntimeTypeSystem.md b/docs/design/datacontracts/RuntimeTypeSystem.md
index f0bfe7b66eb571..86fe79087fb690 100644
--- a/docs/design/datacontracts/RuntimeTypeSystem.md
+++ b/docs/design/datacontracts/RuntimeTypeSystem.md
@@ -53,15 +53,25 @@ partial interface IRuntimeTypeSystem : IContract
// True if the MethodTable represents a type that contains managed references
public virtual bool ContainsGCPointers(TypeHandle typeHandle);
public virtual bool IsDynamicStatics(TypeHandle typeHandle);
- public virtual ushort GetNumMethods(TypeHandle typeHandle);
public virtual ushort GetNumInterfaces(TypeHandle typeHandle);
// Returns an ECMA-335 TypeDef table token for this type, or for its generic type definition if it is a generic instantiation
public virtual uint GetTypeDefToken(TypeHandle typeHandle);
+ public virtual ushort GetNumMethods(TypeHandle typeHandle);
// Returns the ECMA 335 TypeDef table Flags value (a bitmask of TypeAttributes) for this type,
// or for its generic type definition if it is a generic instantiation
public virtual uint GetTypeDefTypeAttributes(TypeHandle typeHandle);
+ public ushort GetNumInstanceFields(TypeHandle typeHandle);
+ public ushort GetNumStaticFields(TypeHandle typeHandle);
+ public ushort GetNumThreadStaticFields(TypeHandle typeHandle);
+ public TargetPointer GetGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr);
+ public TargetPointer GetNonGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr);
+ public TargetPointer GetFieldDescList(TypeHandle typeHandle);
+ public TargetPointer GetGCStaticsBasePointer(TypeHandle typeHandle);
+ public TargetPointer GetNonGCStaticsBasePointer(TypeHandle typeHandle);
public virtual ReadOnlySpan GetInstantiation(TypeHandle typeHandle);
+ public bool IsClassInited(TypeHandle typeHandle);
+ public bool IsInitError(TypeHandle typeHandle);
public virtual bool IsGenericTypeDefinition(TypeHandle typeHandle);
public virtual bool HasTypeParam(TypeHandle typeHandle);
@@ -331,6 +341,7 @@ The contract depends on the following globals
| Global name | Meaning |
| --- | --- |
| `FreeObjectMethodTablePointer` | A pointer to the address of a `MethodTable` used by the GC to indicate reclaimed memory
+| `StaticsPointerMask` | For masking out a bit of DynamicStaticsInfo pointer fields
The contract additionally depends on these data descriptors
@@ -345,12 +356,23 @@ The contract additionally depends on these data descriptors
| `MethodTable` | `NumInterfaces` | Number of interfaces of `MethodTable` |
| `MethodTable` | `NumVirtuals` | Number of virtual methods in `MethodTable` |
| `MethodTable` | `PerInstInfo` | Either the array element type, or pointer to generic information for `MethodTable` |
+| `MethodTableAuxiliaryData` | `Flags` | Flags of `MethodTableAuxiliaryData` |
+| `MethodTable` | `AuxiliaryData` | Pointer to the AuxiliaryData of a method table |
+| `DynamicStaticsInfo` | `NonGCStatics` | Pointer to non-GC statics |
+| `DynamicStaticsInfo` | `GCStatics` | Pointer to the GC statics |
+| `DynamicStaticsInfo` | `Size` | Size of the data |
+| `ThreadStaticsInfo` | `GCTlsIndex` | Pointer to GC thread local storage index |
+| `ThreadStaticsInfo` | `NonGCTlsIndex` | Pointer to non-GC thread local storage index |
| `EEClass` | `InternalCorElementType` | An InternalCorElementType uses the enum values of a CorElementType to indicate some of the information about the type of the type which uses the EEClass In particular, all reference types are CorElementType.Class, Enums are the element type of their underlying type and ValueTypes which can exactly be represented as an element type are represented as such, all other values types are represented as CorElementType.ValueType. |
| `EEClass` | `MethodTable` | Pointer to the canonical MethodTable of this type |
| `EEClass` | `MethodDescChunk` | Pointer to the first MethodDescChunk of the EEClass |
| `EEClass` | `NumMethods` | Count of methods attached to the EEClass |
| `EEClass` | `NumNonVirtualSlots` | Count of non-virtual slots for the EEClass |
| `EEClass` | `CorTypeAttr` | Various flags |
+| `EEClass` | `NumInstanceFields` | Count of instance fields of the EEClass |
+| `EEClass` | `NumStaticFields` | Count of static fields of the EEClass |
+| `EEClass` | `NumThreadStaticFields` | Count of threadstatic fields of the EEClass |
+| `EEClass` | `FieldDescList` | A list of fields in the type |
| `ArrayClass` | `Rank` | Rank of the associated array MethodTable |
| `TypeDesc` | `TypeAndFlags` | The lower 8 bits are the CorElementType of the `TypeDesc`, the upper 24 bits are reserved for flags |
| `ParamTypeDesc` | `TypeArg` | Associated type argument |
@@ -362,6 +384,11 @@ The contract additionally depends on these data descriptors
| `GenericsDictInfo` | `NumDicts` | Number of instantiation dictionaries, including inherited ones, in this `GenericsDictInfo` |
| `GenericsDictInfo` | `NumTypeArgs` | Number of type arguments in the type or method instantiation described by this `GenericsDictInfo` |
+Contracts used:
+| Contract Name |
+| --- |
+| `Thread` |
+
```csharp
private readonly Dictionary _methodTables;
@@ -377,11 +404,35 @@ The contract additionally depends on these data descriptors
return TypeHandle { Address = typeHandlePointer }
}
+ public TargetPointer GetModule(TypeHandle TypeHandle)
+ {
+ if (typeHandle.IsMethodTable())
+ {
+ return _methodTables[TypeHandle.Address].Module;
+ }
+ else if (typeHandle.IsTypeDesc())
+ {
+ if (HasTypeParam(typeHandle))
+ {
+ return GetModule(GetTypeParam(typeHandle));
+ }
+ else if (IsGenericVariable(typeHandle, out TargetPointer genericParamModule, out _))
+ {
+ return genericParamModule;
+ }
+ }
+ return TargetPointer.Null;
+ }
+
internal static EEClassOrCanonMTBits GetEEClassOrCanonMTBits(TargetPointer eeClassOrCanonMTPtr)
{
return (EEClassOrCanonMTBits)(eeClassOrCanonMTPtr & (ulong)EEClassOrCanonMTBits.Mask);
}
+ public TargetPointer GetCanonicalMethodTable(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : GetClassData(TypeHandle).MethodTable;
+
+ public TargetPointer GetParentMethodTable(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : _methodTables[TypeHandle.Address].ParentMethodTable;
+
public uint GetBaseSize(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? (uint)0 : _methodTables[TypeHandle.Address].Flags.BaseSize;
public uint GetComponentSize(TypeHandle TypeHandle) =>!typeHandle.IsMethodTable() ? (uint)0 : GetComponentSize(_methodTables[TypeHandle.Address]);
@@ -400,36 +451,16 @@ The contract additionally depends on these data descriptors
... // read Data.EEClass data from eeClassPtr
}
-
- public TargetPointer GetCanonicalMethodTable(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : GetClassData(TypeHandle).MethodTable;
-
- public TargetPointer GetModule(TypeHandle TypeHandle)
- {
- if (typeHandle.IsMethodTable())
- {
- return _methodTables[TypeHandle.Address].Module;
- }
- else if (typeHandle.IsTypeDesc())
- {
- if (HasTypeParam(typeHandle))
- {
- return GetModule(GetTypeParam(typeHandle));
- }
- else if (IsGenericVariable(typeHandle, out TargetPointer genericParamModule, out _))
- {
- return genericParamModule;
- }
- }
- return TargetPointer.Null;
- }
-
- public TargetPointer GetParentMethodTable(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : _methodTables[TypeHandle.Address].ParentMethodTable;
-
public bool IsFreeObjectMethodTable(TypeHandle TypeHandle) => FreeObjectMethodTablePointer == TypeHandle.Address;
public bool IsString(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[TypeHandle.Address].Flags.IsString;
+
public bool ContainsGCPointers(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[TypeHandle.Address].Flags.ContainsGCPointers;
+ public bool IsDynamicStatics(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[TypeHandle.Address].Flags.IsDynamicStatics;
+
+ public ushort GetNumInterfaces(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? 0 : _methodTables[TypeHandle.Address].NumInterfaces;
+
public uint GetTypeDefToken(TypeHandle TypeHandle)
{
if (!typeHandle.IsMethodTable())
@@ -441,11 +472,71 @@ The contract additionally depends on these data descriptors
public ushort GetNumMethods(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? 0 : GetClassData(TypeHandle).NumMethods;
- public ushort GetNumInterfaces(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? 0 : _methodTables[TypeHandle.Address].NumInterfaces;
-
public uint GetTypeDefTypeAttributes(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? 0 : GetClassData(TypeHandle).CorTypeAttr;
- public bool IsDynamicStatics(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[TypeHandle.Address].Flags.IsDynamicStatics;
+ public ushort GetNumInstanceFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumInstanceFields;
+
+ public ushort GetNumStaticFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumStaticFields;
+
+ public ushort GetNumThreadStaticFields(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? (ushort)0 : GetClassData(typeHandle).NumThreadStaticFields;
+
+ public TargetPointer GetFieldDescList(TypeHandle typeHandle) => !typeHandle.IsMethodTable() ? TargetPointer.Null : GetClassData(typeHandle).FieldDescList;
+
+ public TargetPointer GetGCStaticsBasePointer(TypeHandle typeHandle)
+ {
+ if (!typeHandle.IsMethodTable())
+ return TargetPointer.Null;
+
+ MethodTable methodTable = _methodTables[typeHandle.Address];
+ if (!methodTable.Flags.IsDynamicStatics)
+ return TargetPointer.Null;
+ TargetPointer dynamicStaticsInfoSize = target.GetTypeInfo(DataType.DynamicStaticsInfo).Size!.Value;
+ TargetPointer mask = target.ReadGlobalPointer("StaticsPointerMask");
+
+ TargetPointer dynamicStaticsInfo = methodTable.AuxiliaryData - dynamicStaticsInfoSize;
+ return (target.ReadPointer(dynamicStaticsInfo + /* DynamicStaticsInfo::GCStatics offset */) & (ulong)mask);
+ }
+
+ public TargetPointer GetNonGCStaticsBasePointer(TypeHandle typeHandle)
+ {
+ if (!typeHandle.IsMethodTable())
+ return TargetPointer.Null;
+
+ MethodTable methodTable = _methodTables[typeHandle.Address];
+ if (!methodTable.Flags.IsDynamicStatics)
+ return TargetPointer.Null;
+ TargetPointer dynamicStaticsInfoSize = target.GetTypeInfo(DataType.DynamicStaticsInfo).Size!.Value;
+ TargetPointer mask = target.ReadGlobalPointer("StaticsPointerMask");
+
+ TargetPointer dynamicStaticsInfo = methodTable.AuxiliaryData - dynamicStaticsInfoSize;
+ return (target.ReadPointer(dynamicStaticsInfo + /* DynamicStaticsInfo::NonGCStatics offset */) & (ulong)mask);
+ }
+
+ public TargetPointer GetGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr)
+ {
+ if (!typeHandle.IsMethodTable())
+ return TargetPointer.Null;
+ MethodTable_1 methodTable = _methodTables[typeHandle.Address];
+ TargetPointer threadStaticsInfoSize = target.GetTypeInfo(DataType.ThreadStaticsInfo).Size;
+ TargetPointer threadStaticsInfoAddr = methodTable.AuxiliaryData - threadStaticsInfoSize;
+
+ TargetPointer tlsIndexAddr = threadStaticsInfoAddr + /* ThreadStaticsInfo::GCTlsIndex offset */;
+ Contracts.IThread threadContract = target.Contracts.Thread;
+ return threadContract.GetThreadLocalStaticBase(threadPtr, tlsIndexAddr);
+ }
+
+ public TargetPointer GetNonGCThreadStaticsBasePointer(TypeHandle typeHandle, TargetPointer threadPtr)
+ {
+ if (!typeHandle.IsMethodTable())
+ return TargetPointer.Null;
+ MethodTable_1 methodTable = _methodTables[typeHandle.Address];
+ TargetPointer threadStaticsInfoSize = target.GetTypeInfo(DataType.ThreadStaticsInfo).Size;
+ TargetPointer threadStaticsInfoAddr = methodTable.AuxiliaryData - threadStaticsInfoSize;
+
+ TargetPointer tlsIndexAddr = threadStaticsInfoAddr + /* ThreadStaticsInfo::NonGCTlsIndex offset */;
+ Contracts.IThread threadContract = target.Contracts.Thread;
+ return threadContract.GetThreadLocalStaticBase(threadPtr, tlsIndexAddr);
+ }
public ReadOnlySpan GetInstantiation(TypeHandle TypeHandle)
{
@@ -468,6 +559,26 @@ The contract additionally depends on these data descriptors
return instantiation;
}
+ public bool IsClassInited(TypeHandle typeHandle)
+ {
+ if (!typeHandle.IsMethodTable())
+ return false;
+ TargetPointer auxiliaryDataPtr = target.ReadPointer(typeHandle.Address + /* MethodTable.AuxiliaryData offset */);
+ TargetPointer flagsPtr = target.ReadPointer(auxiliaryDataPtr + /* MethodTableAuxiliaryData::Flags offset */);
+ uint flags = target.Read(flagsPtr);
+ return (flags & (uint)MethodTableAuxiliaryFlags.Initialized) != 0;
+ }
+
+ public bool IsInitError(TypeHandle typeHandle)
+ {
+ if (!typeHandle.IsMethodTable())
+ return false;
+ TargetPointer auxiliaryDataPtr = target.ReadPointer(typeHandle.Address + /* MethodTable.AuxiliaryData offset */);
+ TargetPointer flagsPtr = target.ReadPointer(auxiliaryDataPtr + /* MethodTableAuxiliaryData::Flags offset */);
+ uint flags = target.Read(flagsPtr);
+ return (flags & (uint)MethodTableAuxiliaryFlags.IsInitError) != 0;
+ }
+
public bool IsDynamicStatics(TypeHandle TypeHandle) => !typeHandle.IsMethodTable() ? false : _methodTables[TypeHandle.Address].Flags.IsDynamicStatics;
public bool HasTypeParam(TypeHandle typeHandle)
@@ -675,7 +786,6 @@ The contract depends on the following other contracts
| ReJIT |
| ExecutionManager |
| PrecodeStubs |
-| ECall |
And the following enumeration definitions
@@ -740,6 +850,12 @@ And the following enumeration definitions
TemporaryEntryPointAssigned = 0x04,
}
+ internal enum MethodTableAuxiliaryFlags : uint
+ {
+ Initialized = 0x0001,
+ IsInitError = 0x0100,
+ }
+
```
Internal to the contract in order to answer queries about method descriptors,
@@ -868,7 +984,7 @@ And the various apis are implemented with the following algorithms
ushort FlagsAndTokenRange = // Read FlagsAndTokenRange field from MethodDescChunk contract using address methodDescChunk
- int tokenRemainderBitCount = _target.ReadGlobal(Constants.Globals.MethodDescTokenRemainderBitCount);
+ int tokenRemainderBitCount = _target.ReadGlobal("MethodDescTokenRemainderBitCount");
int tokenRangeBitCount = 24 - tokenRemainderBitCount;
uint allRidBitsSet = 0xFFFFFF;
uint tokenRemainderMask = allRidBitsSet >> tokenRangeBitCount;
@@ -1030,7 +1146,7 @@ Determining if a method is in a collectible module:
{
MethodDesc md = _methodDescs[methodDesc.Address];
TargetPointer loaderModuleAddr = GetLoaderModule(md);
- ModuleHandle mod = _target.Contracts.Loader.GetModuleHandle(loaderModuleAddr);
+ ModuleHandle mod = _target.Contracts.Loader.GetModuleHandleFromModulePtr(loaderModuleAddr);
return _target.Contracts.Loader.IsCollectible(mod);
}
@@ -1093,7 +1209,7 @@ Checking if a method has a native code slot and getting its address
{
MethodClassification.IL => /*size of MethodDesc*/,
MethodClassification.FCall => /* size of FCallMethodDesc */
- MethodClassification.PInvoke => /* size of NDirectMethodDesc */
+ MethodClassification.PInvoke => /* size of PInvokeMethodDesc */
MethodClassification.EEImpl => /* size of EEImplMethodDesc */
MethodClassification.Array => /* size of ArrayMethodDesc */
MethodClassification.Instantiated => /* size of InstantiatedMethodDesc */
@@ -1230,15 +1346,6 @@ Getting a MethodDesc for a certain slot in a MethodTable
return methodDescPtr;
}
- // FCall path, look up address in the FCall table using the ECall contract
- {
- TargetPointer methodDescPtr = _target.Contracts.ECall.MapTargetBackToMethodDesc(pCode);
- if (methodDescPtr != TargetPointer.Null)
- {
- return methodDescPtr;
- }
- }
-
// Stub path, read address as a Precode and get the MethodDesc from it
{
TargetPointer methodDescPtr = _target.Contracts.PrecodeStubs.GetMethodDescFromStubAddress(pCode);
@@ -1258,16 +1365,20 @@ Getting a MethodDesc for a certain slot in a MethodTable
if (pCode == TargetCodePointer.Null)
{
- // if pCode is null, we iterate through the method descs in the MT.
- foreach (MethodDescHandle mdh in GetIntroducedMethods(typeHandle))
+ // if pCode is null, we iterate through the method descs in the MT
+ while (true) // arbitrary limit to avoid infinite loop
{
- MethodDesc md = _methodDescs[mdh.Address];
-
- // if a MethodDesc matches the slot, return that MethodDesc
- if (md.Slot == slot)
+ foreach (MethodDescHandle mdh in GetIntroducedMethods(canonMT))
{
- return mdh.Address;
+ MethodDesc md = _methodDescs[mdh.Address];
+
+ // if a MethodDesc matches the slot, return that MethodDesc
+ if (md.Slot == slot)
+ {
+ return mdh.Address;
+ }
}
+ canonMT = GetTypeHandle(GetCanonicalMethodTable(GetTypeHandle(GetParentMethodTable(canonMT))));
}
}
diff --git a/docs/design/datacontracts/StressLog.md b/docs/design/datacontracts/StressLog.md
index abb7824a837f0c..3b90a216cfdf50 100644
--- a/docs/design/datacontracts/StressLog.md
+++ b/docs/design/datacontracts/StressLog.md
@@ -53,6 +53,7 @@ Data descriptors used:
| StressLog | TickFrequency | Number of ticks per second for stresslog timestamps |
| StressLog | StartTimestamp | Timestamp when the stress log was started |
| StressLog | ModuleOffset | Offset of the module in the stress log |
+| StressLog | Modules | Offset of the stress log's module table (if StressLogHasModuleTable is `1`) |
| StressLog | Logs | Pointer to the thread-specific logs |
| StressLogModuleDesc | BaseAddress | Base address of the module |
| StressLogModuleDesc | Size | Size of the module |
@@ -80,7 +81,6 @@ Global variables used:
| StressLogChunkSize | uint | Size of a stress log chunk |
| StressLogMaxMessageSize | ulong | Maximum size of a stress log message |
| StressLogHasModuleTable | byte | Whether the stress log module table is present |
-| StressLogModuleTable | pointer | Pointer to the stress log's module table (if StressLogHasModuleTable is `1`) |
```csharp
bool HasStressLog()
@@ -95,7 +95,7 @@ StressLogData GetStressLogData()
return default;
}
- StressLog stressLog = new StressLog(Target, Target.ReadGlobalPointer(Constants.Globals.StressLog));
+ StressLog stressLog = new StressLog(Target, Target.ReadGlobalPointer("StressLog"));
return new StressLogData(
stressLog.LoggedFacilities,
stressLog.Level,
@@ -210,18 +210,27 @@ bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer)
// This method is a helper for the various specific versions.
protected TargetPointer GetFormatPointer(ulong formatOffset)
{
- if (Target.ReadGlobal(Constants.Globals.StressLogHasModuleTable) == 0)
+ if (Target.ReadGlobal("StressLogHasModuleTable") == 0)
{
- StressLog stressLog = new(Target, target.ReadGlobalPointer(Constants.Globals.StressLog));
+ StressLog stressLog = new(Target, target.ReadGlobalPointer("StressLog"));
return new TargetPointer(stressLog.ModuleOffset + formatOffset);
}
- TargetPointer moduleTable = target.ReadGlobalPointer(Constants.Globals.StressLogModuleTable);
+ TargetPointer? moduleTable;
+ if (!target.TryReadGlobalPointer(Constants.Globals.StressLogModuleTable, out moduleTable))
+ {
+ if (!target.TryReadGlobalPointer(Constants.Globals.StressLog, out TargetPointer? pStressLog))
+ {
+ throw new InvalidOperationException("StressLogModuleTable is not set and StressLog is not available, but StressLogHasModuleTable is set to 1.");
+ }
+ Data.StressLog stressLog = target.ProcessedData.GetOrAdd(pStressLog.Value);
+ moduleTable = stressLog.Modules ?? throw new InvalidOperationException("StressLogModuleTable is not set and StressLog does not contain a ModuleTable offset, but StressLogHasModuleTable is set to 1.");
+ }
uint moduleEntrySize = target.GetTypeInfo(DataType.StressLogModuleDesc).Size!.Value;
- uint maxModules = target.ReadGlobal(Constants.Globals.StressLogMaxModules);
+ uint maxModules = target.ReadGlobal("StressLogMaxModules");
for (uint i = 0; i < maxModules; ++i)
{
- StressLogModuleDesc module = new(Target, moduleTable + i * moduleEntrySize);
+ StressLogModuleDesc module = new(Target, moduleTable.Value + i * moduleEntrySize);
ulong relativeOffset = formatOffset - cumulativeOffset;
if (relativeOffset < module.Size.Value)
{
@@ -313,7 +322,7 @@ The format offset refers to the cummulative offset into a module referred to in
```csharp
StressMsgData GetStressMsgData(StressMsg msg)
{
- StressLog stressLog = new(Target, target.ReadGlobalPointer(Constants.Globals.StressLog));
+ StressLog stressLog = new(Target, target.ReadGlobalPointer("StressLog"));
uint pointerSize = Target.GetTypeInfo(DataType.pointer).Size!.Value;
ulong payload1 = target.Read(msg.Header);
diff --git a/docs/design/datacontracts/Thread.md b/docs/design/datacontracts/Thread.md
index efdd7d0bbc653a..dcd0e39e611d13 100644
--- a/docs/design/datacontracts/Thread.md
+++ b/docs/design/datacontracts/Thread.md
@@ -46,29 +46,73 @@ record struct ThreadData (
ThreadStoreData GetThreadStoreData();
ThreadStoreCounts GetThreadCounts();
ThreadData GetThreadData(TargetPointer threadPointer);
-TargetPointer GetManagedThreadObject(TargetPointer threadPointer);
+TargetPointer IdToThread(uint id);
+TargetPointer GetThreadLocalStaticBase(TargetPointer threadPointer, int indexOffset, int indexType);
```
## Version 1
-This contract depends on the following descriptors:
-
-| Data descriptor name |
-| --- |
-| `GCAllocContext` |
-| `RuntimeThreadLocals` |
-| `Thread` |
-| `ThreadStore` |
-
-| Global name |
-| --- |
-| `AppDomain` |
-| `ThreadStore` |
-| `FeatureEHFunclets` |
-| `FinalizerThread` |
-| `GCThread` |
-
+The contract depends on the following globals
+
+| Global name | Type | Meaning |
+| --- | --- |
+| `AppDomain` | TargetPointer | A pointer to the address of the one AppDomain
+| `ThreadStore` | TargetPointer | A pointer to the address of the ThreadStore
+| `FeatureEHFunclets` | TargetPointer | 1 if EH funclets are enabled, 0 otherwise
+| `FinalizerThread` | TargetPointer | A pointer to the finalizer thread
+| `GCThread` | TargetPointer | A pointer to the GC thread
+| `ThinLockThreadIdDispenser` | TargetPointer | Dispenser of thinlock IDs for locking objects
+| `NumberOfTlsOffsetsNotUsedInNoncollectibleArray` | byte | Number of unused slots in noncollectible TLS array
+| `PtrArrayOffsetToDataArray` | TargetPointer | Offset from PtrArray class address to start of enclosed data array
+
+The contract additionally depends on these data descriptors
+
+| Data Descriptor Name | Field | Meaning |
+| --- | --- | --- |
+| `ExceptionInfo` | `PreviousNestedInfo` | Pointer to previous nested exception info |
+| `GCAllocContext` | `Pointer` | GC allocation pointer |
+| `GCAllocContext` | `Limit` | Allocation limit pointer |
+| `IdDispenser` | `HighestId` | Highest possible small thread ID |
+| `IdDispenser` | `IdToThread` | Array mapping small thread IDs to thread pointers |
+| `InflightTLSData` | `Next` | Pointer to next in-flight TLS data entry |
+| `InflightTLSData` | `TlsIndex` | TLS index for the in-flight static field |
+| `InflightTLSData` | `TLSData` | Object handle to the TLS data for the static field |
+| `ObjectHandle` | `Object` | Pointer to the managed object |
+| `RuntimeThreadLocals` | `AllocContext` | GC allocation context for the thread |
+| `TLSIndex` | `IndexOffset` | Offset index for thread local storage |
+| `TLSIndex` | `IndexType` | Type of thread local storage index |
+| `TLSIndex` | `IsAllocated` | Whether TLS storage has been allocated |
+| `TLSIndex` | `TLSIndexRawIndex` | Raw index value containing type and offset |
+| `Thread` | `Id` | Thread identifier |
+| `Thread` | `OSId` | Operating system thread identifier |
+| `Thread` | `State` | Thread state flags |
+| `Thread` | `PreemptiveGCDisabled` | Flag indicating if preemptive GC is disabled |
+| `Thread` | `Frame` | Pointer to current frame |
+| `Thread` | `TEB` | Thread Environment Block pointer |
+| `Thread` | `LastThrownObject` | Handle to last thrown exception object |
+| `Thread` | `LinkNext` | Pointer to get next thread |
+| `Thread` | `ExceptionTracker` | Pointer to exception tracking information |
+| `Thread` | `RuntimeThreadLocals` | Pointer to some thread-local storage |
+| `Thread` | `ThreadLocalDataPtr` | Pointer to thread local data structure |
+| `ThreadLocalData` | `NonCollectibleTlsData` | Count of non-collectible TLS data entries |
+| `ThreadLocalData` | `NonCollectibleTlsArrayData` | Pointer to non-collectible TLS array data |
+| `ThreadLocalData` | `CollectibleTlsData` | Count of collectible TLS data entries |
+| `ThreadLocalData` | `CollectibleTlsArrayData` | Pointer to collectible TLS array data |
+| `ThreadLocalData` | `InFlightData` | Pointer to in-flight TLS data for fields being initialized |
+| `ThreadStore` | `ThreadCount` | Number of threads |
+| `ThreadStore` | `FirstThreadLink` | Pointer to first thread in the linked list |
+| `ThreadStore` | `UnstartedCount` | Number of unstarted threads |
+| `ThreadStore` | `BackgroundCount` | Number of background threads |
+| `ThreadStore` | `PendingCount` | Number of pending threads |
+| `ThreadStore` | `DeadCount` | Number of dead threads |
``` csharp
+enum TLSIndexType
+{
+ NonCollectible = 0,
+ Collectible = 1,
+ DirectOnThreadLocalData = 2,
+};
+
ThreadStoreData GetThreadStoreData()
{
TargetPointer threadStore = target.ReadGlobalPointer("ThreadStore");
@@ -94,11 +138,11 @@ DacThreadStoreCounts GetThreadCounts()
ThreadData GetThreadData(TargetPointer address)
{
- var runtimeThread = new Thread(Target, threadPointer);
+ var runtimeThread = new Thread(target, threadPointer);
// Exception tracker is a pointer when EH funclets are enabled
- TargetPointer exceptionTrackerAddr = _target.ReadGlobal("FeatureEHFunclets") != 0
- ? _target.ReadPointer(address + /* Thread::ExceptionTracker offset */)
+ TargetPointer exceptionTrackerAddr = target.ReadGlobal("FeatureEHFunclets") != 0
+ ? target.ReadPointer(address + /* Thread::ExceptionTracker offset */)
: address + /* Thread::ExceptionTracker offset */;
TargetPointer firstNestedException = exceptionTrackerAddr != TargetPointer.Null
? target.ReadPointer(exceptionTrackerAddr + /* ExceptionInfo::PreviousNestedInfo offset*/)
@@ -129,9 +173,71 @@ ThreadData GetThreadData(TargetPointer address)
);
}
-TargetPointer GetManagedThreadObject(TargetPointer threadPointer)
+TargetPointer IThread.IdToThread(uint id)
+{
+ TargetPointer idDispenserPointer = target.ReadGlobalPointer(Constants.Globals.ThinlockThreadIdDispenser);
+ TargetPointer idDispenser = target.ReadPointer(idDispenserPointer);
+ uint HighestId = target.ReadPointer(idDispenser + /* IdDispenser::HighestId offset */);
+ TargetPointer threadPtr = TargetPointer.Null;
+ if (id < HighestId)
+ threadPtr = target.ReadPointer(idDispenser + /* IdDispenser::IdToThread offset + (index into IdToThread array * size of array elements (== size of target pointer)) */);
+ return threadPtr;
+}
+
+TargetPointer IThread.GetThreadLocalStaticBase(TargetPointer threadPointer, TargetPointer tlsIndexPtr)
{
- var runtimeThread = new Thread(Target, threadPointer);
- return Contracts.GCHandle.GetObject(new DacGCHandle(runtimeThread.m_ExposedObject));
+ // Get the thread's TLS base address
+ TargetPointer threadLocalDataPtr = target.ReadPointer(threadPointer + /* Thread::ThreadLocalDataPtr offset */);
+ if (threadLocalDataPtr == TargetPointer.Null)
+ return TargetPointer.Null;
+
+ Data.TLSIndex tlsIndex = new Data.TLSIndex(tlsIndexPtr);
+ if (!tlsIndex.IsAllocated)
+ return TargetPointer.Null;
+
+ TargetPointer threadLocalStaticBase = default;
+ int indexType = tlsIndex.IndexType;
+ int indexOffset = tlsIndex.IndexOffset;
+ switch ((TLSIndexType)indexType)
+ {
+ case TLSIndexType.NonCollectible:
+ int nonCollectibleCount = target.ReadPointer(threadLocalDataPtr + /* ThreadLocalData::NonCollectibleTlsDataCount offset */);
+ // bounds check
+ if (nonCollectibleCount > indexOffset)
+ {
+ TargetPointer nonCollectibleArray = target.ReadPointer(threadLocalDataPtr + /* ThreadLocalData::NonCollectibleTlsArrayData offset */);
+ int arrayIndex = indexOffset - target.ReadGlobal("NumberOfTlsOffsetsNotUsedInNoncollectibleArray");
+ TargetPointer arrayStartAddress = nonCollectibleArray + target.ReadGlobalPointer("PtrArrayOffsetToDataArray");
+ threadLocalStaticBase = target.ReadPointer(arrayStartAddress + (ulong)(arrayIndex * target.PointerSize));
+ }
+ break;
+ case TLSIndexType.Collectible:
+ int collectibleCount = target.ReadPointer(threadLocalDataPtr + /* ThreadLocalData::CollectibleTlsDataCount offset */);
+ if (collectibleCount > indexOffset)
+ {
+ TargetPointer collectibleArray = target.ReadPointer(threadLocalDataPtr + /* ThreadLocalData::CollectibleTlsArrayData offset */);
+ threadLocalStaticBase = target.ReadPointer(collectibleArray + (ulong)(indexOffset * target.PointerSize));
+ }
+ break;
+ case TLSIndexType.DirectOnThreadLocalData:
+ threadLocalStaticBase = threadLocalDataPtr;
+ break;
+ }
+ if (threadLocalStaticBase == TargetPointer.Null)
+ {
+ TargetPointer inFlightData = target.ReadPointer(threadLocalDataPtr + /* ThreadLocalData::inFlightData offset */);
+ while (inFlightData != TargetPointer.Null)
+ {
+ TargetPointer tlsIndexInFlightPtr = target.ReadPointer(inFlightData + /* InflightTLSData::TlsIndex offset */);
+ Data.TLSIndex tlsIndexInFlight = new Data.TLSIndex(tlsIndexInFlightPtr);
+ if (tlsIndexInFlight.TLSIndexRawIndex == tlsIndex.TLSIndexRawIndex)
+ {
+ threadLocalStaticBase = target.ReadPointer(tlsIndexInFlightPtr + /* InflightTLSData::TLSData offset */);
+ break;
+ }
+ inFlightData = target.ReadPointer(inFlightData + /* InflightTLSData::Next offset */);
+ }
+ }
+ return threadLocalStaticBase;
}
```
diff --git a/docs/design/datacontracts/debug_interface_globals.md b/docs/design/datacontracts/debug_interface_globals.md
new file mode 100644
index 00000000000000..c4d1348f138ce0
--- /dev/null
+++ b/docs/design/datacontracts/debug_interface_globals.md
@@ -0,0 +1,22 @@
+# Debug Interface Globals
+
+The following document lists the global variables that are used directly in the debug interface managed code (SOSDacImpl.cs, etc.)
+
+Global variables used
+| Global Name | Type | Purpose |
+| --- | --- | --- |
+| StringMethodTable | TargetPointer | Identify where the string MethodTable exists |
+| ObjectMethodTable | TargetPointer | Identify where the object MethodTable exists |
+| SystemDomain | TargetPointer | Identify where the SystemDomain exists |
+| DirectorySeparator | TargetPointer | Identify where the directory separator exists |
+| FeatureCOMInterop | TargetPointer | Identify where the flag for FeatureCOMInterop exists |
+| StressLog | TargetPointer | Identify where the StressLog exists |
+| AppDomain | TargetPointer | Identify where the AppDomain exists |
+| ObjectArrayMethodTable | TargetPointer | Identify where the ObjectArrayMethodTable exists |
+| ExceptionMethodTable | TargetPointer | Identify where the ExceptionMethodTable exists |
+| FreeObjectMethodTable | TargetPointer | Identify where the FreeObjectMethodTable exists |
+| SOSBreakingChangeVersion | TargetPointer | Identify where the SOSBreakingChangeVersion exists |
+| DacNotificationFlags | TargetPointer | Identify where the DacNotificationFlags exists |
+| MaxClrNotificationArgs | uint32 | Identify the maximum number of CLR notification arguments |
+| ClrNotificationArguments | TargetPointer | Identify where the ClrNotificationArguments exists |
+| DefaultADID | uint | Identify the default AppDomain ID |
diff --git a/docs/design/features/typemap.md b/docs/design/features/typemap.md
index 6501b3b0b33b8a..9e1e7572491625 100644
--- a/docs/design/features/typemap.md
+++ b/docs/design/features/typemap.md
@@ -134,7 +134,7 @@ Given the above types the following would take place.
`TypeMapAttribute` assembly attribute that declared the external type system name, a target
type, and optionally a "trim-target" to determine if the target
type should be included in the map. If the `TypeMapAttribute` constructor that doesn't
-take a trim-target is used, the "target type" will be treated as the "trim-target".
+take a trim-target is used the entry will always be emitted into the type map.
2. Types used in a managed-to-unmanaged interop operation would use `TypeMapAssociationAttribute`
to define a conditional link between the source and proxy type. In other words, if the
@@ -188,14 +188,12 @@ An entry in an External Type Map is included when the "trim target" type is refe
- The argument to the `isinst` IL instruction.
- The argument to the `castclass` IL instruction.
- The argument to the `box` instruction.
+ - If the trimming tool can determine that this box does not escape and could be stack allocated, it can ignore this `box` instruction and any corresponding `unbox` or `unbox.any` instructions.
- The argument to the `mkrefany` instruction.
- The argument to the `refanyval` instruction.
- The argument to the `newarr` instruction.
-- The argument to the `ldobj` instruction.
-- The argument to the `stobj` instruction.
-- The argument to the `.constrained` instruction prefix.
-- The type of a method argument to the `newobj` instruction.
-- The owning type of the method argument to `call`, `callvirt`, `ldftn`, or `ldvirtftn`.
+- The type of a method argument to the `newobj` instruction if it is a class type.
+- The owning type of an instance method argument to `call` or `ldftn`, or the owning type of any method argument to `callvirt` or `ldvirtftn`.
- If the owning type is an interface and the trimming tool can determine that there is only one implementation of the interface, it is free to interpret the method token argument as though it is the method on the only implementing type.
- The generic argument to the `Activator.CreateInstance` method.
- Calls to `Type.GetType` with a constant string representing the type name.
@@ -212,7 +210,6 @@ An entry in the Proxy Type Map is included when the "source type" is referenced
- The generic argument to the `Activator.CreateInstance` method.
- The argument to the `box` instruction.
- The argument to the `newarr` instruction.
-- The argument to the `.constrained` instruction prefix.
- The argument to the `mkrefany` instruction.
- The argument to the `refanyval` instruction.
@@ -221,3 +218,5 @@ If the type is an interface type and the user could possibly see a `RuntimeTypeH
- The argument to the `isinst` IL instruction.
- The argument to the `castclass` IL instruction.
- The owning type of the method argument to `callvirt`, or `ldvirtftn`.
+
+Finally, if the trimming tool determines that it is impossible to retrieve a `System.Type` instance the represents the "source type" at runtime, then the entry may be omitted from the Proxy Type Map as its existence is unobservable.
diff --git a/docs/design/mono/web/linear-ir.md b/docs/design/mono/web/linear-ir.md
index b72e6c28c911c1..4abb62d111ba7a 100644
--- a/docs/design/mono/web/linear-ir.md
+++ b/docs/design/mono/web/linear-ir.md
@@ -41,7 +41,7 @@ Each IR instruction is represented by a MonoInst structure. The fields of the st
- ins-\>opcode contains the opcode of the instruction. It is always set.
-- ins-\>dreg, ins-\>sreg1, ins-\>sreg2 contain the the destination and source vregs of the instruction. If the instruction doesn't have a destination/and our source, the corresponding field is set to -1.
+- ins-\>dreg, ins-\>sreg1, ins-\>sreg2 contain the destination and source vregs of the instruction. If the instruction doesn't have a destination/and our source, the corresponding field is set to -1.
- ins-\>backend is used for various purposes:
- for MonoInst's representing vtype variables, it indicates that the variable is in unmanaged format (used during marshalling)
diff --git a/docs/design/mono/web/soft-debugger-wire-format.md b/docs/design/mono/web/soft-debugger-wire-format.md
index 49facbc283df79..f49f395de0905d 100644
--- a/docs/design/mono/web/soft-debugger-wire-format.md
+++ b/docs/design/mono/web/soft-debugger-wire-format.md
@@ -392,7 +392,7 @@ Each command requires at least one TypeID (of type id) parameter before any addi
| GET_FIELD_CATTRS | 11 | Returns a list of custom attributes of a type's field. Custom attribute definition is given below. | Ask for a FieldID of one the type field and a TypeID of an custom attribute type | INVALID_TYPEID, INVALID_FIELDID |
| GET_PROPERTY_CATTRS | 12 | Returns a list of custom attributes of a type's property. Custom attribute definition is given below. | Ask for a PropertyID of one the type field and a TypeID of an custom attribute type | INVALID_TYPEID, INVALID_PROPERTYID |
| GET_SOURCE_FILES_2 | 13 | Returns a list of source file full paths (string) where the type is defined | None | INVALID_TYPEID |
-| GET_VALUES_2 | 14 | Returns a number of variant value equals to the number of FieldID that was passed as parameter. If the field had a ThreadStatic attribute applied to it, value fetched are from the thread parameter point of view. | Ask for an ObjectID representing a System.Thread instance and a list of FieldID representing this type static fields to the the value of. Only static field are supported. | INVALID_OBJECT, INVALID_TYPEID, INVALID_FIELDID |
+| GET_VALUES_2 | 14 | Returns a number of variant value equals to the number of FieldID that was passed as parameter. If the field had a ThreadStatic attribute applied to it, value fetched are from the thread parameter point of view. | Ask for an ObjectID representing a System.Thread instance and a list of FieldID representing this type static fields to the value of. Only static field are supported. | INVALID_OBJECT, INVALID_TYPEID, INVALID_FIELDID |
The main functions handling these commands are `type_commands` and `type_commands_internal` and are situated at `debugger-agent.c:6726` and `debugger-agent.c:6403` respectively.
diff --git a/docs/design/security/System.HashCode.md b/docs/design/security/System.HashCode.md
index fb177ac2d0c38d..946c611f409129 100644
--- a/docs/design/security/System.HashCode.md
+++ b/docs/design/security/System.HashCode.md
@@ -128,7 +128,7 @@ Concretely, in the face of adversarial input:
## Implementation
-The `HashCode` type uses the [**xxHash32**](https://github.com/Cyan4973/xxHash) algorithm, which is a non-cryptographic hash algorithm with a 32-bit seed and a 32-bit digest. All instances of the `HashCode` type use the same seed value, generated randomly at app start. This value is chosen independently of other random seed values in the runtime, such as the the global 64-bit seed used in `string.GetHashCode`'s Marvin32 routine.
+The `HashCode` type uses the [**xxHash32**](https://github.com/Cyan4973/xxHash) algorithm, which is a non-cryptographic hash algorithm with a 32-bit seed and a 32-bit digest. All instances of the `HashCode` type use the same seed value, generated randomly at app start. This value is chosen independently of other random seed values in the runtime, such as the global 64-bit seed used in `string.GetHashCode`'s Marvin32 routine.
The xxHash32 repo's README file touts good performance and avalanching. This can be validated through a simple C# program.
diff --git a/docs/design/tools/illink/compiler-generated-code-handling.md b/docs/design/tools/illink/compiler-generated-code-handling.md
index 4ed908db0eab76..df5661ea01ed96 100644
--- a/docs/design/tools/illink/compiler-generated-code-handling.md
+++ b/docs/design/tools/illink/compiler-generated-code-handling.md
@@ -95,6 +95,24 @@ static IEnumerable TestLocalVariable ()
}
```
+## Attribute propagation via CompilerLoweringPreserveAttribute
+
+To address the challenges of propagating user-authored attributes to compiler-generated code, .NET 10 introduced a general mechanism: `[CompilerLoweringPreserveAttribute]`. This attribute can be applied to other attribute types to instruct compilers to propagate those attributes to compiler-generated code.
+
+`DynamicallyAccessedMembersAttribute` is now marked with `[CompilerLoweringPreserve]`, so when the compiler generates new fields or type parameters (such as for local functions, iterator/async state machines, or primary constructor parameters), the relevant `DynamicallyAccessedMembers` annotations are automatically applied to the generated members. This allows trimming tools to directly use the annotations present in the generated code, without needing to reverse-engineer the mapping to user code.
+
+### .NET 10 and later
+
+For .NET 10 and later, trimming tools should rely on the compiler to propagate attributes such as `DynamicallyAccessedMembersAttribute` to all relevant compiler-generated code, as indicated by `[CompilerLoweringPreserve]`. No heuristics are needed for these assemblies. This isn't perfect because it's possible for such assemblies to be compiled with new Roslyn versions that could use different lowering strategies, so it's possible that the existing heuristics will break for new releases of a pre-`net10.0` assembly.
+
+To mitigate this there are a few options:
+
+1. Multitarget the library to `net10.0` (so that it is built with the new `CompilerLoweringPreserve` behavior and will avoid the heuristics)
+2. Fix the heuristics to work for code produced by new Roslyn versions
+3. The trimming tools could detect the presence of a polyfilled `DynamicallyAccessedMembersAttribute` type with `CompilerLoweringPreserve`. When present this would turn off the heuristics for the containing assembly.
+
+Another issue is that .NET 10 libraries might be built with `false`, and the tooling would not be able to detect the TargetFramework. Aside from setting `true`, mitigations 1. and 2. above would also apply to this scenario.
+
### Compiler dependent behavior
Since the problems are all caused by compiler generated code, the behaviors depend on the specific compiler in use. The main focus of this document is the Roslyn C# compiler right now. Mainly since it's by far the most used compiler for .NET code. That said, we would like to design the solution in such a way that other compilers using similar patterns could also benefit from it.
@@ -560,9 +578,9 @@ and fields on the closure types.
### Long term solution
Detecting which compiler generated items are used by any given user method is currently relatively tricky.
-There's no definitive marker in the IL which would let the trimmer confidently determine this information.
-Good long term solution will need the compilers to produce some kind of marker in the IL so that
-static analysis tools can reliably detect all of the compiler generated items.
+There's no definitive marker in the IL which would let the trimmer confidently determine this information
+for all of the above cases. Good long term solution will need the compilers to produce some kind of marker
+in the IL so that static analysis tools can reliably detect all of the compiler generated items.
This ask can be described as:
For a given user method, ability to determine all of the items (methods, fields, types, IL code) which were
@@ -573,6 +591,10 @@ helpers and other infrastructure which may be needed but is not directly attribu
This should be enough to implement solutions for both suppression propagation and data flow analysis.
+For `DynamicallyAccessedMembersAttribute`, we have a long-term solution that relies on the
+`[CompilerLoweringPreserve]` attribute, which tells Roslyn to propagate `DynamicallyAccessedMembers`
+annotations to compiler-generated code.
+
### Possible short term solution
#### Heuristic based solution
diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md
index 0b3da600c53b13..bb6a670802c733 100644
--- a/docs/project/list-of-diagnostics.md
+++ b/docs/project/list-of-diagnostics.md
@@ -116,6 +116,7 @@ The PR that reveals the implementation of the ` are obsolete. Use the new ones that take an IComparer\. |
+| __`SYSLIB0062`__ | XSLT Script blocks are not supported. |
## Analyzer Warnings
@@ -296,7 +297,7 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL
APIs can be marked as `[Experimental]` if their shape or functionality is included in a release but not yet officially supported. Experimental APIs offer the opportunity to collect customer feedback on these APIs in a major release, usually refining the APIs and removing the `[Experimental]` attribute in the next release. The `[Experimental]` attribute differs from `[RequiresPreviewFeatures]`, wherein:
* `[RequiresPreviewFeatures]` APIs require a corresponding preview feature in another product area such as the compiler or SDK
- - Using these APIs requires enabling preview features for the the project and all its consumers
+ - Using these APIs requires enabling preview features for the project and all its consumers
* `[Experimental]` APIs are self-contained within the libraries and do not require preview features in other parts of the product
- These APIs can be used by suppressing specific diagnostics without enabling preview features for the project
diff --git a/docs/workflow/building/coreclr/android.md b/docs/workflow/building/coreclr/android.md
index 3a6769d062acdc..473ee4a2b05a09 100644
--- a/docs/workflow/building/coreclr/android.md
+++ b/docs/workflow/building/coreclr/android.md
@@ -1,23 +1,29 @@
# Experimental support of CoreCLR on Android
-This is the internal documentation which outlines experimental support of CoreCLR on Android and includes instructions on how to:
-- [Build CoreCLR for Android](./android.md#building-coreclr-for-android)
-- [Build and run a sample application with CoreCLR](./android.md#building-and-running-a-sample-app)
-- [Debug the sample app and the runtime](./android.md#debugging-the-runtime-and-the-sample-app)
-
-## Prerequisite
-
-- Download and install [OpenJDK 23](https://openjdk.org/projects/jdk/23/)
-- Download and install [Android Studio](https://developer.android.com/studio/install) and the following:
- - Android SDK (minimum supported API level is 21)
- - Android NDK r27
-
-> [!NOTE]
-> Prerequisites can also be downloaded and installed manually:
-> - by running the automated script as described in [Testing Libraries on Android](../../testing/libraries/testing-android.md#using-a-terminal)
-> - by downloading the archives:
-> - Android SDK - Download [command-line tools](https://developer.android.com/studio#command-line-tools-only) and use `sdkmanager` to download the SDK.
-> - Android NDK - Download [NDK](https://developer.android.com/ndk/downloads)
+This is the internal documentation which outlines experimental support of CoreCLR on Android.
+
+## Table of Contents
+
+- [Prerequisite](#prerequisite)
+- [Building CoreCLR for Android](#building-coreclr-for-android)
+ - [MacOS and Linux](#macos-and-linux)
+ - [Requirements](#requirements)
+ - [Building the runtime, libraries and tools](#building-the-runtime-libraries-and-tools)
+ - [Windows + WSL2](#windows--wsl2)
+ - [Windows requirements](#windows-requirements)
+ - [WSL requirements](#wsl-requirements)
+ - [Building the runtime, libraries and tools](#building-the-runtime-libraries-and-tools-1)
+- [Building and running a sample app](#building-and-running-a-sample-app)
+ - [Building HelloAndroid sample](#building-helloandroid-sample)
+ - [Running HelloAndroid sample on an emulator](#running-helloandroid-sample-on-an-emulator)
+ - [WSL2](#wsl2)
+- [Building and running tests on an emulator](#building-and-running-tests-on-an-emulator)
+- [Debugging the runtime and the sample app](#debugging-the-runtime-and-the-sample-app)
+ - [Steps](#steps)
+- [See also](#see-also)
+- [Troubleshooting](#troubleshooting)
+ - [Android samples or functional tests fail to build](#android-samples-or-functional-tests-fail-to-build)
+ - [java.lang.NullPointerException: Cannot invoke String.length()](#javalangnullpointerexception-cannot-invoke-stringlength)
## Building CoreCLR for Android
@@ -34,11 +40,23 @@ Supported target architectures:
### MacOS and Linux
-#### Requirements
+#### Prerequisites
+
+- Download and install [OpenJDK 23](https://openjdk.org/projects/jdk/23/)
+- Download and install [Android Studio](https://developer.android.com/studio/install) and the following:
+ - Android SDK (minimum supported API level is 21)
+ - Android NDK r27c
+
+> [!NOTE]
+> Prerequisites can also be downloaded and installed manually:
+> - An automated script as described in [Testing Libraries on Android](../../testing/libraries/testing-android.md#using-a-terminal)
+> - Downloading the archives:
+> - Android SDK - Download [command-line tools](https://developer.android.com/studio#command-line-tools-only) and use `sdkmanager` to download the SDK.
+> - Android NDK - Download [NDK](https://developer.android.com/ndk/downloads)
Set the following environment variables:
- - ANDROID_SDK_ROOT=``
- - ANDROID_NDK_ROOT=``
+ - `export ANDROID_SDK_ROOT=`
+ - `export ANDROID_NDK_ROOT=`
#### Building the runtime, libraries and tools
@@ -57,22 +75,32 @@ To build CoreCLR runtime NuGet packages, run the following command from ` [!NOTE]
> The runtime packages will be located at: `/artifacts/packages//Shipping/`
-### Windows
+### Windows + WSL2
Building on Windows is not directly supported yet. However it is possible to use WSL2 for this purpose.
-#### WSL2
+#### Windows prerequisites
+
+- Download and install [Android Studio](https://developer.android.com/studio/install)
+- Enable [long paths](../../requirements/windows-requirements.md#enable-long-paths)
-##### Requirements
+#### WSL prerequisites
-1. Install the Android SDK and NDK in WSL per the [prerequisites](#prerequisite). This can be done by downloading the archives or using Android Studio.
+1. Follow [linux-requirements.md](../../requirements/linux-requirements.md).
+2. Install OpenJDK, Android SDK and Android NDK in as described in [Linux prerequisites](#prerequisites). There is a convenient automated script, but it can also be done manually by downloading the archives or using Android Studio.
- In case of Android Studio:
- Make sure WSL is updated: from Windows host, `wsl --update`
- [Enabled systemd](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#set-the-systemd-flag-set-in-your-wsl-distro-settings)
- `sudo snap install android-studio --classic`
-2. Set the following environment variables:
- - ANDROID_SDK_ROOT=``
- - ANDROID_NDK_ROOT=``
+- For Ubuntu, OpenJDK 21 is sufficient:
+
+```
+apt install openjdk-21-jdk
+```
+
+3. Set the following environment variables:
+ - `export ANDROID_SDK_ROOT=`
+ - `export ANDROID_NDK_ROOT=`
#### Building the runtime, libraries and tools
@@ -84,9 +112,7 @@ To build CoreCLR runtime, libraries and tools, run the following command from `<
## Building and running a sample app
-To demonstrate building and running an Android sample application with CoreCLR, we will use:
-- the [HelloAndroid sample app](../../../../src/mono/sample/Android/AndroidSampleApp.csproj).
-- a functional tests [Android.Device_Emulator.JIT.Test](../../../../src/tests/FunctionalTests/Android/Device_Emulator/JIT/Android.Device_Emulator.JIT.Test.csproj)
+To demonstrate building and running an Android application with CoreCLR, we will use the [HelloAndroid sample app](../../../../src/mono/sample/Android/AndroidSampleApp.csproj).
A prerequisite for building and running samples locally is to have CoreCLR successfully built for desired Android platform.
@@ -128,30 +154,24 @@ The app can be run on an emulator running on the Windows host.
2. In Windows, create and start an emulator
3. In WSL, swap the `adb` from the Android SDK in WSL2 with that from Windows
- `mv $ANDROID_SDK_ROOT/platform-tools/adb $ANDROID_SDK_ROOT/platform-tools/adb-orig`
- - `ln -s /mnt/ $ANDROID_SDK_ROOT/platform-tools/adb`
+ - `ln -s /mnt//platform-tools/adb.exe $ANDROID_SDK_ROOT/platform-tools/adb`
+ - On Windows host, you can find the SDK location in Android Studio's SDK Manager.
4. In WSL, Make xharness use the `adb` corresponding to the Windows host:
- `export ADB_EXE_PATH=$ANDROID_SDK_ROOT/platform-tools/adb`
5. In WSL, run the `make` command as [above](#running-helloandroid-sample-on-an-emulator)
-### Building and running functional tests on an emulator
+## Building and running tests on an emulator
-Similarly to the `HelloAndroid` sample, it is possible to build and run a functional test on Android with CoreCLR on an emulator.
+To demonstrate building and running tests on CoreCLR Android, we will use the [Android.Device_Emulator.JIT.Test](../../../../src/tests/FunctionalTests/Android/Device_Emulator/JIT/Android.Device_Emulator.JIT.Test.csproj) test project.
-To build and run a functional test on Android with CoreCLR, run the following command from ``:
+To build and run the test on Android with CoreCLR, run the following command from ``:
```
-./dotnet.sh build -c Release src/tests/FunctionalTests/Android/Device_Emulator/JIT/Android.Device_Emulator.JIT.Test.csproj /p:TargetOS=android /p:TargetArchitecture=arm64 /t:Test /p:RuntimeFlavor=coreclr
+./dotnet.sh build -c src/tests/FunctionalTests/Android/Device_Emulator/JIT/Android.Device_Emulator.JIT.Test.csproj /p:TargetOS=android /p:TargetArchitecture= /t:Test /p:RuntimeFlavor=coreclr
```
> [!NOTE]
-> Similarly to the `HelloAndroid` sample the emulator needs to be up and running.
-
-### Useful make commands
-
-For convenience it is possible to run a single make command which builds all required dependencies, the app and runs it:
-```
-make BUILD_CONFIG= TARGET_ARCH= RUNTIME_FLAVOR=CoreCLR DEPLOY_AND_RUN=true all -C src/mono/sample/Android
-```
+> Similarly to the `HelloAndroid` sample, the emulator needs to be up and running.
## Debugging the runtime and the sample app
@@ -191,6 +211,8 @@ Similar instructions for debugging Android apps with Mono runtime can be found [
### Android samples or functional tests fail to build
+#### java.lang.NullPointerException: Cannot invoke String.length()
+
If multiple JDKs are installed on your system, you may encounter the following error:
```
diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md
index cb22d31172780a..c2831776940417 100644
--- a/docs/workflow/requirements/linux-requirements.md
+++ b/docs/workflow/requirements/linux-requirements.md
@@ -95,6 +95,10 @@ If you're planning to use your environment to do Linux cross-building to other a
- `qemu`
- `qemu-user-static`
+```bash
+apt install binfmt-support debootstrap qemu qemu-user-static
+```
+
### Fedora
These instructions are written assuming *Fedora 40*.
diff --git a/docs/workflow/requirements/macos-requirements.md b/docs/workflow/requirements/macos-requirements.md
index 67e7840a64d1be..cd1aed4b8f142b 100644
--- a/docs/workflow/requirements/macos-requirements.md
+++ b/docs/workflow/requirements/macos-requirements.md
@@ -18,7 +18,6 @@ To build the runtime repo, you will also need to install the following dependenc
- `CMake` 3.20 or newer
- `icu4c`
-- `openssl@1.1` or `openssl@3`
- `pkg-config`
- `python3`
- `ninja` (This one is optional. It is an alternative tool to `make` for building native code)
diff --git a/docs/workflow/requirements/windows-requirements.md b/docs/workflow/requirements/windows-requirements.md
index aa2c54c3976a18..922824f274bb9f 100644
--- a/docs/workflow/requirements/windows-requirements.md
+++ b/docs/workflow/requirements/windows-requirements.md
@@ -46,9 +46,9 @@ It is highly recommended to use the *Workloads* approach, as that installs the f
- .NET desktop development
- Desktop development with C++
-To build the tests and do ARM32/ARM64 development, you'll need some additional components. You can find them by clicking on the *Individual components* tab in the *Visual Studio Installer*:
+To build the tests and do ARM64 development, you'll need some additional components. You can find them by clicking on the *Individual components* tab in the *Visual Studio Installer*:
-- For ARM stuff: *MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)* for Arm64, and *MSVC v143 - VS 2022 C++ ARM build tools (Latest)* for Arm32.
+- For Arm64: *MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)*
- For building tests: *C++/CLI support for v143 build tools (Latest)*
Alternatively, there is also a `.vsconfig` file included at the root of the runtime repo. It includes all the necessary components required, outlined in a JSON format that Visual Studio can read and parse. You can boot up Visual Studio directly and [import this `.vsconfig` file](https://learn.microsoft.com/visualstudio/install/import-export-installation-configurations?view=vs-2022#import-a-configuration) instead of installing the workloads yourself. It is worth mentioning however, that while we are very careful in maintaining this file up-to-date, sometimes it might get a tad obsolete and miss important components. So, it is always a good idea to double check that the full workloads are installed.
diff --git a/docs/workflow/testing/coreclr/running-arm32-tests.md b/docs/workflow/testing/coreclr/running-arm32-tests.md
new file mode 100644
index 00000000000000..c7bac99960c921
--- /dev/null
+++ b/docs/workflow/testing/coreclr/running-arm32-tests.md
@@ -0,0 +1,36 @@
+# Running ARM32 tests on modern hardware
+
+One of our supported targets is 32-bit ARM. It can be quite challenging to construct a realistic ARM32 environment where you can build or run tests in a reasonable amount of time. Thankfully, it's possible to configure an ARM64 linux environment so that you can cross-build from ARM64 to ARM32, and run tests there using native hardware support instead of software emulation. This is not possible on ARM64-based Windows (this functionality is not offered by the OS).
+
+## Configuring your ARM64 environment to run ARM32 binaries
+
+By default your ARM64 Linux install probably doesn't have support for ARM32 binaries enabled, which will cause running the binaries to fail with a cryptic error. So you'll need to add the architecture to dpkg and install some core userspace libraries that CoreCLR will need to actually run your tests, which on Debian or Ubuntu will look like:
+
+```bash
+$ sudo dpkg --add-architecture armhf
+
+$ sudo apt-get update
+Reading package lists... Done
+
+$ sudo apt-get install libc6:armhf libstdc++6:armhf libicu74:armhf
+The following additional packages will be installed:
+```
+
+Note that when installing a package for another architecture, you need to suffix the package name with the architecture name. For me, the three packages above were sufficient to run an ARM32 JIT test.
+
+## Cross-building for ARM32 on ARM64
+
+Follow the steps from https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/cross-building.md#linux-cross-building as-is. You should end up with a `linux.arm` `Core_Root` and test artifacts.
+
+## Running an ARM32 test in your ARM64 environment
+
+We're finally ready to go, probably. Export an environment variable to point to your ARM32 core root, and then run your test, i.e.:
+
+```bash
+$ export CORE_ROOT=/home/kg/runtime/artifacts/tests/coreclr/linux.arm.Release/Tests/Core_Root/
+
+$ bash artifacts/tests/coreclr/linux.arm.Release/JIT/Directed/StructABI/StructABI/StructABI.sh
+BEGIN EXECUTION
+/home/kg/runtime/artifacts/tests/coreclr/linux.arm.Release/Tests/Core_Root//corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true StructABI.dll ''
+Issue80393_HFA failed. Retval: f1=1 f3=3
+```
diff --git a/docs/workflow/testing/libraries/testing-android.md b/docs/workflow/testing/libraries/testing-android.md
index 9b138a0b61b5b1..1afa6786c46199 100644
--- a/docs/workflow/testing/libraries/testing-android.md
+++ b/docs/workflow/testing/libraries/testing-android.md
@@ -23,9 +23,9 @@ Android SDK and NDK can be automatically installed via the following script:
set -e
NDK_VER=r27c
-SDK_VER=9123335_latest
-SDK_API_LEVEL=33
-SDK_BUILD_TOOLS=33.0.1
+ANDROID_CLI_TOOLS_VER=13114758_latest
+SDK_API_LEVEL=36
+SDK_BUILD_TOOLS=36.0.0
if [[ "$OSTYPE" == "darwin"* ]]; then
HOST_OS=darwin
@@ -45,7 +45,7 @@ unzip ~/andk.zip -d $(dirname ${ANDROID_NDK_ROOT}) && rm -rf ~/andk.zip
# download Android SDK, accept licenses and download additional packages such as
# platform-tools, platforms and build-tools
export ANDROID_SDK_ROOT=~/android-sdk
-curl https://dl.google.com/android/repository/commandlinetools-${HOST_OS_SHORT}-${SDK_VER}.zip -L --output ~/asdk.zip
+curl https://dl.google.com/android/repository/commandlinetools-${HOST_OS_SHORT}-${ANDROID_CLI_TOOLS_VER}.zip -L --output ~/asdk.zip
mkdir ${ANDROID_SDK_ROOT} && unzip ~/asdk.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && rm -rf ~/asdk.zip
yes | ${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses
${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "platform-tools" "platforms;android-${SDK_API_LEVEL}" "build-tools;${SDK_BUILD_TOOLS}"
diff --git a/docs/workflow/testing/using-dev-shipping-packages.md b/docs/workflow/testing/using-dev-shipping-packages.md
index d09bd7b27f6fbd..2c90c1e0118a6e 100644
--- a/docs/workflow/testing/using-dev-shipping-packages.md
+++ b/docs/workflow/testing/using-dev-shipping-packages.md
@@ -118,11 +118,9 @@ Console.WriteLine($"The location of System.Private.CoreLib.dll is '{typeof(objec
The following command will build and publish your app:
```cmd
-dotnet publish -r win-x64
+dotnet publish --self-contained
```
-Adjust the `win-x64` to match your machine's OS and architecture.
-
Running this little app should yield an output like the following:
```text
diff --git a/eng/SignCheckExclusionsFile.txt b/eng/SignCheckExclusionsFile.txt
deleted file mode 100644
index f41753338155eb..00000000000000
--- a/eng/SignCheckExclusionsFile.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-;; Exclusions for SignCheck. Corresponds to info in Signing.props.
-;; Format: https://github.com/dotnet/arcade/blob/397316e195639450b6c76bfeb9823b40bee72d6d/src/SignCheck/Microsoft.SignCheck/Verification/Exclusion.cs#L23-L35
-;;
-;; This issue tracks a way to implement exclusions via Signing.props and avoid this extra file: https://github.com/dotnet/arcade/issues/2888
-
-;; The apphost and comhost are template files, modified by the SDK to produce the executable for FDE
-;; and SCD apps. If they are signed, the file that the SDK produces has an invalid signature and
-;; can't be signed again. More info at https://github.com/dotnet/core-setup/pull/7549.
-*apphost.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
-*singlefilehost.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
-*comhost.dll;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
-*apphosttemplateapphostexe.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
-*comhosttemplatecomhostdll.dll;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
-*staticapphosttemplateapphostexe.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
-*dotnet.js;;Workaround, https://github.com/dotnet/core-eng/issues/9933
\ No newline at end of file
diff --git a/eng/Subsets.props b/eng/Subsets.props
index c0d6664a1fc7d4..5770eec315eb4d 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -47,7 +47,7 @@
true
- <_NativeAotSupportedOS Condition="'$(TargetOS)' == 'windows' or '$(TargetOS)' == 'linux' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'freebsd'">true
+ <_NativeAotSupportedOS Condition="'$(TargetOS)' != 'browser' and '$(TargetOS)' != 'haiku' and '$(TargetOS)' != 'illumos' and '$(TargetOS)' != 'netbsd' and '$(TargetOS)' != 'solaris'">true
<_NativeAotSupportedArch Condition="'$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'loongarch64' or '$(TargetArchitecture)' == 'riscv64' or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' == 'x86')">true
true
@@ -71,6 +71,7 @@
clr+mono+libs+tools+host+packsmono+libs+packsclr+mono+libs+host+packs
+ clr.nativeaotruntime+clr.nativeaotlibs+mono+libs+packsclr.nativeaotruntime+clr.nativeaotlibs+mono+libs+packsclr.nativeaotruntime+clr.nativeaotlibs+mono+libs+host+packsclr.nativeaotruntime+clr.nativeaotlibs+libs+packs
@@ -153,9 +154,21 @@
$(BootstrapSubsets)+clr.nativeaotlibs+clr.nativeaotruntime+libs.nativetrue
+
+
+ clr.nativeprereqs+clr.iltools+clr.runtime+clr.native+clr.aot+clr.nativeaotlibs+clr.nativeaotruntime+clr.crossarchtools
+ $(AllSubsetsExpansion)+clr.paltests+clr.paltestlist+clr.hosts+clr.jit+clr.alljits+clr.alljitscommunity+clr.spmi+clr.corelib+clr.nativecorelib+clr.tools+clr.toolstests+clr.packages
+ $(AllSubsetsExpansion)+linuxdac+alpinedac
+ $(AllSubsetsExpansion)+mono.runtime+mono.emsdk+mono.aotcross+mono.corelib+mono.manifests+mono.packages+mono.tools+mono.wasmruntime+mono.wasiruntime+mono.wasmworkload+mono.mscordbi+mono.workloads
+ $(AllSubsetsExpansion)+tools.illink+tools.cdac+tools.illinktests+tools.cdactests
+ $(AllSubsetsExpansion)+host.native+host.pkg+host.tools+host.pretest+host.tests
+ $(AllSubsetsExpansion)+libs.native+libs.sfx+libs.oob+libs.pretest+libs.tests
+ $(AllSubsetsExpansion)+packs.product+packs.installers+packs.tests
+ $(AllSubsetsExpansion)+regeneratedownloadtable+regeneratethirdpartynotices+tasks
+ <_subset>$(_subset.Replace('+allsubsets+', '+$(AllSubsetsExpansion)+'))
<_subset>$(_subset.Replace('+clr.paltests+', '+clr.paltests+clr.paltestlist+'))
<_subset>$(_subset.Replace('+clr+', '+$(DefaultCoreClrSubsets)+'))
<_subset>$(_subset.Replace('+clr.aot+', '+$(DefaultNativeAotSubsets)+'))
@@ -264,6 +277,9 @@
+
+
+
@@ -640,8 +656,9 @@
<_BuildCoreCLRRuntimePack Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(CoreCLRSupported)' == 'true'">true
<_BuildMonoRuntimePack Condition="'$(RuntimeFlavor)' == 'Mono' and '$(MonoSupported)' == 'true'">true
<_BuildHostPack Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">true
- <_BuildCdacPack Condition="'$(_CDacToolsBuilt)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true' and '$(TargetsLinuxMusl)' != 'true' and ('$(TargetOS)' == 'windows' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'linux')">true
- <_BuildCdacPack Condition="'$(DotNetBuildSourceOnly)' == 'true' or '$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'armel' or '$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'riscv64'">false
+ <_BuildCdacPack Condition="'$(_CDacToolsBuilt)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true' and ('$(TargetOS)' == 'windows' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'linux')">true
+
+ <_BuildCdacPack Condition="'$(DotNetBuildSourceOnly)' == 'true' or '$(TargetsLinuxMusl)' == 'true'">false
<_BuildBundle Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">true
diff --git a/eng/Version.Details.props b/eng/Version.Details.props
new file mode 100644
index 00000000000000..eebe1bbe032748
--- /dev/null
+++ b/eng/Version.Details.props
@@ -0,0 +1,237 @@
+
+
+
+
+
+ 10.0.0-preview.6.25302.1
+
+ 4.9.0-rc2.21473.1
+
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+ 19.1.0-alpha.1.25167.1
+
+ 5.0.0-2.25418.105
+ 5.0.0-2.25418.105
+ 5.0.0-2.25418.105
+ 10.0.0-preview.25418.105
+ 10.0.100-rc.1.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 0.11.5-alpha.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 10.0.0-beta.25418.105
+ 2.9.3-beta.25418.105
+ 2.9.3-beta.25418.105
+ 10.0.0-beta.25418.105
+ 5.0.0-2.25418.105
+ 10.0.0-rc.1.25418.105
+ 10.0.100-rc.1.25418.105
+ 10.0.0-rc.1.25418.105
+ 10.0.0-rc.1.25418.105
+ 7.0.0-preview.1.41905
+ 7.0.0-preview.1.41905
+ 7.0.0-preview.1.41905
+ 7.0.0-preview.1.41905
+ 10.0.0-rc.1.25418.105
+ 2.0.0-rc.1.25418.105
+ 10.0.0-rc.1.25418.105
+ 10.0.0-rc.1.25418.105
+ 10.0.0-rc.1.25418.105
+
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+ 10.0.0-beta.25310.1
+
+ 10.0.0-prerelease.25405.1
+ 10.0.0-prerelease.25405.1
+ 10.0.0-prerelease.25405.1
+
+ 1.0.0-prerelease.25413.5
+ 1.0.0-prerelease.25413.5
+ 1.0.0-prerelease.25413.5
+ 1.0.0-prerelease.25413.5
+ 1.0.0-prerelease.25413.5
+ 1.0.0-prerelease.25413.5
+
+ 10.0.0-alpha.0.25302.2
+
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+ 10.0.0-alpha.1.25169.1
+
+
+
+
+ $(MicrosoftNETCoreRuntimeICUTransportPackageVersion)
+
+ $(SystemServiceModelPrimitivesPackageVersion)
+
+ $(runtimelinuxarm64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+ $(runtimelinuxmuslarm64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimelinuxmuslarm64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimelinuxmuslarm64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimelinuxmuslarm64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+ $(runtimelinuxmuslx64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimelinuxmuslx64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimelinuxmuslx64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimelinuxmuslx64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+ $(runtimelinuxx64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+ $(runtimeosxarm64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimeosxarm64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimeosxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimeosxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+ $(runtimeosxx64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimeosxx64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimeosxx64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimeosxx64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+ $(runtimewinarm64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimewinx64MicrosoftNETCoreRuntimeJITToolsPackageVersion)
+ $(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMLibclangPackageVersion)
+ $(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkPackageVersion)
+ $(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsPackageVersion)
+
+ $(MicrosoftCodeAnalysisPackageVersion)
+ $(MicrosoftCodeAnalysisAnalyzersPackageVersion)
+ $(MicrosoftCodeAnalysisCSharpPackageVersion)
+ $(MicrosoftCodeAnalysisNetAnalyzersPackageVersion)
+ $(MicrosoftDotNetApiCompatTaskPackageVersion)
+ $(MicrosoftDotNetArcadeSdkPackageVersion)
+ $(MicrosoftDotNetBuildTasksArchivesPackageVersion)
+ $(MicrosoftDotNetBuildTasksFeedPackageVersion)
+ $(MicrosoftDotNetBuildTasksInstallersPackageVersion)
+ $(MicrosoftDotNetBuildTasksPackagingPackageVersion)
+ $(MicrosoftDotNetBuildTasksTargetFrameworkPackageVersion)
+ $(MicrosoftDotNetBuildTasksTemplatingPackageVersion)
+ $(MicrosoftDotNetBuildTasksWorkloadsPackageVersion)
+ $(MicrosoftDotNetCecilPackageVersion)
+ $(MicrosoftDotNetCodeAnalysisPackageVersion)
+ $(MicrosoftDotNetGenAPIPackageVersion)
+ $(MicrosoftDotNetGenFacadesPackageVersion)
+ $(MicrosoftDotNetHelixSdkPackageVersion)
+ $(MicrosoftDotNetPackageTestingPackageVersion)
+ $(MicrosoftDotNetRemoteExecutorPackageVersion)
+ $(MicrosoftDotNetSharedFrameworkSdkPackageVersion)
+ $(MicrosoftDotNetXliffTasksPackageVersion)
+ $(MicrosoftDotNetXUnitAssertPackageVersion)
+ $(MicrosoftDotNetXUnitConsoleRunnerPackageVersion)
+ $(MicrosoftDotNetXUnitExtensionsPackageVersion)
+ $(MicrosoftNetCompilersToolsetPackageVersion)
+ $(MicrosoftNETSdkILPackageVersion)
+ $(MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportPackageVersion)
+ $(MicrosoftNETCoreAppRefPackageVersion)
+ $(MicrosoftNETCoreILAsmPackageVersion)
+ $(NuGetFrameworksPackageVersion)
+ $(NuGetPackagingPackageVersion)
+ $(NuGetProjectModelPackageVersion)
+ $(NuGetVersioningPackageVersion)
+ $(runtimenativeSystemIOPortsPackageVersion)
+ $(SystemCommandLinePackageVersion)
+ $(SystemReflectionMetadataPackageVersion)
+ $(SystemReflectionMetadataLoadContextPackageVersion)
+ $(SystemTextJsonPackageVersion)
+
+ $(MicrosoftDotNetCilStripSourcesPackageVersion)
+ $(MicrosoftNETHostModelTestDataPackageVersion)
+ $(SystemComponentModelTypeConverterTestDataPackageVersion)
+ $(SystemDataCommonTestDataPackageVersion)
+ $(SystemDrawingCommonTestDataPackageVersion)
+ $(SystemFormatsTarTestDataPackageVersion)
+ $(SystemIOCompressionTestDataPackageVersion)
+ $(SystemIOPackagingTestDataPackageVersion)
+ $(SystemNetTestDataPackageVersion)
+ $(SystemPrivateRuntimeUnicodeDataPackageVersion)
+ $(SystemRuntimeNumericsTestDataPackageVersion)
+ $(SystemRuntimeTimeZoneDataPackageVersion)
+ $(SystemSecurityCryptographyX509CertificatesTestDataPackageVersion)
+ $(SystemTextRegularExpressionsTestDataPackageVersion)
+ $(SystemWindowsExtensionsTestDataPackageVersion)
+
+ $(MicrosoftDotNetXHarnessCLIPackageVersion)
+ $(MicrosoftDotNetXHarnessTestRunnersCommonPackageVersion)
+ $(MicrosoftDotNetXHarnessTestRunnersXunitPackageVersion)
+
+ $(optimizationlinuxarm64MIBCRuntimePackageVersion)
+ $(optimizationlinuxx64MIBCRuntimePackageVersion)
+ $(optimizationPGOCoreCLRPackageVersion)
+ $(optimizationwindows_ntarm64MIBCRuntimePackageVersion)
+ $(optimizationwindows_ntx64MIBCRuntimePackageVersion)
+ $(optimizationwindows_ntx86MIBCRuntimePackageVersion)
+
+ $(MicrosoftDotNetHotReloadUtilsGeneratorBuildToolPackageVersion)
+
+ $(runtimelinuxarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimelinuxmuslarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimelinuxmuslx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimelinuxx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimeosxarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimeosxx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimewinarm64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+ $(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index cc791158eb2c5c..2ea152526c443f 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,5 +1,5 @@
-
+ https://github.com/dotnet/icu
@@ -41,91 +41,91 @@
https://github.com/dotnet/llvm-projectda5dd054a531e6fea65643b7e754285b73eab433
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301https://github.com/dotnet/runtime-assets
@@ -263,65 +263,65 @@
https://github.com/dotnet/llvm-projectda5dd054a531e6fea65643b7e754285b73eab433
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/xharness
- e85bb14e85357ab678c2bcb0b6f2bac634fdd49b
+ 4c17e23fcb7575baa9de575e5a96258096cbaea1
-
+ https://github.com/dotnet/xharness
- e85bb14e85357ab678c2bcb0b6f2bac634fdd49b
+ 4c17e23fcb7575baa9de575e5a96258096cbaea1
-
+ https://github.com/dotnet/xharness
- e85bb14e85357ab678c2bcb0b6f2bac634fdd49b
+ 4c17e23fcb7575baa9de575e5a96258096cbaea1
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- a68196f69e40740fce716778138acaa26488b333
+ e7f12ca10fc5b13e4ebc33244b585081da7f8bfb
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- a68196f69e40740fce716778138acaa26488b333
+ e7f12ca10fc5b13e4ebc33244b585081da7f8bfb
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- a68196f69e40740fce716778138acaa26488b333
+ e7f12ca10fc5b13e4ebc33244b585081da7f8bfb
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- a68196f69e40740fce716778138acaa26488b333
+ e7f12ca10fc5b13e4ebc33244b585081da7f8bfbhttps://github.com/dotnet/hotreload-utils
@@ -331,55 +331,55 @@
https://github.com/dotnet/runtime-assets385d085eb055cabeaed3dde958a900e7b31cf6ce
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://github.com/dotnet/dotnet
- eaa19c281d34580a8168cff9ce1e7337da8bfe4f
+ 5c3434d8b831745673c31e186906f463e1036301
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- a68196f69e40740fce716778138acaa26488b333
+ e7f12ca10fc5b13e4ebc33244b585081da7f8bfb
-
+ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- a68196f69e40740fce716778138acaa26488b333
+ e7f12ca10fc5b13e4ebc33244b585081da7f8bfb
-
- https://github.com/NuGet/NuGet.Client
- 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8
+
+ https://github.com/dotnet/dotnet
+ 5c3434d8b831745673c31e186906f463e1036301
-
- https://github.com/NuGet/NuGet.Client
- 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8
+
+ https://github.com/dotnet/dotnet
+ 5c3434d8b831745673c31e186906f463e1036301
-
- https://github.com/NuGet/NuGet.Client
- 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8
+
+ https://github.com/dotnet/dotnet
+ 5c3434d8b831745673c31e186906f463e1036301
-
- https://github.com/NuGet/NuGet.Client
- 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8
+
+ https://github.com/dotnet/dotnet
+ 5c3434d8b831745673c31e186906f463e1036301https://github.com/dotnet/node
diff --git a/eng/Versions.props b/eng/Versions.props
index 414939064fe53a..d61001668130e5 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -1,4 +1,5 @@
+ 10.0.0
@@ -11,8 +12,8 @@
8.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet9)').Build),11))7.0.206.0.36
- preview
- 7
+ rc
+ 1falserelease
@@ -28,26 +29,11 @@
truetrue
-
- true
+ true
-
-
- 10.0.0-preview.25351.106
-
- 5.0.0-1.25351.106
-
- 5.0.0-1.25351.106
- 5.0.0-1.25351.106
- 5.0.0-1.25351.106
-
- 10.0.100-preview.7.25351.106
-
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 2.9.2-beta.25351.106
- 10.0.0-beta.25351.106
- 2.9.2-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
- 10.0.0-beta.25351.106
-
- 1.4.06.0.0-preview.1.102
- 10.0.0-preview.7.25351.1066.0.0
-
- 10.0.0-preview.7.25351.106
- 10.0.0-preview.7.25351.1066.0.04.6.1
@@ -128,16 +89,12 @@
8.0.08.0.15.0.0
- 10.0.0-preview.7.25351.106
- 10.0.0-preview.7.25351.1066.0.05.0.05.0.05.0.07.0.0
- 10.0.0-preview.7.25351.1067.0.0
- 10.0.0-preview.7.25351.1068.0.04.5.1
@@ -148,39 +105,9 @@
8.0.08.0.04.5.4
-
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
- 10.0.0-beta.25310.1
-
- 10.0.0-prerelease.25255.1
- 10.0.0-prerelease.25255.1
- 10.0.0-prerelease.25255.1
-
- 10.0.0-alpha.0.25302.2
-
- 1.0.0-prerelease.25256.1
- 1.0.0-prerelease.25256.1
- 1.0.0-prerelease.25256.1
- 1.0.0-prerelease.25256.1
- 1.0.0-prerelease.25256.1
- 1.0.0-prerelease.25256.12.0.017.10.0-beta1.24272.1
- 2.0.0-beta6.25351.1063.1.162.1.02.0.3
@@ -190,10 +117,6 @@
17.8.317.8.317.8.3
- 6.2.4
- 6.2.4
- 6.2.4
- 6.2.47.0.4127016.0
@@ -206,7 +129,6 @@
7.0.213.0.31.0.2
- 2.0.44.18.48.0.22.14.3
@@ -225,60 +147,23 @@
17.0.469.0.0-preview-20241010.1
-
- 0.11.5-alpha.25351.106
-
- 10.0.0-preview.6.25302.12.4.89.0.0-alpha.1.24167.3
-
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 10.0.100-preview.7.25351.106$(MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion)1.1.87-gba258badda1.0.0-v3.14.0.5722
-
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.1
- 19.1.0-alpha.1.25167.13.1.71.0.406601$(MicrosoftDotNetApiCompatTaskVersion)
- 10.0.0-alpha.1.25169.1
- 10.0.0-preview.4.25217.3
+ 10.0.0-preview.7.25359.101$(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion)3.1.56
diff --git a/eng/build.ps1 b/eng/build.ps1
index e6810524b6357a..f642b35f228900 100644
--- a/eng/build.ps1
+++ b/eng/build.ps1
@@ -176,8 +176,8 @@ if ($vs) {
}
# Auto-generated solution file that still uses the sln format
- if ($vs -ieq "coreclr.sln") {
- # If someone passes in coreclr.sln (case-insensitive),
+ if ($vs -ieq "coreclr.sln" -or $vs -ieq "coreclr") {
+ # If someone passes in coreclr.sln or just coreclr (case-insensitive),
# launch the generated CMake solution.
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\coreclr" | Join-Path -ChildPath "windows.$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "CoreCLR.sln"
if (-Not (Test-Path $vs)) {
@@ -192,7 +192,7 @@ if ($vs) {
}
}
# Auto-generated solution file that still uses the sln format
- elseif ($vs -ieq "corehost.sln") {
+ elseif ($vs -ieq "corehost.sln" -or $vs -ieq "corehost") {
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "artifacts\obj\" | Join-Path -ChildPath "win-$archToOpen.$((Get-Culture).TextInfo.ToTitleCase($configToOpen))" | Join-Path -ChildPath "corehost" | Join-Path -ChildPath "ide" | Join-Path -ChildPath "corehost.sln"
if (-Not (Test-Path $vs)) {
Invoke-Expression "& `"$repoRoot/eng/common/msbuild.ps1`" $repoRoot/src/native/corehost/corehost.proj /clp:nosummary /restore /p:Ninja=false /p:Configuration=$configToOpen /p:TargetArchitecture=$archToOpen /p:ConfigureOnly=true"
@@ -214,6 +214,11 @@ if ($vs) {
} else {
# Search for the solution in coreclr
$vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\coreclr" | Join-Path -ChildPath $vs | Join-Path -ChildPath "$vs.slnx"
+
+ # Also, search for the solution in coreclr\tools\aot
+ if (-Not (Test-Path $vs)) {
+ $vs = Split-Path $PSScriptRoot -Parent | Join-Path -ChildPath "src\coreclr\tools\aot\$solution.slnx"
+ }
}
if (-Not (Test-Path $vs)) {
diff --git a/eng/build.sh b/eng/build.sh
index 294afc4031dd50..2a79304978faae 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -150,7 +150,7 @@ initDistroRid()
showSubsetHelp()
{
- "$scriptroot/common/build.sh" "-restore" "-build" "/p:Subset=help" "/clp:nosummary /tl:false"
+ "$scriptroot/common/build.sh" "-restore" "-build" "/p:Subset=help" "/clp:nosummary" "/tl:false"
}
arguments=()
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index 5db4ad71ee2f3e..792b60b49d424d 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -10,8 +10,8 @@
# displayName: Setup Private Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
-# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
-# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
+# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
+# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
#
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index 4604b61b0323ae..facb415ca6ff35 100755
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -11,8 +11,8 @@
# - task: Bash@3
# displayName: Setup Internal Feeds
# inputs:
-# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
-# arguments: $(Build.SourcesDirectory)/NuGet.config
+# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh
+# arguments: $(System.DefaultWorkingDirectory)/NuGet.config
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# - task: NuGetAuthenticate@1
#
diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml
index 6badecba7bcc4d..5ce51840619888 100644
--- a/eng/common/core-templates/job/job.yml
+++ b/eng/common/core-templates/job/job.yml
@@ -20,6 +20,7 @@ parameters:
artifacts: ''
enableMicrobuild: false
enableMicrobuildForMacAndLinux: false
+ microbuildUseESRP: true
enablePublishBuildArtifacts: false
enablePublishBuildAssets: false
enablePublishTestResults: false
@@ -128,6 +129,7 @@ jobs:
parameters:
enableMicrobuild: ${{ parameters.enableMicrobuild }}
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
+ microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
continueOnError: ${{ parameters.continueOnError }}
- ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:
@@ -161,7 +163,7 @@ jobs:
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
- searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
+ searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit
mergeTestResults: ${{ parameters.mergeTestResults }}
continueOnError: true
@@ -172,7 +174,7 @@ jobs:
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
- searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
+ searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx
mergeTestResults: ${{ parameters.mergeTestResults }}
continueOnError: true
@@ -216,7 +218,7 @@ jobs:
- task: CopyFiles@2
displayName: Gather buildconfiguration for build retry
inputs:
- SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration'
+ SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration'
continueOnError: true
diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml
index 8034815f4213b1..c5788829a872e5 100644
--- a/eng/common/core-templates/job/onelocbuild.yml
+++ b/eng/common/core-templates/job/onelocbuild.yml
@@ -4,11 +4,11 @@ parameters:
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
pool: ''
-
+
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
- SourcesDirectory: $(Build.SourcesDirectory)
+ SourcesDirectory: $(System.DefaultWorkingDirectory)
CreatePr: true
AutoCompletePr: false
ReusePr: true
@@ -27,7 +27,7 @@ parameters:
is1ESPipeline: ''
jobs:
- job: OneLocBuild${{ parameters.JobNameSuffix }}
-
+
dependsOn: ${{ parameters.dependsOn }}
displayName: OneLocBuild${{ parameters.JobNameSuffix }}
@@ -68,7 +68,7 @@ jobs:
- ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}:
- task: Powershell@2
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1
arguments: $(_GenerateLocProjectArguments)
displayName: Generate LocProject.json
condition: ${{ parameters.condition }}
@@ -99,22 +99,20 @@ jobs:
mirrorBranch: ${{ parameters.MirrorBranch }}
condition: ${{ parameters.condition }}
- - template: /eng/common/core-templates/steps/publish-build-artifacts.yml
- parameters:
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
- args:
- displayName: Publish Localization Files
- pathToPublish: '$(Build.ArtifactStagingDirectory)/loc'
- publishLocation: Container
- artifactName: Loc
- condition: ${{ parameters.condition }}
+ # Copy the locProject.json to the root of the Loc directory, then publish a pipeline artifact
+ - task: CopyFiles@2
+ displayName: Copy LocProject.json
+ inputs:
+ SourceFolder: '$(System.DefaultWorkingDirectory)/eng/Localize/'
+ Contents: 'LocProject.json'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)/loc'
+ condition: ${{ parameters.condition }}
- - template: /eng/common/core-templates/steps/publish-build-artifacts.yml
+ - template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
args:
- displayName: Publish LocProject.json
- pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/'
- publishLocation: Container
- artifactName: Loc
+ targetPath: '$(Build.ArtifactStagingDirectory)/loc'
+ artifactName: 'Loc'
+ displayName: 'Publish Localization Files'
condition: ${{ parameters.condition }}
diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml
index d5303229c97e27..348cd16376f10d 100644
--- a/eng/common/core-templates/job/publish-build-assets.yml
+++ b/eng/common/core-templates/job/publish-build-assets.yml
@@ -38,6 +38,8 @@ parameters:
# Optional: A minimatch pattern for the asset manifests to publish to BAR
assetManifestsPattern: '*/manifests/**/*.xml'
+ repositoryAlias: self
+
jobs:
- job: Asset_Registry_Publish
@@ -78,7 +80,7 @@ jobs:
- 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - checkout: self
+ - checkout: ${{ parameters.repositoryAlias }}
fetchDepth: 3
clean: true
@@ -117,7 +119,7 @@ jobs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
- scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1
+ scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
/p:ManifestsPath='$(Build.StagingDirectory)/AssetManifests'
/p:IsAssetlessBuild=${{ parameters.isAssetlessBuild }}
@@ -137,7 +139,7 @@ jobs:
Add-Content -Path $filePath -Value "$(DefaultChannels)"
Add-Content -Path $filePath -Value $(IsStableBuild)
- $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt"
+ $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt"
if (Test-Path -Path $symbolExclusionfile)
{
Write-Host "SymbolExclusionFile exists"
@@ -177,7 +179,7 @@ jobs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
- scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
+ scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1
arguments: >
-BuildId $(BARBuildId)
-PublishingInfraVersion 3
diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml
index 693b00b370447b..dbc14ac580a271 100644
--- a/eng/common/core-templates/jobs/codeql-build.yml
+++ b/eng/common/core-templates/jobs/codeql-build.yml
@@ -24,7 +24,7 @@ jobs:
- name: DefaultGuardianVersion
value: 0.109.0
- name: GuardianPackagesConfigFile
- value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
+ value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config
- name: GuardianVersion
value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }}
diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml
index bf35b78faa60e8..b637cb6e94808e 100644
--- a/eng/common/core-templates/jobs/jobs.yml
+++ b/eng/common/core-templates/jobs/jobs.yml
@@ -43,6 +43,7 @@ parameters:
artifacts: {}
is1ESPipeline: ''
+ repositoryAlias: self
# 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.
@@ -83,7 +84,6 @@ jobs:
- template: /eng/common/core-templates/jobs/source-build.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
- allCompletedJobId: Source_Build_Complete
${{ each parameter in parameters.sourceBuildParameters }}:
${{ parameter.key }}: ${{ parameter.value }}
@@ -108,8 +108,6 @@ jobs:
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
- ${{ each job in parameters.jobs }}:
- ${{ job.job }}
- - ${{ if eq(parameters.enableSourceBuild, true) }}:
- - Source_Build_Complete
runAsPublic: ${{ parameters.runAsPublic }}
publishAssetsImmediately: ${{ or(parameters.publishAssetsImmediately, parameters.isAssetlessBuild) }}
@@ -117,3 +115,4 @@ jobs:
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }}
+ repositoryAlias: ${{ parameters.repositoryAlias }}
diff --git a/eng/common/core-templates/jobs/source-build.yml b/eng/common/core-templates/jobs/source-build.yml
index df24c948ba1279..d92860cba20874 100644
--- a/eng/common/core-templates/jobs/source-build.yml
+++ b/eng/common/core-templates/jobs/source-build.yml
@@ -2,12 +2,6 @@ parameters:
# This template adds arcade-powered source-build to CI. A job is created for each platform, as
# well as an optional server job that completes when all platform jobs complete.
- # The name of the "join" job for all source-build platforms. If set to empty string, the job is
- # not included. Existing repo pipelines can use this job depend on all source-build jobs
- # completing without maintaining a separate list of every single job ID: just depend on this one
- # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'.
- allCompletedJobId: ''
-
# See /eng/common/core-templates/job/source-build.yml
jobNamePrefix: 'Source_Build'
@@ -31,16 +25,6 @@ parameters:
jobs:
-- ${{ if ne(parameters.allCompletedJobId, '') }}:
- - job: ${{ parameters.allCompletedJobId }}
- displayName: Source-Build Complete
- pool: server
- dependsOn:
- - ${{ each platform in parameters.platforms }}:
- - ${{ parameters.jobNamePrefix }}_${{ platform.name }}
- - ${{ if eq(length(parameters.platforms), 0) }}:
- - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }}
-
- ${{ each platform in parameters.platforms }}:
- template: /eng/common/core-templates/job/source-build.yml
parameters:
diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml
index a151fd811e3e48..f6f87fe5c675d9 100644
--- a/eng/common/core-templates/post-build/post-build.yml
+++ b/eng/common/core-templates/post-build/post-build.yml
@@ -154,7 +154,7 @@ stages:
- task: PowerShell@2
displayName: Validate
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
- job:
@@ -208,7 +208,7 @@ stages:
filePath: eng\common\sdk-task.ps1
arguments: -task SigningValidation -restore -msbuildEngine vs
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
+ /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt'
${{ parameters.signingValidationAdditionalParameters }}
- template: /eng/common/core-templates/steps/publish-logs.yml
@@ -258,7 +258,7 @@ stages:
- task: PowerShell@2
displayName: Validate
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
-ExtractPath $(Agent.BuildDirectory)/Extract/
-GHRepoName $(Build.Repository.Name)
@@ -313,7 +313,7 @@ stages:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
- scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
+ scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1
arguments: >
-BuildId $(BARBuildId)
-PublishingInfraVersion ${{ parameters.publishingInfraVersion }}
diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml
index f7602980dbe721..a7abd58c4bb609 100644
--- a/eng/common/core-templates/post-build/setup-maestro-vars.yml
+++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml
@@ -36,7 +36,7 @@ steps:
$AzureDevOpsBuildId = $Env:Build_BuildId
}
else {
- . $(Build.SourcesDirectory)\eng\common\tools.ps1
+ . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1
$darc = Get-Darc
$buildInfo = & $darc get-build `
--id ${{ parameters.BARBuildId }} `
diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml
index 64f881bffc3cf1..4085512b690910 100644
--- a/eng/common/core-templates/steps/enable-internal-sources.yml
+++ b/eng/common/core-templates/steps/enable-internal-sources.yml
@@ -17,8 +17,8 @@ steps:
- task: PowerShell@2
displayName: Setup Internal Feeds
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
+ arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
env:
Token: ${{ parameters.legacyCredential }}
# If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate.
@@ -29,8 +29,8 @@ steps:
- task: PowerShell@2
displayName: Setup Internal Feeds
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
+ arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config
- ${{ else }}:
- template: /eng/common/templates/steps/get-federated-access-token.yml
parameters:
@@ -39,8 +39,8 @@ steps:
- task: PowerShell@2
displayName: Setup Internal Feeds
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token)
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
+ arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token)
# This is required in certain scenarios to install the ADO credential provider.
# It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others
# (e.g. dotnet msbuild).
diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml
index 44a9636cdff90a..c05f650279795f 100644
--- a/eng/common/core-templates/steps/generate-sbom.yml
+++ b/eng/common/core-templates/steps/generate-sbom.yml
@@ -6,7 +6,7 @@
parameters:
PackageVersion: 10.0.0
- BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+ BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
PackageName: '.NET'
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
IgnoreDirectories: ''
diff --git a/eng/common/core-templates/steps/install-microbuild.yml b/eng/common/core-templates/steps/install-microbuild.yml
index f3064a7834edca..d6b9878f54db7f 100644
--- a/eng/common/core-templates/steps/install-microbuild.yml
+++ b/eng/common/core-templates/steps/install-microbuild.yml
@@ -4,8 +4,17 @@ parameters:
# Enable install tasks for MicroBuild on Mac and Linux
# Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'
enableMicrobuildForMacAndLinux: false
+ # Determines whether the ESRP service connection information should be passed to the signing plugin.
+ # This overlaps with _SignType to some degree. We only need the service connection for real signing.
+ # It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place.
+ # Doing so will cause the service connection to be authorized for the pipeline, which isn't allowed and won't work for non-prod.
+ # Unfortunately, _SignType can't be used to exclude the use of the service connection in non-real sign scenarios. The
+ # variable is not available in template expression. _SignType has a very large proliferation across .NET, so replacing it is tough.
+ microbuildUseESRP: true
# Location of the MicroBuild output folder
+ # NOTE: There's something that relies on this being in the "default" source directory for tasks such as Signing to work properly.
microBuildOutputFolder: '$(Build.SourcesDirectory)'
+
continueOnError: false
steps:
@@ -21,34 +30,62 @@ steps:
workingDirectory: ${{ parameters.microBuildOutputFolder }}
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+ - script: |
+ REM Check if ESRP is disabled while SignType is real
+ if /I "${{ parameters.microbuildUseESRP }}"=="false" if /I "$(_SignType)"=="real" (
+ echo Error: ESRP must be enabled when SignType is real.
+ exit /b 1
+ )
+ displayName: 'Validate ESRP usage (Windows)'
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ - script: |
+ # Check if ESRP is disabled while SignType is real
+ if [ "${{ parameters.microbuildUseESRP }}" = "false" ] && [ "$(_SignType)" = "real" ]; then
+ echo "Error: ESRP must be enabled when SignType is real."
+ exit 1
+ fi
+ displayName: 'Validate ESRP usage (Non-Windows)'
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+
+ # Two different MB install steps. This is due to not being able to use the agent OS during
+ # YAML expansion, and Windows vs. Linux/Mac uses different service connections. However,
+ # we can avoid including the MB install step if not enabled at all. This avoids a bunch of
+ # extra pipeline authorizations, since most pipelines do not sign on non-Windows.
- task: MicroBuildSigningPlugin@4
- displayName: Install MicroBuild plugin
+ displayName: Install MicroBuild plugin (Windows)
inputs:
signType: $(_SignType)
zipSources: false
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
- ${{ if and(eq(parameters.enableMicrobuildForMacAndLinux, 'true'), ne(variables['Agent.Os'], 'Windows_NT')) }}:
- azureSubscription: 'MicroBuild Signing Task (DevDiv)'
- useEsrpCli: true
- ${{ elseif eq(variables['System.TeamProject'], 'DevDiv') }}:
- ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
- ${{ else }}:
- ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
+ ${{ if eq(parameters.microbuildUseESRP, true) }}:
+ ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
+ ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
+ ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
+ ${{ else }}:
+ ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
env:
TeamName: $(_TeamName)
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
continueOnError: ${{ parameters.continueOnError }}
- condition: and(
- succeeded(),
- or(
- and(
- eq(variables['Agent.Os'], 'Windows_NT'),
- in(variables['_SignType'], 'real', 'test')
- ),
- and(
- ${{ eq(parameters.enableMicrobuildForMacAndLinux, true) }},
- ne(variables['Agent.Os'], 'Windows_NT'),
- eq(variables['_SignType'], 'real')
- )
- ))
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
+
+ - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}:
+ - task: MicroBuildSigningPlugin@4
+ displayName: Install MicroBuild plugin (non-Windows)
+ inputs:
+ signType: $(_SignType)
+ zipSources: false
+ feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
+ ${{ if eq(parameters.microbuildUseESRP, true) }}:
+ ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
+ ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
+ ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39
+ ${{ else }}:
+ ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
+ env:
+ TeamName: $(_TeamName)
+ MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml
index de24d0087c58bb..10f825e270a03b 100644
--- a/eng/common/core-templates/steps/publish-logs.yml
+++ b/eng/common/core-templates/steps/publish-logs.yml
@@ -12,22 +12,22 @@ steps:
inputs:
targetType: inline
script: |
- New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
- Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
+ New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
+ Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
continueOnError: true
condition: always()
- task: PowerShell@2
displayName: Redact Logs
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1
# For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml
- # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
+ # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt'
# If the file exists - sensitive data for redaction will be sourced from it
# (single entry per line, lines starting with '# ' are considered comments and skipped)
- arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs'
+ arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs'
-BinlogToolVersion ${{parameters.BinlogToolVersion}}
- -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt'
+ -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt'
'$(publishing-dnceng-devdiv-code-r-build-re)'
'$(MaestroAccessToken)'
'$(dn-bot-all-orgs-artifact-feeds-rw)'
@@ -44,7 +44,7 @@ steps:
- task: CopyFiles@2
displayName: Gather post build logs
inputs:
- SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs'
+ SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs'
condition: always()
diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml
index c2917c1efc1cb7..75600735f175e6 100644
--- a/eng/common/core-templates/steps/source-index-stage1-publish.yml
+++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml
@@ -20,7 +20,7 @@ steps:
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
workingDirectory: $(Agent.TempDirectory)
-- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
+- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
displayName: "Source Index: Process Binlog into indexable sln"
- ${{ if and(ne(parameters.runAsPublic, 'true'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1
index 524aaa57f2b742..fa1cdc2b30076a 100644
--- a/eng/common/generate-locproject.ps1
+++ b/eng/common/generate-locproject.ps1
@@ -33,15 +33,27 @@ $jsonTemplateFiles | ForEach-Object {
$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
+$wxlFilesV3 = @()
+$wxlFilesV5 = @()
$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them
if (-not $wxlFiles) {
$wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files
if ($wxlEnFiles) {
- $wxlFiles = @()
- $wxlEnFiles | ForEach-Object {
- $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
- $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
- }
+ $wxlFiles = @()
+ $wxlEnFiles | ForEach-Object {
+ $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
+ $content = Get-Content $_.FullName -Raw
+
+ # Split files on schema to select different parser settings in the generated project.
+ if ($content -like "*http://wixtoolset.org/schemas/v4/wxl*")
+ {
+ $wxlFilesV5 += Copy-Item $_.FullName -Destination $destinationFile -PassThru
+ }
+ elseif ($content -like "*http://schemas.microsoft.com/wix/2006/localization*")
+ {
+ $wxlFilesV3 += Copy-Item $_.FullName -Destination $destinationFile -PassThru
+ }
+ }
}
}
@@ -114,7 +126,32 @@ $locJson = @{
CloneLanguageSet = "WiX_CloneLanguages"
LssFiles = @( "wxl_loc.lss" )
LocItems = @(
- $wxlFiles | ForEach-Object {
+ $wxlFilesV3 | ForEach-Object {
+ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
+ $continue = $true
+ foreach ($exclusion in $exclusions.Exclusions) {
+ if ($_.FullName.Contains($exclusion)) {
+ $continue = $false
+ }
+ }
+ $sourceFile = ($_.FullName | Resolve-Path -Relative)
+ if ($continue)
+ {
+ return @{
+ SourceFile = $sourceFile
+ CopyOption = "LangIDOnPath"
+ OutputPath = $outputPath
+ }
+ }
+ }
+ )
+ },
+ @{
+ LanguageSet = $LanguageSet
+ CloneLanguageSet = "WiX_CloneLanguages"
+ LssFiles = @( "P210WxlSchemaV4.lss" )
+ LocItems = @(
+ $wxlFilesV5 | ForEach-Object {
$outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
$continue = $true
foreach ($exclusion in $exclusions.Exclusions) {
diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md
index 98bbc1ded0ba88..4bf4cf41bd7c76 100644
--- a/eng/common/template-guidance.md
+++ b/eng/common/template-guidance.md
@@ -50,7 +50,7 @@ extends:
- task: CopyFiles@2
displayName: Gather build output
inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel'
+ SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel'
```
diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml
index a8a94328745823..92a0664f5647d5 100644
--- a/eng/common/templates-official/job/job.yml
+++ b/eng/common/templates-official/job/job.yml
@@ -3,7 +3,7 @@ parameters:
enableSbom: true
runAsPublic: false
PackageVersion: 9.0.0
- BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+ BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
jobs:
- template: /eng/common/core-templates/job/job.yml
diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml
index dbdd66d4a4b3a0..f1311bbb1b33d9 100644
--- a/eng/common/templates-official/variables/sdl-variables.yml
+++ b/eng/common/templates-official/variables/sdl-variables.yml
@@ -4,4 +4,4 @@ variables:
- name: DefaultGuardianVersion
value: 0.109.0
- name: GuardianPackagesConfigFile
- value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
\ No newline at end of file
+ value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config
\ No newline at end of file
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index 7cbf668c22bc04..238fa0818f7b27 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -6,7 +6,7 @@ parameters:
enableSbom: true
runAsPublic: false
PackageVersion: 9.0.0
- BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+ BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
jobs:
- template: /eng/common/core-templates/job/job.yml
@@ -77,7 +77,7 @@ jobs:
parameters:
is1ESPipeline: false
args:
- targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration'
+ targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration'
artifactName: 'BuildConfiguration'
displayName: 'Publish build retry configuration'
continueOnError: true
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 40f0aa86128e48..4920464cc4ae3e 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -257,7 +257,20 @@ function Retry($downloadBlock, $maxRetries = 5) {
function GetDotNetInstallScript([string] $dotnetRoot) {
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
+ $shouldDownload = $false
+
if (!(Test-Path $installScript)) {
+ $shouldDownload = $true
+ } else {
+ # Check if the script is older than 30 days
+ $fileAge = (Get-Date) - (Get-Item $installScript).LastWriteTime
+ if ($fileAge.Days -gt 30) {
+ Write-Host "Existing install script is too old, re-downloading..."
+ $shouldDownload = $true
+ }
+ }
+
+ if ($shouldDownload) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
$uri = "https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
@@ -414,7 +427,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
# Locate Visual Studio installation or download x-copy msbuild.
$vsInfo = LocateVisualStudio $vsRequirements
- if ($vsInfo -ne $null) {
+ if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) {
# Ensure vsInstallDir has a trailing slash
$vsInstallDir = Join-Path $vsInfo.installationPath "\"
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
@@ -531,7 +544,8 @@ function LocateVisualStudio([object]$vsRequirements = $null){
if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
$vswhereVersion = $GlobalJson.tools.vswhere
} else {
- $vswhereVersion = '2.5.2'
+ # keep this in sync with the VSWhereVersion in DefaultVersions.props
+ $vswhereVersion = '3.1.7'
}
$vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion"
@@ -539,7 +553,8 @@ function LocateVisualStudio([object]$vsRequirements = $null){
if (!(Test-Path $vsWhereExe)) {
Create-Directory $vsWhereDir
- Write-Host 'Downloading vswhere'
+ Write-Host 'Downloading vswhere $vswhereVersion'
+ $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
Retry({
Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
})
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 3def02a638d2e8..c1841c9dfd0f4e 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -300,8 +300,29 @@ function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
local install_script_url="https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
+ local timestamp_file="$root/.dotnet-install.timestamp"
+ local should_download=false
if [[ ! -a "$install_script" ]]; then
+ should_download=true
+ elif [[ -f "$timestamp_file" ]]; then
+ # Check if the script is older than 30 days using timestamp file
+ local download_time=$(cat "$timestamp_file" 2>/dev/null || echo "0")
+ local current_time=$(date +%s)
+ local age_seconds=$((current_time - download_time))
+
+ # 30 days = 30 * 24 * 60 * 60 = 2592000 seconds
+ if [[ $age_seconds -gt 2592000 ]]; then
+ echo "Existing install script is too old, re-downloading..."
+ should_download=true
+ fi
+ else
+ # No timestamp file exists, assume script is old and re-download
+ echo "No timestamp found for existing install script, re-downloading..."
+ should_download=true
+ fi
+
+ if [[ "$should_download" == true ]]; then
mkdir -p "$root"
echo "Downloading '$install_script_url'"
@@ -328,6 +349,9 @@ function GetDotNetInstallScript {
ExitWithExitCode $exit_code
}
fi
+
+ # Create timestamp file to track download time in seconds from epoch
+ date +%s > "$timestamp_file"
fi
# return value
_GetDotNetInstallScript="$install_script"
diff --git a/eng/generators.targets b/eng/generators.targets
index e4c4336b21edb5..1a25554a78f1b5 100644
--- a/eng/generators.targets
+++ b/eng/generators.targets
@@ -25,7 +25,7 @@
(
'$(DisableImplicitFrameworkReferences)' == 'true' and
(
- '@(Reference->AnyHaveMetadataValue('Identity', 'System.Runtime.InteropServices'))' == 'true' or
+ '@(ProjectReference->AnyHaveMetadataValue('Filename', 'System.Runtime.InteropServices'))' == 'true' or
'@(ProjectReference->AnyHaveMetadataValue('Identity', '$(CoreLibProject)'))' == 'true'
)
)" />
@@ -38,7 +38,7 @@
'$(MSBuildProjectExtension)' == '.csproj' and
(
'$(DisableImplicitFrameworkReferences)' == 'true' and
- '@(Reference->AnyHaveMetadataValue('Identity', 'System.Runtime.InteropServices'))' == 'true'
+ '@(ProjectReference->AnyHaveMetadataValue('Filename', 'System.Runtime.InteropServices'))' == 'true'
)" />
@@ -49,7 +49,7 @@
+ That is required as the EnabledGenerators condition checks on the ProjectReference items and hence can't be a property condition. -->
DESTINATION ${destination} COMPONENT ${INSTALL_CLR_COMPONENT})
+ install(PROGRAMS $ DESTINATION ${destination} COMPONENT ${INSTALL_CLR_COMPONENT} ${INSTALL_CLR_OPTIONAL})
if (NOT "${symbolFile}" STREQUAL "")
- install_symbol_file(${symbolFile} ${destination} COMPONENT ${INSTALL_CLR_COMPONENT})
+ install_symbol_file(${symbolFile} ${destination} COMPONENT ${INSTALL_CLR_COMPONENT} ${INSTALL_CLR_OPTIONAL})
endif()
if(CLR_CMAKE_PGO_INSTRUMENT)
diff --git a/eng/native/gen-buildsys.cmd b/eng/native/gen-buildsys.cmd
index 3a6e1b5426d65f..4a6bd162063682 100644
--- a/eng/native/gen-buildsys.cmd
+++ b/eng/native/gen-buildsys.cmd
@@ -45,19 +45,11 @@ if /i "%__Arch%" == "wasm" (
)
if /i "%__Os%" == "browser" (
if "%EMSDK_PATH%" == "" (
- if not exist "%__repoRoot%\src\mono\browser\emsdk" (
- echo Error: Should set EMSDK_PATH environment variable pointing to emsdk root.
- exit /B 1
- )
-
- set "EMSDK_PATH=%__repoRoot%\src\mono\browser\emsdk"
+ echo Error: Should set EMSDK_PATH environment variable pointing to emsdk root.
+ exit /B 1
)
- :: replace backslash with forward slash and append last slash
- set "EMSDK_PATH=!EMSDK_PATH:\=/!"
- if not "!EMSDK_PATH:~-1!" == "/" set "EMSDK_PATH=!EMSDK_PATH!/"
- set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_TOOLCHAIN_FILE=!EMSDK_PATH!/emscripten/cmake/Modules/Platform/Emscripten.cmake"
- set __UseEmcmake=1
+ set CMakeToolPrefix=emcmake
)
if /i "%__Os%" == "wasi" (
set "__repoRoot=!__repoRoot:\=/!"
@@ -135,12 +127,8 @@ if not "%__ConfigureOnly%" == "1" (
)
)
-if /i "%__UseEmcmake%" == "1" (
- call "!EMSDK_PATH!/emsdk_env.cmd" > nul 2>&1 && emcmake "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
-) else (
- echo "%CMakePath% %__ExtraCmakeParams% --no-warn-unused-cli -G %__CmakeGenerator% -B %__IntermediatesDir% -S %__SourceDir%"
- "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
-)
+echo %CMakeToolPrefix% "%CMakePath% %__ExtraCmakeParams% --no-warn-unused-cli -G %__CmakeGenerator% -B %__IntermediatesDir% -S %__SourceDir%"
+%CMakeToolPrefix% "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
if "%errorlevel%" == "0" (
echo %__ExtraCmakeParams% > %__CmdLineOptionsUpToDateFile%
diff --git a/eng/pipelines/coreclr/interpreter.yml b/eng/pipelines/coreclr/interpreter.yml
index 746508b7372530..6392f36750f434 100644
--- a/eng/pipelines/coreclr/interpreter.yml
+++ b/eng/pipelines/coreclr/interpreter.yml
@@ -1,5 +1,13 @@
trigger: none
+schedules:
+- cron: "0 13 * * 1,3,5"
+ displayName: Every Monday, Wednesday and Friday at 5:00 AM (UTC-8:00)
+ branches:
+ include:
+ - main
+ always: true
+
variables:
- template: /eng/pipelines/common/variables.yml
diff --git a/eng/pipelines/coreclr/superpmi-diffs.yml b/eng/pipelines/coreclr/superpmi-diffs.yml
index 10ba7a7a1df002..5e8b4f12b31da6 100644
--- a/eng/pipelines/coreclr/superpmi-diffs.yml
+++ b/eng/pipelines/coreclr/superpmi-diffs.yml
@@ -55,8 +55,11 @@ extends:
platforms:
- osx_arm64
- windows_x86
+ # Not needed for subsequent steps, but this ensures we get some build
+ # coverage of community JITs in CI on JIT PRs.
+ - windows_x64
jobParameters:
- buildArgs: -s clr.alljits+clr.spmi -c $(_BuildConfig)
+ buildArgs: -s clr.alljitscommunity+clr.spmi -c $(_BuildConfig)
postBuildSteps:
# Build CLR assets for x64 as well as the target as we need an x64 mcs
- template: /eng/pipelines/common/templates/global-build-step.yml
diff --git a/eng/pipelines/coreclr/templates/jit-replay-pipeline.yml b/eng/pipelines/coreclr/templates/jit-replay-pipeline.yml
index 3ee415cb881a73..74f2caf2ff3852 100644
--- a/eng/pipelines/coreclr/templates/jit-replay-pipeline.yml
+++ b/eng/pipelines/coreclr/templates/jit-replay-pipeline.yml
@@ -32,7 +32,7 @@ extends:
buildConfig: checked
platforms: ${{ parameters.platforms }}
jobParameters:
- buildArgs: -s clr.alljitscommunity+clr.spmi -c $(_BuildConfig)
+ buildArgs: -s clr.alljits+clr.spmi -c $(_BuildConfig)
postBuildSteps:
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml
index 417241706c4c91..3a01170b624758 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml
@@ -76,7 +76,7 @@ jobs:
nameSuffix: AllSubsets_Mono
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:EnableAdditionalTimezoneChecks=true
- timeoutInMinutes: 480
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
@@ -107,10 +107,41 @@ jobs:
nameSuffix: AllSubsets_CoreCLR
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg)
- timeoutInMinutes: 480
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+
+#
+# Android arm64 devices and x64 emulators
+# Build the whole product using NativeAOT and run functional 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: coreclr
+ platforms:
+ - android_arm64
+ variables:
+ # map dependencies variables to local variables
+ - name: librariesContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
+ - name: coreclrContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ]
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: NativeAOT
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:UseNativeAOTRuntime=true /p:RuntimeFlavor=coreclr /p:TestNativeAOT=true
+ timeoutInMinutes: 120
+ # extra steps, run tests
+ postBuildSteps:
+ - template: /eng/pipelines/libraries/helix.yml
+ parameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml
index b7b3774f0b5a35..4f0c526aff1d38 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml
@@ -111,7 +111,7 @@ jobs:
nameSuffix: AllSubsets_Mono
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg)
- timeoutInMinutes: 180
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
@@ -149,3 +149,36 @@ jobs:
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
+
+#
+# Android arm64 devices and x64 emulators
+# Build the whole product using NativeAOT and run functional 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: coreclr
+ isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
+ isAndroidEmulatorOnlyBuild: ${{ parameters.isAndroidEmulatorOnlyBuild }}
+ platforms:
+ - android_x64
+ variables:
+ # map dependencies variables to local variables
+ - name: librariesContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
+ - name: coreclrContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ]
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: NativeAOT
+ isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
+ buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:UseNativeAOTRuntime=true /p:RuntimeFlavor=coreclr /p:TestNativeAOT=true
+ timeoutInMinutes: 120
+ # extra steps, run tests
+ postBuildSteps:
+ - template: /eng/pipelines/libraries/helix.yml
+ parameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
index 7f10d317464cf8..82726e28094227 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml
@@ -42,7 +42,7 @@ jobs:
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=false
${{ else }}:
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=true
- timeoutInMinutes: 480
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
@@ -81,7 +81,7 @@ jobs:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_RuntimeTests
buildArgs: -s mono+libs -c $(_BuildConfig)
- timeoutInMinutes: 480
+ timeoutInMinutes: 240
# extra steps, run tests
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
@@ -152,7 +152,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_NativeAOT_RuntimeTests
- timeoutInMinutes: 480
+ timeoutInMinutes: 240
buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
# extra steps, run tests
extraVariablesTemplates:
diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
index 9f483dbbe75eb3..80f29f2d8567eb 100644
--- a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
+++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
@@ -36,7 +36,7 @@ jobs:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:RunAOTCompilation=true /p:MonoForceInterpreter=true
- timeoutInMinutes: 180
+ timeoutInMinutes: 240
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
@@ -119,7 +119,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_NativeAOT_RuntimeTests
- timeoutInMinutes: 240
+ timeoutInMinutes: 180
buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
# extra steps, run tests
extraVariablesTemplates:
@@ -133,3 +133,37 @@ jobs:
testBuildArgs: tree nativeaot/SmokeTests /p:BuildNativeAOTRuntimePack=true
testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
buildAllTestsAsStandalone: true
+
+#
+# iOS simulator
+# Build the whole product using CoreCLR and run functional 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: checked
+ runtimeFlavor: coreclr
+ isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
+ isiOSLikeSimulatorOnlyBuild: ${{ parameters.isiOSLikeSimulatorOnlyBuild }}
+ platforms:
+ - iossimulator_arm64
+ variables:
+ # map dependencies variables to local variables
+ - name: librariesContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
+ - name: coreclrContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ]
+ - name: illinkContainsChange
+ value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ]
+ jobParameters:
+ testGroup: innerloop
+ nameSuffix: AllSubsets_CoreCLR
+ buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=false /p:UseMonoRuntime=false /p:MonoForceInterpreter=false /p:RunSmokeTestsOnly=true
+ timeoutInMinutes: 120
+ # extra steps, run tests
+ postBuildSteps:
+ - template: /eng/pipelines/libraries/helix.yml
+ parameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
diff --git a/eng/pipelines/installer/helix-queues-setup.yml b/eng/pipelines/installer/helix-queues-setup.yml
index 57cd037c9ed28f..582294a4a39d6a 100644
--- a/eng/pipelines/installer/helix-queues-setup.yml
+++ b/eng/pipelines/installer/helix-queues-setup.yml
@@ -42,7 +42,6 @@ jobs:
# Linux x64
- ${{ if eq(parameters.platform, 'linux_x64') }}:
- AzureLinux.3.Amd64.Open
- - Ubuntu.2204.Amd64.Open
# OSX arm64
- ${{ if eq(parameters.platform, 'osx_arm64') }}:
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index fdebac85bc327a..71713d3bccb3c7 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -37,7 +37,7 @@ jobs:
# Linux musl x64
- ${{ if eq(parameters.platform, 'linux_musl_x64') }}:
- - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
+ - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (Alpine.edge.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-edge-helix-amd64
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
- (Alpine.322.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-helix-amd64
@@ -75,7 +75,7 @@ jobs:
- Ubuntu.2204.Amd64.Open
- (AzureLinux.3.0.Amd64.Open)AzureLinux.3.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-helix-amd64
- (Centos.10.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-helix-amd64
-
+
# OSX arm64
- ${{ if eq(parameters.platform, 'osx_arm64') }}:
- osx.13.arm64.open
diff --git a/eng/pipelines/performance/perf-build.yml b/eng/pipelines/performance/perf-build.yml
index ef418994581d99..10cc3606d94bdf 100644
--- a/eng/pipelines/performance/perf-build.yml
+++ b/eng/pipelines/performance/perf-build.yml
@@ -14,10 +14,6 @@ parameters:
displayName: Build Coreclr Arm64 Windows
type: boolean
default: true
-- name: coreclr_muslx64_linux
- displayName: Build Coreclr Musl x64 Linux
- type: boolean
- default: true
- name: coreclr_x64_linux
displayName: Build Coreclr x64 Linux
type: boolean
@@ -110,8 +106,6 @@ extends:
- coreclr_arm64_linux
- ${{ if eq(parameters.coreclr_arm64_windows, true) }}:
- coreclr_arm64_windows
- - ${{ if eq(parameters.coreclr_muslx64_linux, true) }}:
- - coreclr_muslx64_linux
- ${{ if eq(parameters.coreclr_x64_linux, true) }}:
- coreclr_x64_linux
- ${{ if eq(parameters.coreclr_x64_windows, true) }}:
@@ -152,8 +146,6 @@ extends:
- coreclr_arm64_linux
- ${{ if eq(parameters.coreclr_arm64_windows, true) }}:
- coreclr_arm64_windows
- - ${{ if eq(parameters.coreclr_muslx64_linux, true) }}:
- - coreclr_muslx64_linux
- ${{ if eq(parameters.coreclr_x64_linux, true) }}:
- coreclr_x64_linux
- ${{ if eq(parameters.coreclr_x64_windows, true) }}:
@@ -182,7 +174,7 @@ extends:
- nativeAot_arm64_ios
${{ if parameters.mauiFramework }}:
mauiFramework: ${{ parameters.mauiFramework }}
-
+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(variables['Build.Reason'], 'IndividualCI'), parameters.runPrivateJobs)) }}:
- stage: UploadArtifacts
displayName: 'Upload Artifacts'
@@ -200,8 +192,6 @@ extends:
- coreclr_arm64_linux
- ${{ if eq(parameters.coreclr_arm64_windows, true) }}:
- coreclr_arm64_windows
- - ${{ if eq(parameters.coreclr_muslx64_linux, true) }}:
- - coreclr_muslx64_linux
- ${{ if eq(parameters.coreclr_x64_linux, true) }}:
- coreclr_x64_linux
- ${{ if eq(parameters.coreclr_x64_windows, true) }}:
diff --git a/eng/pipelines/performance/perf.yml b/eng/pipelines/performance/perf.yml
index 01b80b580db2bd..17b77bffe7e16d 100644
--- a/eng/pipelines/performance/perf.yml
+++ b/eng/pipelines/performance/perf.yml
@@ -8,6 +8,7 @@ trigger:
branches:
include:
- main
+ - release/10.0
- release/9.0
- release/8.0
paths:
diff --git a/eng/pipelines/performance/templates/build-perf-sample-apps.yml b/eng/pipelines/performance/templates/build-perf-sample-apps.yml
index 36ca31eb80ca4d..be23c6465cbd44 100644
--- a/eng/pipelines/performance/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/performance/templates/build-perf-sample-apps.yml
@@ -20,7 +20,7 @@ steps:
artifactName: AndroidMonoArm64BuildLog
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
- rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/Bundle/bin/HelloAndroid.apk
+ rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/AppBundle/bin/HelloAndroid.apk
includeRootFolder: true
displayName: Android Sample App JIT Mono
artifactName: AndroidHelloWorldArm64Mono
@@ -43,7 +43,7 @@ steps:
artifactName: AndroidMonoAOTArm64BuildLog
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
- rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/Bundle/bin/HelloAndroid.apk
+ rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/AppBundle/bin/HelloAndroid.apk
includeRootFolder: true
displayName: Android Sample App AOT Mono
artifactName: AndroidHelloWorldArm64MonoAOT
@@ -67,7 +67,7 @@ steps:
artifactName: AndroidCoreCLRArm64BuildLog
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
- rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/Bundle/bin/HelloAndroid.apk
+ rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/AppBundle/bin/HelloAndroid.apk
includeRootFolder: true
displayName: Android Sample App JIT CoreCLR
artifactName: AndroidHelloWorldArm64CoreCLR
@@ -90,7 +90,7 @@ steps:
artifactName: AndroidCoreCLRArm64StaticLinkingBuildLog
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
- rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/Bundle/bin/HelloAndroid.apk
+ rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/AppBundle/bin/HelloAndroid.apk
includeRootFolder: true
displayName: Android Sample App JIT CoreCLR Static Linking
artifactName: AndroidHelloWorldArm64CoreCLRStaticLinking
@@ -113,7 +113,7 @@ steps:
artifactName: AndroidCoreCLRR2RArm64BuildLog
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
- rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/Bundle/bin/HelloAndroid.apk
+ rootFolder: $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp/arm64/Release/android-arm64/AppBundle/bin/HelloAndroid.apk
includeRootFolder: true
displayName: Android Sample App R2R CoreCLR
artifactName: AndroidHelloWorldArm64CoreCLRR2R
diff --git a/eng/pipelines/performance/templates/perf-build-jobs.yml b/eng/pipelines/performance/templates/perf-build-jobs.yml
index 4defede2528db2..a7ecb34a3f0f9e 100644
--- a/eng/pipelines/performance/templates/perf-build-jobs.yml
+++ b/eng/pipelines/performance/templates/perf-build-jobs.yml
@@ -8,7 +8,6 @@ jobs:
linux_x64: true
windows_x64: true
windows_x86: true
- linux_musl_x64: true
android_arm64: true
# build mono for AOT
diff --git a/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml b/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml
index ddf103aaf4c0d9..85704ada6a297e 100644
--- a/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml
+++ b/eng/pipelines/performance/templates/perf-coreclr-build-jobs.yml
@@ -1,6 +1,5 @@
parameters:
linux_x64: false
- linux_musl_x64: false
linux_arm64: false
windows_x64: false
windows_x86: false
@@ -8,7 +7,7 @@ parameters:
android_arm64: false
jobs:
- - ${{ if or(eq(parameters.linux_x64, true), eq(parameters.windows_x64, true), eq(parameters.windows_x86, true), eq(parameters.linux_musl_x64, true), eq(parameters.linux_arm64, true), eq(parameters.windows_arm64, true)) }}:
+ - ${{ if or(eq(parameters.linux_x64, true), eq(parameters.windows_x64, true), eq(parameters.windows_x86, true), eq(parameters.linux_arm64, true), eq(parameters.windows_arm64, true)) }}:
# build coreclr and libraries
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -21,8 +20,6 @@ jobs:
- windows_x64
- ${{ if eq(parameters.windows_x86, true) }}:
- windows_x86
- - ${{ if eq(parameters.linux_musl_x64, true) }}:
- - linux_musl_x64
- ${{ if eq(parameters.linux_arm64, true) }}:
- linux_arm64
- ${{ if eq(parameters.windows_arm64, true) }}:
diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml
index 9df8042e7af0af..3f2e6c1da8b5d1 100644
--- a/eng/pipelines/runtime-linker-tests.yml
+++ b/eng/pipelines/runtime-linker-tests.yml
@@ -82,7 +82,11 @@ extends:
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
eq(variables['isRollingBuild'], true))
- buildArgs: -s tools.illinktests -test -c $(_BuildConfig)
+ # Build libs.sfx subset first so that Roslyn analyzer tests can use live ref pack
+ buildArgs: -s libs.sfx -c $(_BuildConfig)
+ postBuildSteps:
+ - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch $(archType) $(_osParameter) -s tools.illinktests -test -c $(_BuildConfig) $(crossArg) $(_officialBuildParameter)
+ displayName: Run ILLink Tests
#
# Build Release config vertical for Windows, Linux, and OSX
diff --git a/eng/pipelines/runtime-llvm.yml b/eng/pipelines/runtime-llvm.yml
index b315a1541d1fd8..82f4bb1970a28b 100644
--- a/eng/pipelines/runtime-llvm.yml
+++ b/eng/pipelines/runtime-llvm.yml
@@ -162,7 +162,7 @@ extends:
nameSuffix: AllSubsets_Mono_LLVMFULLAOT_RuntimeTests
runtimeVariant: llvmfullaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c $(_BuildConfig) /p:MonoEnableLLVM=true
- timeoutInMinutes: 400
+ timeoutInMinutes: 480
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@@ -177,9 +177,9 @@ extends:
testRunNamePrefixSuffix: Mono_Release
testBuildArgs: >-
-tree:CoreMangLib -tree:Exceptions -tree:GC -tree:Interop -tree:Loader -tree:Regressions -tree:baseservices
- -tree:ilasm -tree:ilverify -tree:managed -tree:profiler -tree:readytorun -tree:reflection -tree:tracing
+ -tree:ilverify -tree:managed -tree:profiler -tree:reflection -tree:tracing
-tree:JIT/BBT -tree:JIT/CodeGenBringUpTests -tree:JIT/Directed -tree:JIT/Generics -tree:JIT/IL_Conformance
- -tree:JIT/Math -tree:JIT/Methodical -tree:JIT/PGO -tree:JIT/Performance -tree:JIT/Regression -tree:JIT/RyuJIT
+ -tree:JIT/Math -tree:JIT/Methodical -tree:JIT/Performance -tree:JIT/Regression -tree:JIT/RyuJIT
-tree:JIT/Stress -tree:JIT/common -tree:JIT/jit64 -tree:JIT/opt -tree:JIT/superpmi
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
@@ -209,7 +209,7 @@ extends:
nameSuffix: AllSubsets_Mono_LLVMFULLAOT_RuntimeIntrinsicsTests
runtimeVariant: llvmfullaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c $(_BuildConfig) /p:MonoEnableLLVM=true
- timeoutInMinutes: 400
+ timeoutInMinutes: 480
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml
index 44740dd5181d2e..7460b60a32f93c 100644
--- a/eng/pipelines/runtime.yml
+++ b/eng/pipelines/runtime.yml
@@ -86,21 +86,6 @@ extends:
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
eq(variables['isRollingBuild'], true))
- - template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/common/global-build-job.yml
- buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
- platforms:
- - osx_arm64
- jobParameters:
- nameSuffix: AllSubsets_CoreCLR
- buildArgs: -s clr+libs+host+packs -rc Release -c Release -lc $(_BuildConfig)
- timeoutInMinutes: 120
- condition: >-
- or(
- eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
- eq(variables['isRollingBuild'], true))
-
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
@@ -208,6 +193,36 @@ extends:
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isRollingBuild'], true))
+ #
+ # Build CoreCLR and Libraries
+ # For running installer tests
+ #
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ buildConfig: release
+ platforms:
+ - osx_arm64
+ jobParameters:
+ nameSuffix: CoreCLR_Libraries
+ buildArgs: -s clr+libs -c $(_BuildConfig)
+ timeoutInMinutes: 120
+ postBuildSteps:
+ - template: /eng/pipelines/common/upload-artifact-step.yml
+ parameters:
+ rootFolder: $(Build.SourcesDirectory)/artifacts/bin
+ includeRootFolder: false
+ archiveType: $(archiveType)
+ archiveExtension: $(archiveExtension)
+ tarCompression: $(tarCompression)
+ artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
+ displayName: Build Assets
+ condition: >-
+ or(
+ eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
+ eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
+ eq(variables['isRollingBuild'], true))
+
#
# Build CoreCLR and Libraries with the respective tests
# for the test configurations we run.
@@ -885,13 +900,13 @@ extends:
# WASI/WASM
- - template: /eng/pipelines/common/templates/simple-wasm-build-tests.yml
- parameters:
- platforms:
- - wasi_wasm
- - wasi_wasm_win
- extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
- alwaysRun: ${{ variables.isRollingBuild }}
+ # - template: /eng/pipelines/common/templates/simple-wasm-build-tests.yml
+ # parameters:
+ # platforms:
+ # - wasi_wasm
+ # - wasi_wasm_win
+ # extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
+ # alwaysRun: ${{ variables.isRollingBuild }}
#
# Android devices
@@ -916,7 +931,7 @@ extends:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:EnableAdditionalTimezoneChecks=true
- timeoutInMinutes: 480
+ timeoutInMinutes: 120
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@@ -958,7 +973,7 @@ extends:
testGroup: innerloop
nameSuffix: AllSubsets_CoreCLR
buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true
- timeoutInMinutes: 480
+ timeoutInMinutes: 180
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@@ -1002,7 +1017,7 @@ extends:
testGroup: innerloop
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:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:EnableAggressiveTrimming=true
- timeoutInMinutes: 480
+ timeoutInMinutes: 120
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@@ -1261,6 +1276,7 @@ extends:
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
platforms:
- windows_x86
+ - osx_arm64
helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml
jobParameters:
nameSuffix: Installer_Build_And_Test
diff --git a/eng/references.targets b/eng/references.targets
index 2b0035d3054a1f..6edd9720538136 100644
--- a/eng/references.targets
+++ b/eng/references.targets
@@ -1,4 +1,5 @@
+
<_coreLibProjectReference Include="@(ProjectReference->WithMetadataValue('Identity', '$(CoreLibProject)'))" />
-
+ Configuration=$(CoreCLRConfiguration)Configuration=$(MonoConfiguration)
-
-
-
-
-
-
-
-
+
+
+ <_ProjectReferenceWithOriginalIdentity Include="@(ProjectReference)"
+ OriginalIdentity="%(Identity)" />
+ <_projectReferenceWithFilename Include="@(_ProjectReferenceWithOriginalIdentity->Metadata('Filename'))" />
+
+ <_projectReferenceExcludedWithFilename Include="@(_projectReferenceWithFilename)"
+ Exclude="@(NetCoreAppLibrary)" />
+ <_frameworkProjectReference Include="@(_projectReferenceWithFilename)"
+ Exclude="@(_projectReferenceExcludedWithFilename)" />
+
+
+ all
+ false
+
+
+
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets
index 14bf17e8ed4f93..e9f2e0b48a0873 100644
--- a/eng/resolveContract.targets
+++ b/eng/resolveContract.targets
@@ -119,6 +119,7 @@
true
+ ReferencePathWithRefAssemblies
diff --git a/eng/slngen.targets b/eng/slngen.targets
index d7622098f1e42d..382ca8d684aad5 100644
--- a/eng/slngen.targets
+++ b/eng/slngen.targets
@@ -4,7 +4,7 @@
$(SlnGenSolutionFolder)gen$(SlnGenSolutionInnerFolder)$(SlnGenSolutionFolder)ref$(SlnGenSolutionInnerFolder)$(SlnGenSolutionFolder)tests$(SlnGenSolutionInnerFolder)
- $(SlnGenSolutionFolder)src$(SlnGenSolutionInnerFolder)
+ $(SlnGenSolutionFolder)src$(SlnGenSolutionInnerFolder)
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index 6869d63c852186..15e62c05e04b4e 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -1,16 +1,16 @@
-
-
+
+
$(MicrosoftNetCoreAppFrameworkName)true
@@ -90,26 +90,6 @@
Condition="'$(UseLocalAppHostPack)' == 'true' and '@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))' != 'true'" />
-
-
-
- false
-
-
-
-
-
-
- $(AssemblySearchPaths);$(MicrosoftNetCoreAppRefPackRefDir.TrimEnd('/\'))
- $(DesignTimeAssemblySearchPaths);$(MicrosoftNetCoreAppRefPackRefDir.TrimEnd('/\'))
-
-
-
$(BootstrapRuntimePackDir)/runtimes/$(TargetRid)/native/
$(BootstrapAotSdkDir)/
+
diff --git a/eng/testing/BrowserVersions.props b/eng/testing/BrowserVersions.props
index e09e3c3be90ca0..c7b40839e4a520 100644
--- a/eng/testing/BrowserVersions.props
+++ b/eng/testing/BrowserVersions.props
@@ -1,13 +1,13 @@
- 138.0.7204.49
- 1465706
- https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1465706
- 13.8.258
- 138.0.7204.35
- 1465706
- https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1465706
- 13.8.258
+ 139.0.7258.127
+ 1477651
+ https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1477657
+ 13.9.205
+ 139.0.7258.66
+ 1477651
+ https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1477667
+ 13.9.205125.0.10.34.0125.0.1
diff --git a/eng/testing/scenarios/BuildWasiAppsJobsList.txt b/eng/testing/scenarios/BuildWasiAppsJobsList.txt
index 86c0517585a480..8b137891791fe9 100644
--- a/eng/testing/scenarios/BuildWasiAppsJobsList.txt
+++ b/eng/testing/scenarios/BuildWasiAppsJobsList.txt
@@ -1,7 +1 @@
-Wasi.Build.Tests.InvariantTests
-Wasi.Build.Tests.ILStripTests
-Wasi.Build.Tests.SdkMissingTests
-Wasi.Build.Tests.RuntimeConfigTests
-Wasi.Build.Tests.WasiTemplateTests
-Wasi.Build.Tests.PInvokeTableGeneratorTests
-Wasi.Build.Tests.WasiLibraryModeTests
+
diff --git a/eng/testing/scenarios/BuildWasmAppsJobsList.txt b/eng/testing/scenarios/BuildWasmAppsJobsList.txt
index 82c8b0c827964d..60f2a2187e3e14 100644
--- a/eng/testing/scenarios/BuildWasmAppsJobsList.txt
+++ b/eng/testing/scenarios/BuildWasmAppsJobsList.txt
@@ -14,7 +14,6 @@ Wasm.Build.Tests.Blazor.DllImportTests
Wasm.Build.Tests.Blazor.NativeTests
Wasm.Build.Tests.Blazor.NoopNativeRebuildTest
Wasm.Build.Tests.Blazor.WorkloadRequiredTests
-Wasm.Build.Tests.Blazor.SignalRClientTests
Wasm.Build.Tests.Blazor.EventPipeDiagnosticsTests
Wasm.Build.Tests.BuildPublishTests
Wasm.Build.Tests.ConfigSrcTests
@@ -38,7 +37,6 @@ Wasm.Build.Tests.LibraryInitializerTests
Wasm.Build.Tests.SatelliteLoadingTests
Wasm.Build.Tests.ModuleConfigTests
Wasm.Build.Tests.MemoryTests
-Wasm.Build.Tests.AspNetCore.SignalRClientTests
Wasm.Build.Tests.WasmBuildAppTest
Wasm.Build.Tests.WasmNativeDefaultsTests
Wasm.Build.Tests.WasmRunOutOfAppBundleTests
diff --git a/eng/testing/tests.android.targets b/eng/testing/tests.android.targets
index 4144799c78f908..5bcd9d4bc63d2e 100644
--- a/eng/testing/tests.android.targets
+++ b/eng/testing/tests.android.targets
@@ -28,7 +28,6 @@
AndroidTestRunner.dll$(PublishDir)
- $(BundleDir)
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index fab26560f4b61f..05b2c15a018946 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -1,8 +1,8 @@
- Exe
+ Exe
- $([MSBuild]::NormalizeDirectory('$(OutDir)', 'publish'))
+ $([MSBuild]::NormalizeDirectory('$(OutDir)', 'publish'))$([MSBuild]::NormalizePath('$(BundleDir)', '$(RunScriptOutputName)'))$(TargetRid)
@@ -49,7 +49,8 @@
+ Link="Common\SingleFileTestRunner\SingleFileTestRunner.cs"
+ Condition="'$(IsFunctionalTest)' != 'true'" />
diff --git a/github-merge-flow.jsonc b/github-merge-flow.jsonc
index b42b4e156afa38..0439bc3c57e163 100644
--- a/github-merge-flow.jsonc
+++ b/github-merge-flow.jsonc
@@ -15,6 +15,11 @@
"release/9.0":{
"MergeToBranch": "release/9.0-staging",
"ExtraSwitches": "-QuietComments"
+ },
+ // Automate merging runtime release/10.0-rc1 branch into release/10.0
+ "release/10.0-rc1":{
+ "MergeToBranch": "release/10.0",
+ "ExtraSwitches": "-QuietComments"
}
}
}
diff --git a/global.json b/global.json
index 35c4959162e898..7f8070a6693aec 100644
--- a/global.json
+++ b/global.json
@@ -1,18 +1,18 @@
{
"sdk": {
- "version": "10.0.100-preview.6.25315.102",
+ "version": "10.0.100-rc.1.25411.109",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
- "dotnet": "10.0.100-preview.6.25315.102"
+ "dotnet": "10.0.100-rc.1.25411.109"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25351.106",
- "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25351.106",
- "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25351.106",
+ "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25418.105",
+ "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25418.105",
+ "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25418.105",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
- "Microsoft.NET.Sdk.IL": "10.0.0-preview.7.25351.106"
+ "Microsoft.NET.Sdk.IL": "10.0.0-rc.1.25418.105"
}
}
diff --git a/src/coreclr/.nuget/ILCompiler.Reflection.ReadyToRun.Experimental/ILCompiler.Reflection.ReadyToRun.Experimental.pkgproj b/src/coreclr/.nuget/ILCompiler.Reflection.ReadyToRun.Experimental/ILCompiler.Reflection.ReadyToRun.Experimental.pkgproj
index 0480327017db55..7d202885cc77c5 100644
--- a/src/coreclr/.nuget/ILCompiler.Reflection.ReadyToRun.Experimental/ILCompiler.Reflection.ReadyToRun.Experimental.pkgproj
+++ b/src/coreclr/.nuget/ILCompiler.Reflection.ReadyToRun.Experimental/ILCompiler.Reflection.ReadyToRun.Experimental.pkgproj
@@ -12,11 +12,11 @@
- \lib\netstandard2.0\
+ \lib\$(NetCoreAppMinimum)\$(SystemReflectionMetadataVersion)
- netstandard2.0
+ $(NetCoreAppMinimum)Build,Analyzers
diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
index 7286f655004ca9..b1433e14def45b 100644
--- a/src/coreclr/CMakeLists.txt
+++ b/src/coreclr/CMakeLists.txt
@@ -39,6 +39,10 @@ if (DEFINED CLR_CMAKE_ICU_DIR)
include_directories(${CLR_CMAKE_ICU_DIR}/include)
endif(DEFINED CLR_CMAKE_ICU_DIR)
+if (CLR_CMAKE_TARGET_ARCH_WASM)
+ add_compile_options(-fwasm-exceptions)
+endif()
+
#----------------------------------------------------
# Cross target Component build specific configuration
#----------------------------------------------------
@@ -174,6 +178,12 @@ endif(CLR_CMAKE_HOST_WIN32)
#----------------------------------
include(clrdefinitions.cmake)
+#--------------------------------
+# Data descriptors mechanics
+# - all clr specific data descriptor helpers should be included in this file
+#----------------------------------
+include(clrdatadescriptors.cmake)
+
if(FEATURE_STANDALONE_GC)
add_definitions(-DFEATURE_STANDALONE_GC)
endif(FEATURE_STANDALONE_GC)
diff --git a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
index 2fb4c3e7ffa6bb..c12d6c854ac0c0 100644
--- a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -223,6 +223,7 @@
+
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 7fbb594a1844de..3634e8012c21fd 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
@@ -170,7 +170,7 @@ private static Attribute[] InternalGetCustomAttributes(EventInfo element, Type t
{
rtAdd = rtAdd.GetParentDefinition();
if (rtAdd != null)
- return rtAdd.DeclaringType!.GetEvent(ev.Name!);
+ return rtAdd.DeclaringType!.GetEvent(ev.Name);
}
return null;
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs
index 4e0736cb78aa4f..763259a20a257e 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs
@@ -118,7 +118,7 @@ internal void InitializeSourceInfo(bool fNeedFileInfo, Exception? exception)
// ENC or the source/line info was already retrieved, the method token is 0.
if (rgiMethodToken![index] != 0)
{
- GetSourceLineInfo(s_stackTraceSymbolsCache!, rgAssembly![index], rgAssemblyPath![index]!, rgLoadedPeAddress![index], rgiLoadedPeSize![index], rgiIsFileLayout![index],
+ GetSourceLineInfo(s_stackTraceSymbolsCache, rgAssembly![index], rgAssemblyPath![index], rgLoadedPeAddress![index], rgiLoadedPeSize![index], rgiIsFileLayout![index],
rgInMemoryPdbAddress![index], rgiInMemoryPdbSize![index], rgiMethodToken![index],
rgiILOffset![index], out rgFilename![index], out rgiLineNumber![index], out rgiColumnNumber![index]);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
index 101fbfa7c6bc45..5b05fe76d08136 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
@@ -884,7 +884,7 @@ private static unsafe void ConfigCallback(void* configurationContext, void* name
ref GCConfigurationContext context = ref Unsafe.As(ref *(byte*)configurationContext);
Debug.Assert(context.Configurations != null);
- Dictionary configurationDictionary = context.Configurations!;
+ Dictionary configurationDictionary = context.Configurations;
string nameAsString = Marshal.PtrToStringUTF8((IntPtr)name)!;
switch (type)
diff --git a/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.CoreCLR.cs
index 9740d23843f42b..1c9a4c6c384b29 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.CoreCLR.cs
@@ -9,6 +9,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
+using System.Threading;
namespace System
{
@@ -144,7 +145,7 @@ private bool InvocationListEquals(MulticastDelegate d)
private static bool TrySetSlot(object?[] a, int index, object o)
{
- if (a[index] == null && Threading.Interlocked.CompareExchange