提交 fcb2ee37 编写于 作者: J Jared Parsons

Fixed determinism and procdump path

上级 6a98a69e
......@@ -61,16 +61,11 @@ function Process-Arguments() {
exit 1
}
$test32 = -not $test64
if ($cibuild) {
$bootstrap = $true
$restore = $true
$build = $true
}
$script:test32 = -not $test64
$script:debug = -not $release
if ($testDeterminism) {
$bootstrap = $true
$script:bootstrap = $true
}
}
......@@ -100,13 +95,17 @@ function Run-MSBuild() {
# Important to not set $script:bootstrapDir here yet as we're actually in the process of
# building the bootstrap.
function Make-BootstrapBuild() {
$bootstrapLog = Join-Path $binariesDir "Bootstrap.log"
Run-MSBuild /p:UseShippingAssemblyVersion=true /p:InitialDefineConstants=BOOTSTRAP "build\Toolset\Toolset.csproj" /p:Configuration=$buildConfiguration /fileloggerparameters:LogFile=$($bootstrapLog)
Write-Host "Building Bootstrap compiler"
Run-MSBuild /p:UseShippingAssemblyVersion=true /p:InitialDefineConstants=BOOTSTRAP "build\Toolset\Toolset.csproj" /p:Configuration=$buildConfiguration /fileloggerparameters:LogFile=$($bootstrapLog) | Out-Host
$dir = Join-Path $binariesDir "Bootstrap"
Remove-Item -re $dir -ErrorAction SilentlyContinue
Create-Directory $dir
Move-Item "$configDir\Exes\Toolset\*" $dir
Run-MSBuild /t:Clean "build\Toolset\Toolset.csproj" /p:Configuration=$buildConfiguration
Write-Host "Cleaning Bootstrap compiler artifacts"
Run-MSBuild /t:Clean "build\Toolset\Toolset.csproj" /p:Configuration=$buildConfiguration | Out-Host
Stop-BuildProcesses
return $dir
}
......@@ -197,7 +196,7 @@ function Test-XUnit() {
$args += " -xml -timeout:50"
$procdumpPath = Ensure-ProcDump
$args += " -procdump:$procDumpPath"
$args += " -procdumppath:$procDumpPath"
}
if ($test64) {
......@@ -293,9 +292,11 @@ try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
Push-Location $repoDir
Write-Host "Repo Dir $repoDir"
Write-Host "Binaries Dir $binariesDir"
Process-Arguments
$debug = -not $release
$buildConfiguration = if ($release) { "Release" } else { "Debug" }
$msbuild = Ensure-MSBuild
$msbuildDir = Split-Path -parent $msbuild
......@@ -321,6 +322,7 @@ try {
}
if ($bootstrap) {
Write-Host "Making bootstrap"
$bootstrapDir = Make-BootstrapBuild
}
......
@echo off
powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\build.ps1" -cibuild -build -restore %*
powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\build.ps1" -cibuild -build -restore -bootstrap %*
[CmdletBinding(PositionalBinding=$false)]
param ( [string]$bootstrapDir = $(throw "Need a directory containing a compiler build to test with"),
param ( [string]$bootstrapDir = "",
[bool]$debugDeterminism = $false)
Set-StrictMode -version 2.0
......@@ -179,7 +179,7 @@ try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
$msbuild = Ensure-MSBuild
if (-not ([IO.Path]::IsPathRooted($script:bootstrapDir))) {
if (($bootstrapDir -eq "") -or (-not ([IO.Path]::IsPathRooted($script:bootstrapDir)))) {
Write-Host "The bootstrap build path must be absolute"
exit 1
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册