Skip to content

Consume cDac package and other cleanup #5482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
369d947
Consume cDac package and other cleanup
Apr 30, 2025
95e84fc
Fix linux build breaks
May 13, 2025
5747f07
Merge remote-tracking branch 'upstream/main' into use_cdac_package
steveisok Jun 6, 2025
42d80d8
Revert output control change and fix setting arch prop
steveisok Jun 9, 2025
6048ec1
PR feedback
steveisok Jul 2, 2025
ae469d4
Merge remote-tracking branch 'upstream/main' into use_cdac_package
steveisok Jul 2, 2025
11a56ab
More PR feedback
steveisok Jul 2, 2025
3a5292c
Merge remote-tracking branch 'upstream/main' into use_cdac_package
steveisok Jul 2, 2025
7378077
Move InstallNativeFiles into sos-packaging.targets
steveisok Jul 3, 2025
5d86cae
Merge remote-tracking branch 'upstream/main' into use_cdac_package
steveisok Jul 3, 2025
eec089c
Wrong version for the transport packs
steveisok Jul 3, 2025
14c55d9
Build binlog on non-windows builds
steveisok Jul 3, 2025
cf4ad31
Use __TargetRid instead of __OutputRid
steveisok Jul 3, 2025
0c220ff
Pass through -binaryLog switch on windows. Make bundling cdac optiona…
steveisok Jul 12, 2025
ca6bcee
Add -binaryLog switch inline on the build yml
steveisok Jul 12, 2025
dce253d
Only copy cdac binaries if PackageWithCdac is true
steveisok Jul 12, 2025
0b4568c
PR Feedback
steveisok Jul 15, 2025
7221378
Add yml option to bundle cdac
steveisok Jul 15, 2025
b2226f4
bad yml
steveisok Jul 15, 2025
ceec407
Even worse yml
steveisok Jul 15, 2025
48dfb28
Yml
steveisok Jul 15, 2025
d3162e5
Ugh
steveisok Jul 15, 2025
441ed07
Maybe this works
steveisok Jul 15, 2025
1fd15a1
Undo yml change
steveisok Jul 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Any reason no to normalize everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to stop the warning on Windows. It is fine on other build platforms

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen it in newer linux versions of the containers.

endif(POLICY CMP0177)


# Set the project name
project(diagnostics)
Expand Down
30 changes: 30 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,35 @@
<RepositoryName>diagnostics</RepositoryName>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!--
$(TargetOS) - target operating system (win, linux, osx). Defaults to host OS.
$(TargetArch) - architecture to test (x64, x86, arm, arm64). Defaults to host architecture.
$(TargetRid) - the runtime identifier (rid) to against (win-x64, linux-arm64, linux-musl-x64, etc).
$(Configuration) - configuration to test (Debug, Release). Defaults to Debug.
$(ArtifactsBinDir) - artifacts\bin directory
-->

<PropertyGroup Condition="'$(TargetOS)' == ''">
<TargetOS>linux</TargetOS>
<TargetOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">Windows_NT</TargetOS>
<TargetOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">linux</TargetOS>
<TargetOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">osx</TargetOS>
</PropertyGroup>

<PropertyGroup>
<TargetArch Condition="'$(TargetArch)' == ''">$(Platform)</TargetArch>
<TargetArch Condition="'$(TargetArch)' == 'AnyCpu'">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</TargetArch>
<ArtifactsBinNativeDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', '$(TargetOS).$(TargetArch).$(Configuration)'))</ArtifactsBinNativeDir>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetRid)' == ''">
<TargetRidOS>$(TargetOS)</TargetRidOS>
<TargetRidOS Condition="'$(TargetOS)' == 'Windows_NT'">win</TargetRidOS>
<TargetRid>$(TargetRidOS)-$(TargetArch)</TargetRid>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this give us linux-x64 on musl? I remember mike having to use this for a case, but not sure if it's doing what's expected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't apparently break obviously since it gets funneled down from buildnative. This does mean something like dotnet build <project> won't work in linux-musl

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TargetRid is set by the build native script so yes dotnet build <project> doesn't work. This does assume everything is built with our build.sh/build.ps1 scripts.

</PropertyGroup>

<PropertyGroup>
<DesktopTargetFramework>net462</DesktopTargetFramework>
<!--
Expand All @@ -37,4 +66,5 @@
<!-- This is the list of TFMs we build our unit tests as. -->
<SupportedXUnitTestTargetFrameworks>net8.0</SupportedXUnitTestTargetFrameworks>
</PropertyGroup>

