diff --git a/Directory.Build.props b/Directory.Build.props
index 90b657484e81..12041012176f 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -65,10 +65,20 @@
+
+
+ false
+
+
enable
+
+
+ false
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index d982d2a6f48e..ef3fd206628f 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -555,34 +555,34 @@
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
-
+
https://github.com/dotnet/arcade
- 6e2d8e204cebac7d3989c1996f96e5a9ed63fa80
+ 0890ca08513391dafe556fb326c73c6c5c6cb329
diff --git a/eng/Versions.props b/eng/Versions.props
index d50b86454cd9..458640f5c6df 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -272,10 +272,10 @@
- 9.0.0-beta.25562.4
- 9.0.0-beta.25562.4
- 9.0.0-beta.25562.4
- 9.0.0-beta.25562.4
+ 9.0.0-beta.25577.5
+ 9.0.0-beta.25577.5
+ 9.0.0-beta.25577.5
+ 9.0.0-beta.25577.5
diff --git a/eng/common/core-templates/job/source-build.yml b/eng/common/core-templates/job/source-build.yml
index 5baedac1e03d..1037ccedcb55 100644
--- a/eng/common/core-templates/job/source-build.yml
+++ b/eng/common/core-templates/job/source-build.yml
@@ -65,7 +65,7 @@ jobs:
demands: ImageOverride -equals build.ubuntu.2004.amd64
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')]
- image: 1es-mariner-2
+ image: 1es-azurelinux-3
os: linux
${{ else }}:
pool:
diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml
index 0718e4ba902e..7846584d2a77 100644
--- a/eng/common/core-templates/steps/source-build.yml
+++ b/eng/common/core-templates/steps/source-build.yml
@@ -41,7 +41,7 @@ steps:
# in the default public locations.
internalRuntimeDownloadArgs=
if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then
- internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
+ internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
fi
buildConfig=Release
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index b8fa65f63742..b417781abc62 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -295,7 +295,7 @@ function InstallDotNet([string] $dotnetRoot,
if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" }
if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" }
$runtimePath = $runtimePath + "\" + $version
-
+
$dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'"
if (Test-Path $runtimePath) {
@@ -968,4 +968,4 @@ function Enable-Nuget-EnhancedRetry() {
Write-PipelineSetVariable -Name 'NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'
Write-PipelineSetVariable -Name 'NUGET_RETRY_HTTP_429' -Value 'true'
}
-}
+}
\ No newline at end of file
diff --git a/global.json b/global.json
index 4ca5e154bf1f..3ee42b57d57e 100644
--- a/global.json
+++ b/global.json
@@ -17,8 +17,8 @@
"cmake": "latest"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25562.4",
- "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25562.4",
+ "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25577.5",
+ "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25577.5",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1"
}
diff --git a/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml b/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml
index abca04ac59c0..9bd63a32fe0f 100644
--- a/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml
+++ b/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml
@@ -106,15 +106,19 @@ jobs:
eng/common/build.sh -bl --projects $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj --restore
+ source ./eng/common/tools.sh
+ InitializeDotNetCli true
+
echo "##vso[task.setvariable variable=Platform]$platform"
echo "##vso[task.setvariable variable=MsftSdkTarballPath]$(Pipeline.Workspace)/Artifacts/$msft_sdk_tarball_name"
echo "##vso[task.setvariable variable=SdkTarballPath]$(Pipeline.Workspace)/Artifacts/$sdk_tarball_name"
echo "##vso[task.setvariable variable=SourceBuiltArtifactsPath]$(Pipeline.Workspace)/Artifacts/$artifacts_path"
+ echo "##vso[task.setvariable variable=DotNetPath]$_InitializeDotNetCli"
displayName: Prepare Tests
workingDirectory: $(Build.SourcesDirectory)
- script: >
- .dotnet/dotnet test
+ $(DotNetPath)/dotnet test
$(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj
--filter "Category=SdkContent"
--logger:'trx;LogFileName=$(Agent.JobName)_SDKDiffTests.trx'
@@ -168,6 +172,7 @@ jobs:
- ${{ if and(eq(parameters.publishTestResultsPr, 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release'))) }}:
- template: ../steps/create-baseline-update-pr.yml
parameters:
+ dotnetPath: $(DotNetPath)
pipeline: sdk
repo: dotnet/sdk
originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets
diff --git a/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml b/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml
index 442c59013d4c..0332a9fbc45b 100644
--- a/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml
+++ b/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml
@@ -1,4 +1,8 @@
parameters:
+- name: dotnetPath
+ type: string
+ default: '$(Build.SourcesDirectory)/.dotnet'
+
# The pipeline that is being run
# Used to determine the correct baseline update tool to run
# Currently only supports "sdk" and "license"
@@ -31,7 +35,7 @@ steps:
branchName=$(echo "$(Build.SourceBranch)" | sed 's/refs\/heads\///g')
- .dotnet/dotnet run \
+ ${{ parameters.dotnetPath }}/dotnet run \
--project eng/tools/CreateBaselineUpdatePR/ \
--property:RestoreSources="$restoreSources" \
"${{ parameters.pipeline }}" \
diff --git a/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml b/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml
index adec454e51ed..1eaaa7d2a07e 100644
--- a/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml
+++ b/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml
@@ -159,6 +159,7 @@ jobs:
- script: |
source ./eng/common/tools.sh
InitializeDotNetCli true
+ echo "##vso[task.setvariable variable=DotNetPath]$_InitializeDotNetCli"
displayName: Install .NET SDK
workingDirectory: $(Build.SourcesDirectory)
@@ -176,6 +177,7 @@ jobs:
- template: templates/steps/create-baseline-update-pr.yml
parameters:
+ dotnetPath: $(DotNetPath)
pipeline: license
repo: dotnet/sdk
originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseScanTests
diff --git a/src/SourceBuild/patches/runtime/0001-release-9.0-staging-Add-flags-when-the-clang-s-major.patch b/src/SourceBuild/patches/runtime/0001-release-9.0-staging-Add-flags-when-the-clang-s-major.patch
new file mode 100644
index 000000000000..395dea35c1ae
--- /dev/null
+++ b/src/SourceBuild/patches/runtime/0001-release-9.0-staging-Add-flags-when-the-clang-s-major.patch
@@ -0,0 +1,145 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aaron R Robinson
+Date: Fri, 14 Nov 2025 11:01:28 -0800
+Subject: [PATCH] [release/9.0-staging] Add flags when the clang's major
+ version is > 20.0 (#121151)
+Backport: https://github.com/dotnet/runtime/pull/121151
+
+## Customer Impact
+
+- [x] Customer reported
+- [ ] Found internally
+
+These issues were reported in
+https://github.com/dotnet/runtime/issues/119706 as problems with
+clang-21 on Fedora 43. The investigation uncovered that clang introduced
+a potentially breaking change in clang-20 that we do not currently
+consume. These build changes impact VMR related builds when linux
+distrobutions performing source build adopt clang-21.
+
+clang-20 breaking change log -
+https://releases.llvm.org/20.1.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes.
+
+This PR contains the minimal changes needed to fix issues from the
+following PR https://github.com/dotnet/runtime/pull/120775.
+
+.NET 10: https://github.com/dotnet/runtime/pull/121124
+.NET 8: https://github.com/dotnet/runtime/pull/121150
+
+## Regression
+
+- [ ] Yes
+- [x] No
+
+Build with the new clang-21 compiler will cause the runtime to crash.
+
+## Testing
+
+This has been validated using various legs and examples to demonstrate
+the usage of undefined behavior these flags convert into "defined"
+behavior in C/C++.
+
+## Risk
+
+Low. This has zero impact on our production build since we specifically
+target clang-18. This is only valid for those partners that are using
+clang-20+.
+---
+ eng/native/configurecompiler.cmake | 18 +++++++++++++++---
+ src/coreclr/debug/di/rspriv.h | 4 ++--
+ src/coreclr/debug/di/rsthread.cpp | 12 ++++++------
+ 3 files changed, 23 insertions(+), 11 deletions(-)
+
+diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
+index 109b947e4eb..c114c03a9a1 100644
+--- a/eng/native/configurecompiler.cmake
++++ b/eng/native/configurecompiler.cmake
+@@ -526,9 +526,21 @@ if (CLR_CMAKE_HOST_UNIX)
+ # Disable frame pointer optimizations so profilers can get better call stacks
+ add_compile_options(-fno-omit-frame-pointer)
+
+- # Make signed arithmetic overflow of addition, subtraction, and multiplication wrap around
+- # using twos-complement representation (this is normally undefined according to the C++ spec).
+- add_compile_options(-fwrapv)
++ if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 20.0) OR
++ (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 20.0))
++ # Make signed overflow well-defined. Implies the following flags in clang-20 and above.
++ # -fwrapv - Make signed arithmetic overflow of addition, subtraction, and multiplication wrap around
++ # using twos-complement representation (this is normally undefined according to the C++ spec).
++ # -fwrapv-pointer - The same as -fwrapv but for pointers.
++ add_compile_options(-fno-strict-overflow)
++
++ # Suppress C++ strict aliasing rules. This matches our use of MSVC.
++ add_compile_options(-fno-strict-aliasing)
++ else()
++ # Make signed arithmetic overflow of addition, subtraction, and multiplication wrap around
++ # using twos-complement representation (this is normally undefined according to the C++ spec).
++ add_compile_options(-fwrapv)
++ endif()
+
+ if(CLR_CMAKE_HOST_APPLE)
+ # Clang will by default emit objc_msgSend stubs in Xcode 14, which ld from earlier Xcodes doesn't understand.
+diff --git a/src/coreclr/debug/di/rspriv.h b/src/coreclr/debug/di/rspriv.h
+index 7e2b49b3170..119ca6f7c08 100644
+--- a/src/coreclr/debug/di/rspriv.h
++++ b/src/coreclr/debug/di/rspriv.h
+@@ -6404,8 +6404,8 @@ private:
+ // Lazily initialized.
+ EXCEPTION_RECORD * m_pExceptionRecord;
+
+- static const CorDebugUserState kInvalidUserState = CorDebugUserState(-1);
+- CorDebugUserState m_userState; // This is the current state of the
++ static const int kInvalidUserState = -1;
++ int m_userState; // This is the current state of the
+ // thread, at the time that the
+ // left side synchronized
+
+diff --git a/src/coreclr/debug/di/rsthread.cpp b/src/coreclr/debug/di/rsthread.cpp
+index cd7f79867a5..8c4f3317eff 100644
+--- a/src/coreclr/debug/di/rsthread.cpp
++++ b/src/coreclr/debug/di/rsthread.cpp
+@@ -783,7 +783,7 @@ CorDebugUserState CordbThread::GetUserState()
+ m_userState = pDAC->GetUserState(m_vmThreadToken);
+ }
+
+- return m_userState;
++ return (CorDebugUserState)m_userState;
+ }
+
+
+@@ -887,7 +887,7 @@ HRESULT CordbThread::CreateStepper(ICorDebugStepper ** ppStepper)
+ //Returns true if current user state of a thread is USER_WAIT_SLEEP_JOIN
+ bool CordbThread::IsThreadWaitingOrSleeping()
+ {
+- CorDebugUserState userState = m_userState;
++ int userState = m_userState;
+ if (userState == kInvalidUserState)
+ {
+ //If m_userState is not ready, we'll read from DAC only part of it which
+@@ -3721,14 +3721,14 @@ HRESULT CordbUnmanagedThread::SetupFirstChanceHijackForSync()
+ LOG((LF_CORDB, LL_INFO10000, "CUT::SFCHFS: hijackCtx started as:\n"));
+ LogContext(GetHijackCtx());
+
+- // Save the thread's full context for all platforms except for x86 because we need the
++ // Save the thread's full context for all platforms except for x86 because we need the
+ // DT_CONTEXT_EXTENDED_REGISTERS to avoid getting incomplete information and corrupt the thread context
+ DT_CONTEXT context;
+-#ifdef TARGET_X86
++#ifdef TARGET_X86
+ context.ContextFlags = DT_CONTEXT_FULL | DT_CONTEXT_EXTENDED_REGISTERS;
+ #else
+ context.ContextFlags = DT_CONTEXT_FULL;
+-#endif
++#endif
+
+ BOOL succ = DbiGetThreadContext(m_handle, &context);
+ _ASSERTE(succ);
+@@ -3739,7 +3739,7 @@ HRESULT CordbUnmanagedThread::SetupFirstChanceHijackForSync()
+ LOG((LF_CORDB, LL_ERROR, "CUT::SFCHFS: DbiGetThreadContext error=0x%x\n", error));
+ }
+
+-#ifdef TARGET_X86
++#ifdef TARGET_X86
+ GetHijackCtx()->ContextFlags = DT_CONTEXT_FULL | DT_CONTEXT_EXTENDED_REGISTERS;
+ #else
+ GetHijackCtx()->ContextFlags = DT_CONTEXT_FULL;