From 369d9471b8cad4258aceed49fcc6a7765725ccc2 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 29 Apr 2025 18:29:16 -0700 Subject: [PATCH 01/20] Consume cDac package and other cleanup Create a InstallNativePackages.proj that downloads the native diasymreader and cdac packages Add InstallNativePackages to native-prereqs.proj Move the native binary copies out of the build.sh/build-native.cmd scripts to the appropriate managed project Move the rest of the binary copying from the cmake files to the managed projects Switch the Windows native builds to use ninja. Add the -msbuild/-ninja build-native.cmd options. --- CMakeLists.txt | 1 + Directory.Build.props | 30 +++++++ eng/Build-Native.cmd | 43 ++++----- eng/Directory.Build.props | 3 +- eng/InstallNativePackages.targets | 55 ++++++++++++ eng/InstallRuntimes.proj | 9 +- eng/Version.Details.xml | 24 +++++ eng/Versions.props | 8 ++ eng/build.ps1 | 21 +++-- eng/build.sh | 88 +++++++++---------- eng/native-prereqs.proj | 10 ++- eng/native/configurecompiler.cmake | 2 + src/Directory.Build.props | 4 +- src/SOS/CMakeLists.txt | 1 - src/SOS/SOS.Extensions/CMakeLists.txt | 21 ----- src/SOS/SOS.Extensions/SOS.Extensions.csproj | 12 ++- .../Debuggees/DesktopClrHost/CMakeLists.txt | 9 +- .../Debuggees/WebApp3/WebApp3.csproj | 10 +++ src/Tools/dotnet-dump/dotnet-dump.csproj | 15 +++- src/Tools/dotnet-sos/dotnet-sos.csproj | 29 ++++-- src/sos-packaging.props | 54 +++++++----- src/tests/Directory.Build.props | 6 -- 22 files changed, 298 insertions(+), 157 deletions(-) create mode 100644 eng/InstallNativePackages.targets delete mode 100644 src/SOS/SOS.Extensions/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fd7f9370f..558593a922 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. +cmake_policy(SET CMP0177 NEW) # install() paths are normalized # Set the project name project(diagnostics) diff --git a/Directory.Build.props b/Directory.Build.props index 393951b02c..73f2526736 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,6 +21,35 @@ diagnostics + + + + + + linux + Windows_NT + linux + osx + + + + $(Platform) + $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', '$(TargetOS).$(TargetArch).$(Configuration)')) + + + + $(TargetOS) + win + $(TargetRidOS)-$(TargetArch) + + net462 net8.0 + diff --git a/eng/Build-Native.cmd b/eng/Build-Native.cmd index 28f101cf53..9a5021f227 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -39,7 +39,7 @@ set __TargetOS=Windows_NT set __BuildNative=1 set __CI=0 set __Verbosity=minimal -set __Ninja=0 +set __Ninja=1 :: Set the various build properties here so that CMake and MSBuild can pick them up set "__ProjectDir=%~dp0" @@ -64,6 +64,8 @@ if /i "%1" == "--help" goto Usage if /i "%1" == "-configuration" (set __BuildType=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) if /i "%1" == "-architecture" (set __TargetArch=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) if /i "%1" == "-verbosity" (set __Verbosity=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop) +if /i "%1" == "-msbuild" (set __Ninja=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-ninja" (set __Ninja=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-ci" (set __CI=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) :: These options are ignored for a native build @@ -116,7 +118,7 @@ set "__CMakeBinDir=%__BinDir%" set "__CMakeBinDir=%__CMakeBinDir:\=/%" :: Common msbuild arguments -set "__CommonBuildArgs=/v:!__Verbosity! /p:Configuration=%__BuildType% /p:BuildArch=%__TargetArch% %__UnprocessedBuildArgs%" +set "__CommonBuildArgs=/v:!__Verbosity! /p:Configuration=%__BuildType% /p:TargetOS=%__TargetOS% /p:TargetArch=%__TargetArch% %__UnprocessedBuildArgs%" if not exist "%__BinDir%" md "%__BinDir%" if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%" @@ -173,10 +175,6 @@ if %__BuildNative% EQU 1 ( goto ExitWithError ) - if %__Ninja% EQU 1 ( - set __ExtraCmakeArgs="-DCMAKE_BUILD_TYPE=!__BuildType!" - ) - echo Generating Version Header set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog" powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:BuildPrereqs /restore %__CommonBuildArgs% @@ -188,9 +186,11 @@ if %__BuildNative% EQU 1 ( echo %__MsgPrefix%Regenerating the Visual Studio solution - set "__ManagedBinaryDir=%__RootBinDir%\bin" - set "__ManagedBinaryDir=!__ManagedBinaryDir:\=/!" - set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%" + if %__Ninja% EQU 1 ( + set __ExtraCmakeArgs="-DCMAKE_BUILD_TYPE=!__BuildType!" + ) + + set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" pushd "%__IntermediatesDir%" call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__HostArch% %__TargetOS% !__ExtraCmakeArgs! @@ -205,9 +205,16 @@ if %__BuildNative% EQU 1 ( goto ExitWithError ) set __BuildLog="%__LogDir%\Native.Build.binlog" + set __CmakeBuildToolArgs= + if %__Ninja% EQU 1 ( + set __CmakeBuildToolArgs= + ) else ( + REM We pass the /m flag directly to MSBuild so that we can get both MSBuild and CL parallelism, which is fastest for our builds. + set __CmakeBuildToolArgs=/bl:!__BuildLog! !__CommonBuildArgs! + ) - echo running "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- /bl:!__BuildLog! !__CommonBuildArgs! - "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- /bl:!__BuildLog! !__CommonBuildArgs! + echo running "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- !__CmakeBuildToolArgs! + "%CMakePath%" --build %__IntermediatesDir% --target install --config %__BuildType% -- !__CmakeBuildToolArgs! if not !ERRORLEVEL! == 0 ( echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details: @@ -220,20 +227,6 @@ if %__BuildNative% EQU 1 ( endlocal ) -REM Copy the native SOS binaries to where these tools expect for CI & VS testing - -set "__targetRid=net8.0" -set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetRid%" -set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetRid%" -mkdir %__dotnet_sos%\win-%__TargetArch% -mkdir %__dotnet_sos%\publish\win-%__TargetArch% -mkdir %__dotnet_dump%\win-%__TargetArch% -mkdir %__dotnet_dump%\publish\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_sos%\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_sos%\publish\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_dump%\win-%__TargetArch% -xcopy /y /q /i %__BinDir% %__dotnet_dump%\publish\win-%__TargetArch% - REM ========================================================================================= REM === REM === All builds complete! diff --git a/eng/Directory.Build.props b/eng/Directory.Build.props index fc1ff6e1d1..0f8214b1b2 100644 --- a/eng/Directory.Build.props +++ b/eng/Directory.Build.props @@ -1,4 +1,3 @@ - - \ No newline at end of file + diff --git a/eng/InstallNativePackages.targets b/eng/InstallNativePackages.targets new file mode 100644 index 0000000000..a6607bb3b0 --- /dev/null +++ b/eng/InstallNativePackages.targets @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/InstallRuntimes.proj b/eng/InstallRuntimes.proj index 9dbfd87967..0cb0fedc12 100644 --- a/eng/InstallRuntimes.proj +++ b/eng/InstallRuntimes.proj @@ -1,7 +1,8 @@ - $(Platform) - $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) $([MSBuild]::NormalizePath('$(LiveRuntimeDir)')) - + $(RepoRoot).dotnet-test\ HKEY_LOCAL_MACHINE\SOFTWARE - + $(RepoRoot).dotnet-test\x86\ HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bb331b6c82..05da5c8fa2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -43,6 +43,30 @@ https://github.com/dotnet/dotnet f5705c8f4c5079bba77bae8698ba1583bde0388c + + https://github.com/dotnet/runtime + c4bc9b0821921ec58eeaf0ab923d291259165dd9 + + + https://github.com/dotnet/runtime + c4bc9b0821921ec58eeaf0ab923d291259165dd9 + + + https://github.com/dotnet/runtime + c4bc9b0821921ec58eeaf0ab923d291259165dd9 + + + https://github.com/dotnet/runtime + c4bc9b0821921ec58eeaf0ab923d291259165dd9 + + + https://github.com/dotnet/runtime + c4bc9b0821921ec58eeaf0ab923d291259165dd9 + + + https://github.com/dotnet/runtime + c4bc9b0821921ec58eeaf0ab923d291259165dd9 + https://github.com/dotnet/dotnet f5705c8f4c5079bba77bae8698ba1583bde0388c diff --git a/eng/Versions.props b/eng/Versions.props index 84ecb76522..f565cba7dc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -27,6 +27,14 @@ 10.0.100-preview.6.25276.103 + + 10.0.0-preview.5.25261.1 + 10.0.0-preview.5.25261.1 + 10.0.0-preview.5.25261.1 + 10.0.0-preview.5.25261.1 + 10.0.0-preview.5.25260.104 + 10.0.0-preview.5.25260.104 + false diff --git a/eng/build.ps1 b/eng/build.ps1 index 4425cd46ed..8b14694831 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -38,6 +38,7 @@ switch ($configuration.ToLower()) { $reporoot = Join-Path $PSScriptRoot ".." $engroot = Join-Path $reporoot "eng" $artifactsdir = Join-Path $reporoot "artifacts" +$os = "Windows_NT" $logdir = Join-Path $artifactsdir "log" $logdir = Join-Path $logdir Windows_NT.$architecture.$configuration @@ -53,17 +54,18 @@ if ($bundletools) { $test = $False } -# Install sdk for building, restore and build managed components. -if (-not $skipmanaged) { - Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity /p:BuildArch=$architecture /p:TestArchitectures=$architecture $remainingargs" +# Build native components +if (-not $skipnative) { + Invoke-Expression "& `"$engroot\Build-Native.cmd`" -architecture $architecture -configuration $configuration -verbosity $verbosity $remainingargs" if ($lastExitCode -ne 0) { exit $lastExitCode } } -# Build native components -if (-not $skipnative) { - Invoke-Expression "& `"$engroot\Build-Native.cmd`" -architecture $architecture -configuration $configuration -verbosity $verbosity $remainingargs" +# Install sdk for building, restore and build managed components. +if (-not $skipmanaged) { + Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity /p:TargetOS=$os /p:TargetArch=$architecture /p:TestArchitectures=$architecture $remainingargs" + if ($lastExitCode -ne 0) { exit $lastExitCode } @@ -81,7 +83,8 @@ if ($installruntimes -or $privatebuild) { /t:InstallTestRuntimes ` /bl:$logdir\InstallRuntimes.binlog ` /p:PrivateBuildTesting=$privatebuildtesting ` - /p:BuildArch=$architecture ` + /p:TargetOS=$os ` + /p:TargetArch=$architecture ` /p:TestArchitectures=$architecture ` /p:LiveRuntimeDir="$liveRuntimeDir" } @@ -92,14 +95,14 @@ if ($test) { if ($useCdac) { $env:SOS_TEST_CDAC="true" } - & "$engroot\common\build.ps1" ` -test ` -configuration $configuration ` -verbosity $verbosity ` -ci:$ci ` /bl:$logdir\Test.binlog ` - /p:BuildArch=$architecture ` + /p:TargetOS=$os ` + /p:TargetArch=$architecture ` /p:TestArchitectures=$architecture ` /p:DotnetRuntimeVersion="$dotnetruntimeversion" ` /p:DotnetRuntimeDownloadVersion="$dotnetruntimedownloadversion" ` diff --git a/eng/build.sh b/eng/build.sh index e505a5c80d..ea55b02756 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -137,49 +137,17 @@ mkdir -p "$__IntermediatesDir" mkdir -p "$__LogsDir" mkdir -p "$__CMakeBinDir" -__ExtraCmakeArgs="$__CMakeArgs $__ExtraCmakeArgs -DCLR_MANAGED_BINARY_DIR=$__RootBinDir/bin -DCLR_BUILD_TYPE=$__BuildType" +__ExtraCmakeArgs="$__CMakeArgs $__ExtraCmakeArgs -DCLR_BUILD_TYPE=$__BuildType" # Specify path to be set for CMAKE_INSTALL_PREFIX. # This is where all built native libraries will copied to. export __CMakeBinDir="$__BinDir" - if [[ "$__TargetArch" == "armel" ]]; then # Armel cross build is Tizen specific and does not support Portable RID build __PortableBuild=0 fi -# -# Managed build -# - -if [[ "$__ManagedBuild" == 1 ]]; then - - echo "Commencing managed build for $__BuildType in $__RootBinDir/bin" - "$__RepoRootDir/eng/common/build.sh" --configuration "$__BuildType" $__CommonMSBuildArgs $__ManagedBuildArgs $__UnprocessedBuildArgs - - if [ "$?" != 0 ]; then - exit 1 - fi - - echo "Generating Version Source File" - __GenerateVersionLog="$__LogsDir/GenerateVersion.binlog" - - "$__RepoRootDir/eng/common/msbuild.sh" \ - $__RepoRootDir/eng/native-prereqs.proj \ - /bl:$__GenerateVersionLog \ - /t:BuildPrereqs \ - /restore \ - /p:Configuration="$__BuildType" \ - /p:Platform="$__TargetArch" \ - $__UnprocessedBuildArgs - - if [ $? != 0 ]; then - echo "Generating Version Source File FAILED" - exit 1 - fi -fi - # # Setup LLDB paths for native build # @@ -215,6 +183,26 @@ fi # Build native components # if [[ "$__NativeBuild" == 1 ]]; then + echo "Generating Version Source File" + __GenerateVersionLog="$__LogsDir/GenerateVersion.binlog" + + "$__RepoRootDir/eng/common/msbuild.sh" \ + $__RepoRootDir/eng/native-prereqs.proj \ + /bl:$__GenerateVersionLog \ + /t:BuildPrereqs \ + /restore \ + /p:Configuration="$__BuildType" \ + /p:TargetOS="$__TargetOS" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__OutputRid" \ + /p:Platform="$__TargetArch" \ + $__UnprocessedBuildArgs + + if [ $? != 0 ]; then + echo "Generating Version Source File FAILED" + exit 1 + fi + build_native "$__TargetOS" "$__TargetArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" | tee "$__LogsDir"/make.log if [ "$?" != 0 ]; then @@ -224,22 +212,24 @@ if [[ "$__NativeBuild" == 1 ]]; then fi # -# Copy the native SOS binaries to where these tools expect for testing +# Managed build # -if [[ "$__NativeBuild" == 1 || "$__Test" == 1 ]]; then - __targetRid=net8.0 - __dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetRid/publish/$__OutputRid - __dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetRid/publish/$__OutputRid - - mkdir -p "$__dotnet_sos" - mkdir -p "$__dotnet_dump" +if [[ "$__ManagedBuild" == 1 ]]; then - cp "$__BinDir"/* "$__dotnet_sos" - echo "Copied SOS to $__dotnet_sos" + # __CommonMSBuildArgs contains TargetOS property + echo "Commencing managed build for $__BuildType in $__RootBinDir/bin" + "$__RepoRootDir/eng/common/build.sh" \ + --configuration "$__BuildType" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__OutputRid" \ + $__CommonMSBuildArgs \ + $__ManagedBuildArgs \ + $__UnprocessedBuildArgs - cp "$__BinDir"/* "$__dotnet_dump" - echo "Copied SOS to $__dotnet_dump" + if [ "$?" != 0 ]; then + exit 1 + fi fi # @@ -257,7 +247,9 @@ if [[ "$__InstallRuntimes" == 1 || "$__PrivateBuild" == 1 ]]; then /t:InstallTestRuntimes \ /bl:"$__LogsDir/InstallRuntimes.binlog" \ /p:PrivateBuildTesting="$__privateBuildTesting" \ - /p:BuildArch="$__TargetArch" \ + /p:TargetOS="$__TargetOS" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__OutputRid" \ /p:TestArchitectures="$__TargetArch" \ /p:LiveRuntimeDir="$__LiveRuntimeDir" fi @@ -310,11 +302,13 @@ if [[ "$__Test" == 1 ]]; then export SOS_TEST_CDAC="true" fi + # __CommonMSBuildArgs contains TargetOS property "$__RepoRootDir/eng/common/build.sh" \ --test \ --configuration "$__BuildType" \ /bl:"$__LogsDir"/Test.binlog \ - /p:BuildArch="$__TargetArch" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__OutputRid" \ /p:DotnetRuntimeVersion="$__DotnetRuntimeVersion" \ /p:DotnetRuntimeDownloadVersion="$__DotnetRuntimeDownloadVersion" \ /p:RuntimeSourceFeed="$__RuntimeSourceFeed" \ diff --git a/eng/native-prereqs.proj b/eng/native-prereqs.proj index bea0af21d1..ea9b73cfed 100644 --- a/eng/native-prereqs.proj +++ b/eng/native-prereqs.proj @@ -14,6 +14,10 @@ .NET Diagnostics + + @@ -67,6 +71,10 @@ - + + + diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 35367f9605..97d008e77f 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -799,6 +799,8 @@ if (MSVC) add_compile_options($<$:/fp:precise>) # Enable precise floating point # Disable C++ RTTI + # /GR is added by default by CMake, so remove it manually. + string(REPLACE "/GR " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") add_compile_options($<$:/FC>) # use full pathnames in diagnostics diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ed7c3a0764..c2d80f41ed 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,5 @@ - false @@ -12,6 +11,5 @@ - + diff --git a/src/SOS/CMakeLists.txt b/src/SOS/CMakeLists.txt index e1de7aff33..901a26e428 100644 --- a/src/SOS/CMakeLists.txt +++ b/src/SOS/CMakeLists.txt @@ -25,5 +25,4 @@ add_compile_definitions(SOS_INCLUDE) add_compile_definitions(DISABLE_CONTRACTS) add_subdirectory(extensions) -add_subdirectory(SOS.Extensions) add_subdirectory(Strike) diff --git a/src/SOS/SOS.Extensions/CMakeLists.txt b/src/SOS/SOS.Extensions/CMakeLists.txt deleted file mode 100644 index b6aa9bf8c3..0000000000 --- a/src/SOS/SOS.Extensions/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -project(SOS.Extensions) - -if(NOT ${NUGET_PACKAGES} STREQUAL "") - set(DIASYMREADER_ARCH ${CLR_CMAKE_TARGET_ARCH}) - - if(NOT(CLR_CMAKE_TARGET_ARCH STREQUAL CLR_CMAKE_HOST_ARCH)) - set(DIASYMREADER_ARCH ${CLR_CMAKE_HOST_ARCH}) - endif() - - if (DIASYMREADER_ARCH STREQUAL x64) - set(DIASYMREADER_ARCH amd64) - endif() - - install(FILES ${NUGET_PACKAGES}/microsoft.diasymreader.native/17.10.0-beta1.24272.1/runtimes/win/native/Microsoft.DiaSymReader.Native.${DIASYMREADER_ARCH}.dll DESTINATION . ) -endif() - -if(NOT ${CLR_MANAGED_BINARY_DIR} STREQUAL "") - set(MANAGED_BINDIR ${CLR_MANAGED_BINARY_DIR}/SOS.Extensions/${CLR_BUILD_TYPE}/netstandard2.0/publish) - file(GLOB installfiles ${MANAGED_BINDIR}/*.dll ${MANAGED_BINDIR}/*.pdb) - install(FILES ${installfiles} DESTINATION . ) -endif() diff --git a/src/SOS/SOS.Extensions/SOS.Extensions.csproj b/src/SOS/SOS.Extensions/SOS.Extensions.csproj index a1ecf2ce33..f61bf5d269 100644 --- a/src/SOS/SOS.Extensions/SOS.Extensions.csproj +++ b/src/SOS/SOS.Extensions/SOS.Extensions.csproj @@ -12,7 +12,6 @@ - @@ -23,4 +22,15 @@ + + + + + + + + + diff --git a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt b/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt index 6d1aeff17a..567493fa1e 100644 --- a/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt +++ b/src/SOS/SOS.UnitTests/Debuggees/DesktopClrHost/CMakeLists.txt @@ -29,8 +29,11 @@ set(DESKTOPCLRHOST_LIBRARY add_library_clr(DesktopClrHost SHARED ${DESKTOPCLRHOST_SOURCES}) +# When building with ninja we need to explicitly link against the 4.8.1 version of the .NET Framework SDK because it is the only one that supports ARM64. +if(CLR_CMAKE_TARGET_ARCH_ARM64) + target_link_directories(DesktopClrHost PRIVATE "$ENV{WindowsSdkDir}/../NETFXSDK/4.8.1/Lib/um/arm64") +endif(CLR_CMAKE_TARGET_ARCH_ARM64) + target_link_libraries(DesktopClrHost ${DESKTOPCLRHOST_LIBRARY}) -install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net8.0) -install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net9.0) -install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net10.0) +install_clr(TARGETS DesktopClrHost DESTINATIONS .) diff --git a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj b/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj index 2ec653657d..e7d9777bc6 100644 --- a/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj +++ b/src/SOS/SOS.UnitTests/Debuggees/WebApp3/WebApp3.csproj @@ -5,4 +5,14 @@ $(SupportedSubProcessTargetFrameworks) + + + + + + + + diff --git a/src/Tools/dotnet-dump/dotnet-dump.csproj b/src/Tools/dotnet-dump/dotnet-dump.csproj index d9326669b4..09d7d35aec 100644 --- a/src/Tools/dotnet-dump/dotnet-dump.csproj +++ b/src/Tools/dotnet-dump/dotnet-dump.csproj @@ -1,4 +1,4 @@ - + $(NetCoreAppMinTargetFramework) @@ -36,4 +36,17 @@ + + + + + + $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) + + + + + diff --git a/src/Tools/dotnet-sos/dotnet-sos.csproj b/src/Tools/dotnet-sos/dotnet-sos.csproj index 36f4431a64..9ebd23e45f 100644 --- a/src/Tools/dotnet-sos/dotnet-sos.csproj +++ b/src/Tools/dotnet-sos/dotnet-sos.csproj @@ -1,4 +1,4 @@ - + $(NetCoreAppMinTargetFramework) dotnet-sos @@ -21,12 +21,25 @@ - - false - true - $(SOSPackagePathPrefix)/lib - lib/%(Filename)%(Extension) - PreserveNewest - + + false + true + $(SOSPackagePathPrefix)/lib + lib/%(Filename)%(Extension) + PreserveNewest + + + + + + + $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) + + + + + diff --git a/src/sos-packaging.props b/src/sos-packaging.props index f5b6a72e45..9e54fc3f1a 100644 --- a/src/sos-packaging.props +++ b/src/sos-packaging.props @@ -10,6 +10,7 @@ + @@ -18,38 +19,43 @@ + - - - + + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + + - - - + + + + - - - + + + + diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index 9abe7d34cd..e36d68d633 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -1,9 +1,3 @@ - - - $(Platform) - $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) - - From 95e84fc9c9af5cdc2d8bf400d259edcad36c6b2c Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 13 May 2025 09:40:42 -0700 Subject: [PATCH 02/20] Fix linux build breaks --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 558593a922..583f9e5ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,9 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. -cmake_policy(SET CMP0177 NEW) # install() paths are normalized +if(CLR_CMAKE_HOST_WIN32) + cmake_policy(SET CMP0177 NEW) # install() paths are normalized +endif(CLR_CMAKE_HOST_WIN32) # Set the project name project(diagnostics) From 42d80d85628a4c4d2eb203d1bb94f85c5e8d4ee5 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Mon, 9 Jun 2025 08:56:00 -0400 Subject: [PATCH 03/20] Revert output control change and fix setting arch prop --- eng/InstallRuntimes.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/InstallRuntimes.proj b/eng/InstallRuntimes.proj index 0cb0fedc12..1f13b90d90 100644 --- a/eng/InstallRuntimes.proj +++ b/eng/InstallRuntimes.proj @@ -33,7 +33,7 @@ - -NoPath -SkipNonVersionedFiles -Architecture $(BuildArch) -InstallDir $(DotNetInstallRoot) + -NoPath -SkipNonVersionedFiles -Architecture $(TargetArch) -InstallDir $(DotNetInstallRoot) $([MSBuild]::NormalizeDirectory('$(DotNetInstallRoot)', 'shared', 'Microsoft.NETCore.App', '$(MicrosoftNETCoreAppRefVersion)')) $(DotNetInstallRoot)Debugger.Tests.Versions.txt From 6048ec15cc4e330fdc8866640f5363d244f1c42d Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Wed, 2 Jul 2025 18:15:37 -0400 Subject: [PATCH 04/20] PR feedback --- CMakeLists.txt | 5 +++-- eng/native-prereqs.proj | 7 +++---- src/Tools/dotnet-sos/dotnet-sos.csproj | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 583f9e5ab1..882f5b3e05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,10 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. -if(CLR_CMAKE_HOST_WIN32) +if(POLICY CMP0177) cmake_policy(SET CMP0177 NEW) # install() paths are normalized -endif(CLR_CMAKE_HOST_WIN32) +endif(POLICY CMP0177) + # Set the project name project(diagnostics) diff --git a/eng/native-prereqs.proj b/eng/native-prereqs.proj index ea9b73cfed..f017e9d0ac 100644 --- a/eng/native-prereqs.proj +++ b/eng/native-prereqs.proj @@ -14,10 +14,6 @@ .NET Diagnostics - - @@ -77,4 +73,7 @@ + + diff --git a/src/Tools/dotnet-sos/dotnet-sos.csproj b/src/Tools/dotnet-sos/dotnet-sos.csproj index 9ebd23e45f..d8f13b95d6 100644 --- a/src/Tools/dotnet-sos/dotnet-sos.csproj +++ b/src/Tools/dotnet-sos/dotnet-sos.csproj @@ -33,7 +33,7 @@ - + $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) From 11a56abe32a2f489be87d180c9a87e1509f03e4a Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Wed, 2 Jul 2025 18:42:38 -0400 Subject: [PATCH 05/20] More PR feedback --- eng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/build.sh b/eng/build.sh index 1a7d516798..88d9d1d880 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -189,7 +189,7 @@ if [[ "$__NativeBuild" == 1 ]]; then "$__RepoRootDir/eng/common/msbuild.sh" \ $__RepoRootDir/eng/native-prereqs.proj \ /bl:$__GenerateVersionLog \ - /t:BuildPrereqs \ + /t:Build \ /restore \ /p:Configuration="$__BuildType" \ /p:TargetOS="$__TargetOS" \ From 73780770d5f840427342831b3d202c3ee63db490 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Thu, 3 Jul 2025 11:22:10 -0400 Subject: [PATCH 06/20] Move InstallNativeFiles into sos-packaging.targets --- src/Tools/dotnet-dump/dotnet-dump.csproj | 13 +------------ src/Tools/dotnet-sos/dotnet-sos.csproj | 13 +------------ src/sos-packaging.targets | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 24 deletions(-) create mode 100644 src/sos-packaging.targets diff --git a/src/Tools/dotnet-dump/dotnet-dump.csproj b/src/Tools/dotnet-dump/dotnet-dump.csproj index 09d7d35aec..354c4aad45 100644 --- a/src/Tools/dotnet-dump/dotnet-dump.csproj +++ b/src/Tools/dotnet-dump/dotnet-dump.csproj @@ -37,16 +37,5 @@ - - - - - $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) - - - - - + diff --git a/src/Tools/dotnet-sos/dotnet-sos.csproj b/src/Tools/dotnet-sos/dotnet-sos.csproj index d8f13b95d6..aed14a432f 100644 --- a/src/Tools/dotnet-sos/dotnet-sos.csproj +++ b/src/Tools/dotnet-sos/dotnet-sos.csproj @@ -30,16 +30,5 @@ - - - - - $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) - - - - - + diff --git a/src/sos-packaging.targets b/src/sos-packaging.targets new file mode 100644 index 0000000000..18a2a56952 --- /dev/null +++ b/src/sos-packaging.targets @@ -0,0 +1,14 @@ + + + + + + $([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('linux-musl', 'linux')) + + + + + + \ No newline at end of file From eec089c19167ea0ab48821bef4112b4f7caf916b Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Thu, 3 Jul 2025 13:30:58 -0400 Subject: [PATCH 07/20] Wrong version for the transport packs --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3426970423..b0bcfce4e3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -43,27 +43,27 @@ https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f - + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f diff --git a/eng/Versions.props b/eng/Versions.props index aa93d64118..7eff06b2c0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -28,12 +28,12 @@ 10.0.100-preview.7.25351.106 - 10.0.100-preview.7.25351.106 - 10.0.100-preview.7.25351.106 - 10.0.100-preview.7.25351.106 - 10.0.100-preview.7.25351.106 - 10.0.100-preview.7.25351.106 - 10.0.100-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 + 10.0.0-preview.7.25351.106 From 14c55d99de8254fa0cf78a01146ce1e3748b1ff5 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Thu, 3 Jul 2025 15:58:05 -0400 Subject: [PATCH 08/20] Build binlog on non-windows builds --- eng/pipelines/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index ffc2b959ee..3c3b450e69 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -133,6 +133,9 @@ jobs: - _TestArgs: '-test' - _Cross: '' + - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - _buildLog: '-binaryLog' + - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - _buildScript: $(Build.SourcesDirectory)\build.cmd - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: @@ -184,6 +187,7 @@ jobs: -ci -configuration ${{ config.configuration }} -architecture ${{ config.architecture }} + $(_buildLog) $(_TestArgs) $(_Cross) $(_InternalInstallArgs) From cf4ad31ce346d2fec6ef2c33d28373d13d328477 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Thu, 3 Jul 2025 18:04:15 -0400 Subject: [PATCH 09/20] Use __TargetRid instead of __OutputRid --- eng/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/build.sh b/eng/build.sh index 88d9d1d880..e84a3eb197 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -194,7 +194,7 @@ if [[ "$__NativeBuild" == 1 ]]; then /p:Configuration="$__BuildType" \ /p:TargetOS="$__TargetOS" \ /p:TargetArch="$__TargetArch" \ - /p:TargetRid="$__OutputRid" \ + /p:TargetRid="$__TargetRid" \ /p:Platform="$__TargetArch" \ $__UnprocessedBuildArgs @@ -222,7 +222,7 @@ if [[ "$__ManagedBuild" == 1 ]]; then "$__RepoRootDir/eng/common/build.sh" \ --configuration "$__BuildType" \ /p:TargetArch="$__TargetArch" \ - /p:TargetRid="$__OutputRid" \ + /p:TargetRid="$__TargetRid" \ $__CommonMSBuildArgs \ $__ManagedBuildArgs \ $__UnprocessedBuildArgs @@ -249,7 +249,7 @@ if [[ "$__InstallRuntimes" == 1 || "$__PrivateBuild" == 1 ]]; then /p:PrivateBuildTesting="$__privateBuildTesting" \ /p:TargetOS="$__TargetOS" \ /p:TargetArch="$__TargetArch" \ - /p:TargetRid="$__OutputRid" \ + /p:TargetRid="$__TargetRid" \ /p:TestArchitectures="$__TargetArch" \ /p:LiveRuntimeDir="$__LiveRuntimeDir" fi @@ -308,7 +308,7 @@ if [[ "$__Test" == 1 ]]; then --configuration "$__BuildType" \ /bl:"$__LogsDir"/Test.binlog \ /p:TargetArch="$__TargetArch" \ - /p:TargetRid="$__OutputRid" \ + /p:TargetRid="$__TargetRid" \ /p:DotnetRuntimeVersion="$__DotnetRuntimeVersion" \ /p:DotnetRuntimeDownloadVersion="$__DotnetRuntimeDownloadVersion" \ /p:RuntimeSourceFeed="$__RuntimeSourceFeed" \ From 0c220ff984f45516bbde3a62084a51a1d165ec58 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Sat, 12 Jul 2025 11:07:01 -0400 Subject: [PATCH 10/20] Pass through -binaryLog switch on windows. Make bundling cdac optional with a PackageWithCDac property --- eng/CdacPackageItems.props | 22 ++++++++++++++++++++++ eng/InstallNativePackages.targets | 21 ++------------------- eng/build.ps1 | 5 ++++- 3 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 eng/CdacPackageItems.props diff --git a/eng/CdacPackageItems.props b/eng/CdacPackageItems.props new file mode 100644 index 0000000000..e1c66da826 --- /dev/null +++ b/eng/CdacPackageItems.props @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/InstallNativePackages.targets b/eng/InstallNativePackages.targets index a6607bb3b0..f8804fd7ab 100644 --- a/eng/InstallNativePackages.targets +++ b/eng/InstallNativePackages.targets @@ -7,13 +7,6 @@ From Versions.props: $(MicrosoftDiaSymReaderNativeVersion) - - $(runtimewinx64MicrosoftDotNetCdacTransportVersion) - $(runtimewinarm64MicrosoftDotNetCdacTransportVersion) - $(runtimelinuxx64MicrosoftDotNetCdacTransportVersion) - $(runtimelinuxarm64MicrosoftDotNetCdacTransportVersion) - $(runtimeosxx64MicrosoftDotNetCdacTransportVersion) - $(runtimeosxarm64MicrosoftDotNetCdacTransportVersion) From Arcade: @@ -22,24 +15,14 @@ - - - - - - - - - - - - + + diff --git a/eng/build.ps1 b/eng/build.ps1 index 8b14694831..15f2d14f7e 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -7,6 +7,7 @@ Param( [switch] $installruntimes, [switch] $privatebuild, [switch] $ci, + [switch][Alias('bl')]$binaryLog, [switch] $skipmanaged, [switch] $skipnative, [switch] $bundletools, @@ -42,6 +43,8 @@ $os = "Windows_NT" $logdir = Join-Path $artifactsdir "log" $logdir = Join-Path $logdir Windows_NT.$architecture.$configuration +$bl = if ($binaryLog) { '-binaryLog' } else { '' } + if ($ci) { $remainingargs = "-ci " + $remainingargs } @@ -64,7 +67,7 @@ if (-not $skipnative) { # Install sdk for building, restore and build managed components. if (-not $skipmanaged) { - Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity /p:TargetOS=$os /p:TargetArch=$architecture /p:TestArchitectures=$architecture $remainingargs" + Invoke-Expression "& `"$engroot\common\build.ps1`" -configuration $configuration -verbosity $verbosity $bl /p:TargetOS=$os /p:TargetArch=$architecture /p:TestArchitectures=$architecture $remainingargs" if ($lastExitCode -ne 0) { exit $lastExitCode From ca6bceeda1e1b96e193c6738bd80ab1f7139ae22 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Sat, 12 Jul 2025 11:09:30 -0400 Subject: [PATCH 11/20] Add -binaryLog switch inline on the build yml --- eng/pipelines/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index 3c3b450e69..f753ef069b 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -133,9 +133,6 @@ jobs: - _TestArgs: '-test' - _Cross: '' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - _buildLog: '-binaryLog' - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - _buildScript: $(Build.SourcesDirectory)\build.cmd - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: @@ -185,6 +182,7 @@ jobs: - script: $(_buildScript) -ci + -binaryLog -configuration ${{ config.configuration }} -architecture ${{ config.architecture }} $(_buildLog) From dce253d72f7c2fb6bec8b27f5e062d043c1d824c Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Sat, 12 Jul 2025 11:52:11 -0400 Subject: [PATCH 12/20] Only copy cdac binaries if PackageWithCdac is true --- src/sos-packaging.props | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sos-packaging.props b/src/sos-packaging.props index 9e54fc3f1a..d182b2e29f 100644 --- a/src/sos-packaging.props +++ b/src/sos-packaging.props @@ -10,7 +10,7 @@ - + @@ -19,11 +19,11 @@ - + - + @@ -36,7 +36,7 @@ - + @@ -49,12 +49,12 @@ - + - + From 0b4568cd9354d76ed34baba4a0ff85df61feebc9 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 13:56:28 -0400 Subject: [PATCH 13/20] PR Feedback --- eng/CdacPackageItems.props | 23 +++++++++++------------ eng/pipelines/build.yml | 1 - 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/eng/CdacPackageItems.props b/eng/CdacPackageItems.props index e1c66da826..ec2ddc6fee 100644 --- a/eng/CdacPackageItems.props +++ b/eng/CdacPackageItems.props @@ -2,21 +2,20 @@ + + <_cdacPackageVersion Condition="'$(TargetRid)' == 'win-x64'">$(runtimewinx64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'win-arm64'">$(runtimewinarm64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-x64'">$(runtimelinuxx64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-arm64'">$(runtimelinuxarm64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-x64'">$(runtimeosxx64MicrosoftDotNetCdacTransportVersion) + <_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-arm64'">$(runtimeosxarm64MicrosoftDotNetCdacTransportVersion) + + - - - - - - + - - - - - - + \ No newline at end of file diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index f753ef069b..ba061cc2f2 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -185,7 +185,6 @@ jobs: -binaryLog -configuration ${{ config.configuration }} -architecture ${{ config.architecture }} - $(_buildLog) $(_TestArgs) $(_Cross) $(_InternalInstallArgs) From 7221378799c1c9d0da7b9aa9b0e1b7d2e80b5cdc Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 16:03:05 -0400 Subject: [PATCH 14/20] Add yml option to bundle cdac --- eng/pipelines/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index ba061cc2f2..0d161f9611 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -133,6 +133,9 @@ jobs: - _TestArgs: '-test' - _Cross: '' + - ${{ if eq($(PackageWithCDac), 'true') }}: + - _ExtraBuildProps: '/p:PackageWithCDac=true' + - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - _buildScript: $(Build.SourcesDirectory)\build.cmd - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: @@ -189,6 +192,7 @@ jobs: $(_Cross) $(_InternalInstallArgs) /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + $(_ExtraBuildProps) ${{ if eq(parameters.testOnly, 'true') }}: displayName: Test ${{ elseif eq(parameters.buildOnly, 'true') }}: From b2226f4fd37a9b5a95d6dbe3bcb5cccca8eee563 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 16:08:18 -0400 Subject: [PATCH 15/20] bad yml --- eng/pipelines/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index 0d161f9611..9857f6a994 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -133,7 +133,7 @@ jobs: - _TestArgs: '-test' - _Cross: '' - - ${{ if eq($(PackageWithCDac), 'true') }}: + - ${{ if eq(variables.PackageWithCDac, 'true') }}: - _ExtraBuildProps: '/p:PackageWithCDac=true' - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: From ceec407cec11fd0fa2bc59bf3420ea457dd82a92 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 16:34:33 -0400 Subject: [PATCH 16/20] Even worse yml --- eng/pipelines/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index 9857f6a994..5bfb7e4629 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -133,8 +133,7 @@ jobs: - _TestArgs: '-test' - _Cross: '' - - ${{ if eq(variables.PackageWithCDac, 'true') }}: - - _ExtraBuildProps: '/p:PackageWithCDac=true' + - _ExtraBuildProps: $[eq(variables['PackageWithCDac'], 'true'), '/p:PackageWithCDac=true', ''] - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - _buildScript: $(Build.SourcesDirectory)\build.cmd From 48dfb28c331982407878fbb35ea0ac895744e0d1 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 16:49:59 -0400 Subject: [PATCH 17/20] Yml --- eng/pipelines/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index 5bfb7e4629..8faa5a4782 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -77,6 +77,11 @@ parameters: type: boolean default: false +- name: _PackageWithCDac + value: $[ eq(variables['PackageWithCDac'], 'true') ] + default: '' + + jobs: - ${{ each config in parameters.buildConfigs }}: - template: ${{ parameters.jobTemplate }} @@ -133,7 +138,9 @@ jobs: - _TestArgs: '-test' - _Cross: '' - - _ExtraBuildProps: $[eq(variables['PackageWithCDac'], 'true'), '/p:PackageWithCDac=true', ''] + - _ExtraBuildProps: '' + - ${{ if eq(variables['_PackageWithCDac'], 'true') }}: + - _ExtraBuildProps: '/p:PackageWithCDac=true' - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - _buildScript: $(Build.SourcesDirectory)\build.cmd From d3162e564d125360bab08c757d4323336ea68eb9 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 16:54:15 -0400 Subject: [PATCH 18/20] Ugh --- eng/pipelines/build.yml | 5 ----- eng/pipelines/global-variables.yml | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index 8faa5a4782..229b94b123 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -77,11 +77,6 @@ parameters: type: boolean default: false -- name: _PackageWithCDac - value: $[ eq(variables['PackageWithCDac'], 'true') ] - default: '' - - jobs: - ${{ each config in parameters.buildConfigs }}: - template: ${{ parameters.jobTemplate }} diff --git a/eng/pipelines/global-variables.yml b/eng/pipelines/global-variables.yml index fd258a9883..2ae10b71c7 100644 --- a/eng/pipelines/global-variables.yml +++ b/eng/pipelines/global-variables.yml @@ -69,3 +69,7 @@ variables: - ${{ if eq(parameters.runtimeFeedToken, 'dotnetclimsrc-sas-token-base64') }}: - name: RuntimeFeedBase64SasToken value: $(dotnetclimsrc-read-sas-token-base64) +- ${{ if eq(variables['PackageWithCDac'], 'true') }}: + - name: _PackageWithCDac + value: 'true' + From 441ed07a03c59952969e5355fc48f9986d9daf33 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 17:46:51 -0400 Subject: [PATCH 19/20] Maybe this works --- eng/pipelines/global-variables.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/global-variables.yml b/eng/pipelines/global-variables.yml index 2ae10b71c7..5b1d2b866b 100644 --- a/eng/pipelines/global-variables.yml +++ b/eng/pipelines/global-variables.yml @@ -69,7 +69,6 @@ variables: - ${{ if eq(parameters.runtimeFeedToken, 'dotnetclimsrc-sas-token-base64') }}: - name: RuntimeFeedBase64SasToken value: $(dotnetclimsrc-read-sas-token-base64) -- ${{ if eq(variables['PackageWithCDac'], 'true') }}: - - name: _PackageWithCDac - value: 'true' +- name: _PackageWithCDac + value: $[ eq(variables['PackageWithCDac'], 'true') ] From 1fd15a1f399bfbce0b0d57b31fc2815ddac75766 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 15 Jul 2025 17:53:22 -0400 Subject: [PATCH 20/20] Undo yml change --- eng/CdacPackageItems.props | 7 +++++-- eng/pipelines/build.yml | 5 ----- eng/pipelines/global-variables.yml | 2 -- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/eng/CdacPackageItems.props b/eng/CdacPackageItems.props index ec2ddc6fee..65e548d057 100644 --- a/eng/CdacPackageItems.props +++ b/eng/CdacPackageItems.props @@ -12,10 +12,13 @@ - + - + \ No newline at end of file diff --git a/eng/pipelines/build.yml b/eng/pipelines/build.yml index 229b94b123..ba061cc2f2 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -133,10 +133,6 @@ jobs: - _TestArgs: '-test' - _Cross: '' - - _ExtraBuildProps: '' - - ${{ if eq(variables['_PackageWithCDac'], 'true') }}: - - _ExtraBuildProps: '/p:PackageWithCDac=true' - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - _buildScript: $(Build.SourcesDirectory)\build.cmd - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: @@ -193,7 +189,6 @@ jobs: $(_Cross) $(_InternalInstallArgs) /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - $(_ExtraBuildProps) ${{ if eq(parameters.testOnly, 'true') }}: displayName: Test ${{ elseif eq(parameters.buildOnly, 'true') }}: diff --git a/eng/pipelines/global-variables.yml b/eng/pipelines/global-variables.yml index 5b1d2b866b..83c51fa583 100644 --- a/eng/pipelines/global-variables.yml +++ b/eng/pipelines/global-variables.yml @@ -69,6 +69,4 @@ variables: - ${{ if eq(parameters.runtimeFeedToken, 'dotnetclimsrc-sas-token-base64') }}: - name: RuntimeFeedBase64SasToken value: $(dotnetclimsrc-read-sas-token-base64) -- name: _PackageWithCDac - value: $[ eq(variables['PackageWithCDac'], 'true') ]