</Project>
45 changes: 19 additions & 26 deletions eng/Build-Native.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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%"
Expand Down Expand Up @@ -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
Expand All @@ -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!
Expand All @@ -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:
Expand All @@ -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!
Expand Down
24 changes: 24 additions & 0 deletions eng/CdacPackageItems.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project>
<!--
*MicrosoftDotNetCdacTransportVersion is from Versions.props. This is how we integrate the cDAC transport packs into our builds
-->
<PropertyGroup>
<_cdacPackageVersion Condition="'$(TargetRid)' == 'win-x64'">$(runtimewinx64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

silly nit - do we ever foresee them being versioned separately? If not - pick one. It'd be best if we had the IL only one, but we don't yet so let's leave this for cleanup.

<_cdacPackageVersion Condition="'$(TargetRid)' == 'win-arm64'">$(runtimewinarm64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion>
<_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-x64'">$(runtimelinuxx64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion>
<_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-arm64'">$(runtimelinuxarm64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion>
<_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-x64'">$(runtimeosxx64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion>
<_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-arm64'">$(runtimeosxarm64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion>
</PropertyGroup>

<ItemGroup>
<PackageDownload Condition="'$(_cdacPackageVersion)' != ''"
Include="runtime.$(TargetRid).Microsoft.DotNet.Cdac.Transport"
Version="[$(_cdacPackageVersion)]" />
</ItemGroup>

<ItemGroup>
<PackageSourceFiles Condition="'$(_cdacPackageVersion)' != ''"
Include="$(NuGetPackageRoot)runtime.$(TargetRid).microsoft.dotnet.cdac.transport\$(_cdacPackageVersion)\runtimes\$(TargetRid)\native\*" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions eng/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props"/>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project>
</Project>
38 changes: 38 additions & 0 deletions eng/InstallNativePackages.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<!--
$(ArtifactsBinNativeDir) - Native artifacts directory (e.g. artifacts\bin\Windows_NT.x64.Debug).
$(TargetRid) - Target runtime identifier (e.g. win-x64, linux-x64, osx-x64).

From Versions.props:

$(MicrosoftDiaSymReaderNativeVersion)

From Arcade:

$(NuGetPackageRoot) - nuget packages root directory
-->

<ItemGroup>
<PackageDownload Include="Microsoft.DiaSymReader.Native" Version="[$(MicrosoftDiaSymReaderNativeVersion)]" Condition="'$(OS)' == 'Windows_NT'" />
</ItemGroup>

<ItemGroup>
<PackageSourceFiles Include="$(NuGetPackageRoot)microsoft.diasymreader.native\$(MicrosoftDiaSymReaderNativeVersion)\runtimes\$(TargetRid)\native\*" Condition="'$(OS)' == 'Windows_NT'" />
</ItemGroup>

<Import Condition="'$(PackageWithCDac)' == 'true'" Project="$(RepositoryEngineeringDir)CdacPackageItems.props" />

<!--
Installs the above packages into the $(ArtifactsBinNativeDir) directory.
-->
<Target Name="InstallNativePackages">
<Message Importance="High" Text="Installing packages to $(ArtifactsBinNativeDir)..." />

<Copy SourceFiles="@(PackageSourceFiles)" DestinationFolder="$(ArtifactsBinNativeDir)" SkipUnchangedFiles="false">
<Output TaskParameter="CopiedFiles" ItemName="CopiedPackageFiles" />
</Copy>

<Message Importance="High" Text="Installed packages: @(CopiedPackageFiles)" />
</Target>
</Project>
11 changes: 5 additions & 6 deletions eng/InstallRuntimes.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project Sdk="Microsoft.Build.NoTargets">
<!--
$(BuildArch) - architecture to test (x64, x86, arm, arm64). Defaults to x64.
$(TargetArch) - architecture to test (x64, x86, arm, arm64). Defaults to x64.
$(LiveRuntimeDir) - path to the locally built runtime to use for testing.

From Versions.props:

Expand All @@ -18,23 +19,21 @@
-->

<PropertyGroup>
<BuildArch Condition="'$(BuildArch)' == ''">$(Platform)</BuildArch>
<BuildArch Condition="'$(BuildArch)' == 'AnyCpu'">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</BuildArch>
<LiveRuntimeDir Condition="'$(LiveRuntimeDir)' != ''">$([MSBuild]::NormalizePath('$(LiveRuntimeDir)'))</LiveRuntimeDir>
</PropertyGroup>

<PropertyGroup Condition="'$(BuildArch)' != 'x86'">
<PropertyGroup Condition="'$(TargetArch)' != 'x86'">
<DotNetInstallRoot>$(RepoRoot).dotnet-test\</DotNetInstallRoot>
<RegistryRoot>HKEY_LOCAL_MACHINE\SOFTWARE</RegistryRoot>
</PropertyGroup>

<PropertyGroup Condition="'$(BuildArch)' == 'x86'">
<PropertyGroup Condition="'$(TargetArch)' == 'x86'">
<DotNetInstallRoot>$(RepoRoot).dotnet-test\x86\</DotNetInstallRoot>
<RegistryRoot>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node</RegistryRoot>
</PropertyGroup>

<PropertyGroup>
<CommonInstallArgs>-NoPath -SkipNonVersionedFiles -Architecture $(BuildArch) -InstallDir $(DotNetInstallRoot)</CommonInstallArgs>
<CommonInstallArgs>-NoPath -SkipNonVersionedFiles -Architecture $(TargetArch) -InstallDir $(DotNetInstallRoot)</CommonInstallArgs>
<DotNetInstallDir>$([MSBuild]::NormalizeDirectory('$(DotNetInstallRoot)', 'shared', 'Microsoft.NETCore.App', '$(MicrosoftNETCoreAppRefVersion)'))</DotNetInstallDir>
<TestConfigFileName>$(DotNetInstallRoot)Debugger.Tests.Versions.txt</TestConfigFileName>
</PropertyGroup>
Expand Down
24 changes: 24 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,30 @@
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="runtime.win-x64.Microsoft.DotNet.Cdac.Transport" Version="10.0.0-preview.7.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="runtime.win-arm64.Microsoft.DotNet.Cdac.Transport" Version="10.0.0-preview.7.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.DotNet.Cdac.Transport" Version="10.0.0-preview.7.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="runtime.linux-arm64.Microsoft.DotNet.Cdac.Transport" Version="10.0.0-preview.7.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="runtime.osx-x64.Microsoft.DotNet.Cdac.Transport" Version="10.0.0-preview.7.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="runtime.osx-arm64.Microsoft.DotNet.Cdac.Transport" Version="10.0.0-preview.7.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="5.0.0-1.25351.106">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>eaa19c281d34580a8168cff9ce1e7337da8bfe4f</Sha>
Expand Down
8 changes: 8 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
<!-- dotnet/installer: Testing version of the SDK. Needed for the signed & entitled host. -->
<MicrosoftNETSdkVersion>10.0.100-preview.7.25351.106</MicrosoftNETSdkVersion>
</PropertyGroup>
<PropertyGroup>
<runtimewinx64MicrosoftDotNetCdacTransportVersion>10.0.0-preview.7.25351.106</runtimewinx64MicrosoftDotNetCdacTransportVersion>
<runtimewinarm64MicrosoftDotNetCdacTransportVersion>10.0.0-preview.7.25351.106</runtimewinarm64MicrosoftDotNetCdacTransportVersion>
<runtimelinuxx64MicrosoftDotNetCdacTransportVersion>10.0.0-preview.7.25351.106</runtimelinuxx64MicrosoftDotNetCdacTransportVersion>
<runtimelinuxarm64MicrosoftDotNetCdacTransportVersion>10.0.0-preview.7.25351.106</runtimelinuxarm64MicrosoftDotNetCdacTransportVersion>
<runtimeosxx64MicrosoftDotNetCdacTransportVersion>10.0.0-preview.7.25351.106</runtimeosxx64MicrosoftDotNetCdacTransportVersion>
<runtimeosxarm64MicrosoftDotNetCdacTransportVersion>10.0.0-preview.7.25351.106</runtimeosxarm64MicrosoftDotNetCdacTransportVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Opt-in/out repo features -->
<UsingToolXliff>false</UsingToolXliff>
Expand Down
24 changes: 15 additions & 9 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Param(
[switch] $installruntimes,
[switch] $privatebuild,
[switch] $ci,
[switch][Alias('bl')]$binaryLog,
[switch] $skipmanaged,
[switch] $skipnative,
[switch] $bundletools,
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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"
}
Expand All @@ -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" `
Expand Down
Loading