diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fd7f9370f..882f5b3e05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,10 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. +if(POLICY CMP0177) + cmake_policy(SET CMP0177 NEW) # install() paths are normalized +endif(POLICY CMP0177) + # Set the project name project(diagnostics) diff --git a/Directory.Build.props b/Directory.Build.props index 7b25fe55b3..10415c69c4 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 fead091366..c6349242c7 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -21,7 +21,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 "__RepoRootDir=%~dp0" @@ -46,6 +46,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 @@ -105,7 +107,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%" @@ -162,13 +164,9 @@ 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 "%__RepoRootDir%\eng\common\msbuild.ps1" "%__RepoRootDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:BuildPrereqs /restore %__CommonBuildArgs% + powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" "%__RepoRootDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:Build /restore %__CommonBuildArgs% if not !errorlevel! == 0 ( echo Generate Version Header FAILED goto ExitWithError @@ -177,9 +175,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 "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__RepoRootDir%" "%__IntermediatesDir%" %VisualStudioVersion% %__HostArch% %__TargetOS% !__ExtraCmakeArgs! @@ -194,9 +194,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: @@ -209,20 +216,6 @@ if %__BuildNative% EQU 1 ( endlocal ) -REM Copy the native SOS binaries to where these tools expect for CI & VS testing - -set "__targetFramework=net8.0" -set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetFramework%" -set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetFramework%" -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/CdacPackageItems.props b/eng/CdacPackageItems.props new file mode 100644 index 0000000000..65e548d057 --- /dev/null +++ b/eng/CdacPackageItems.props @@ -0,0 +1,24 @@ + + + + <_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/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..f8804fd7ab --- /dev/null +++ b/eng/InstallNativePackages.targets @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/InstallRuntimes.proj b/eng/InstallRuntimes.proj index 9dbfd87967..1f13b90d90 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 - -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 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3548bfe0f4..b0bcfce4e3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -43,6 +43,30 @@ 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 + https://github.com/dotnet/dotnet eaa19c281d34580a8168cff9ce1e7337da8bfe4f diff --git a/eng/Versions.props b/eng/Versions.props index 1c0d54f131..7eff06b2c0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -27,6 +27,14 @@ 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 + false diff --git a/eng/build.ps1 b/eng/build.ps1 index 4425cd46ed..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, @@ -38,9 +39,12 @@ 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 +$bl = if ($binaryLog) { '-binaryLog' } else { '' } + if ($ci) { $remainingargs = "-ci " + $remainingargs } @@ -53,17 +57,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 $bl /p:TargetOS=$os /p:TargetArch=$architecture /p:TestArchitectures=$architecture $remainingargs" + if ($lastExitCode -ne 0) { exit $lastExitCode } @@ -81,7 +86,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 +98,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 01df8c8e6a..e84a3eb197 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:Build \ + /restore \ + /p:Configuration="$__BuildType" \ + /p:TargetOS="$__TargetOS" \ + /p:TargetArch="$__TargetArch" \ + /p:TargetRid="$__TargetRid" \ + /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 [ "${PIPESTATUS[0]}" != 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 - __targetFramework=net8.0 - __dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetFramework/publish/$__TargetRid - __dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetFramework/publish/$__TargetRid - - 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="$__TargetRid" \ + $__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="$__TargetRid" \ /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="$__TargetRid" \ /p:DotnetRuntimeVersion="$__DotnetRuntimeVersion" \ /p:DotnetRuntimeDownloadVersion="$__DotnetRuntimeDownloadVersion" \ /p:RuntimeSourceFeed="$__RuntimeSourceFeed" \ diff --git a/eng/native-prereqs.proj b/eng/native-prereqs.proj index bea0af21d1..f017e9d0ac 100644 --- a/eng/native-prereqs.proj +++ b/eng/native-prereqs.proj @@ -67,6 +67,13 @@ - + + + + + diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 6b7cd6b2cb..312312daa3 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -797,6 +797,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/eng/pipelines/build.yml b/eng/pipelines/build.yml index ffc2b959ee..ba061cc2f2 100644 --- a/eng/pipelines/build.yml +++ b/eng/pipelines/build.yml @@ -182,6 +182,7 @@ jobs: - script: $(_buildScript) -ci + -binaryLog -configuration ${{ config.configuration }} -architecture ${{ config.architecture }} $(_TestArgs) diff --git a/eng/pipelines/global-variables.yml b/eng/pipelines/global-variables.yml index fd258a9883..83c51fa583 100644 --- a/eng/pipelines/global-variables.yml +++ b/eng/pipelines/global-variables.yml @@ -69,3 +69,4 @@ variables: - ${{ if eq(parameters.runtimeFeedToken, 'dotnetclimsrc-sas-token-base64') }}: - name: RuntimeFeedBase64SasToken value: $(dotnetclimsrc-read-sas-token-base64) + 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..354c4aad45 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,6 @@ + + diff --git a/src/Tools/dotnet-sos/dotnet-sos.csproj b/src/Tools/dotnet-sos/dotnet-sos.csproj index 36f4431a64..aed14a432f 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,14 @@ - - false - true - $(SOSPackagePathPrefix)/lib - lib/%(Filename)%(Extension) - PreserveNewest - + + false + true + $(SOSPackagePathPrefix)/lib + lib/%(Filename)%(Extension) + PreserveNewest + + + diff --git a/src/sos-packaging.props b/src/sos-packaging.props index f5b6a72e45..d182b2e29f 100644 --- a/src/sos-packaging.props +++ b/src/sos-packaging.props @@ -10,6 +10,7 @@ + @@ -18,38 +19,43 @@ + - - - + + + + - - - + + + - - - + + + - - - + + + + - - - + + + - - - + + + - - - + + + + - - - + + + + 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 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) - -