зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 527770: Enable shared compilation by default for bxl self-host
Enable shared compilation by default for bxl self-host. It can be still turned off explicitly by doing: bxl.cmd -UseManagedSharedCompilation:$false In order to slowly roll out this feature, shared compilation is always turned off for non-internal builds and whenever /ado is passed (to catch azdevops scenarios and keep them unchanged). An extra step in the bxl rolling build is already added to also populate the shared cache with shared compilation on.
This commit is contained in:
Родитель
3a8e6b026c
Коммит
0f9dee53c7
|
@ -320,7 +320,8 @@ endlocal && exit /b 0
|
|||
|
||||
|
||||
:RunBxl
|
||||
call %ENLISTMENTROOT%\Bxl.cmd %*
|
||||
REM Make sure (for now) shared compilation is turned off for any BuildXL invocation under RunCheckInTests
|
||||
call %ENLISTMENTROOT%\Bxl.cmd -UseManagedSharedCompilation:$false %*
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo. 1>&2
|
||||
echo --------------------------------------------------------------- 1>&2
|
||||
|
|
|
@ -136,8 +136,8 @@ param(
|
|||
[Parameter(Mandatory=$false)]
|
||||
[switch]$VsNewAll = $false,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$UseManagedSharedCompilation = $false,
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$UseManagedSharedCompilation = $true,
|
||||
|
||||
[Parameter(ValueFromRemainingArguments=$true)]
|
||||
[string[]]$DominoArguments
|
||||
|
@ -194,13 +194,22 @@ if ($DominoArguments -eq $null) {
|
|||
$DominoArguments = @()
|
||||
}
|
||||
|
||||
if ($UseManagedSharedCompilation) {
|
||||
[Environment]::SetEnvironmentVariable("[Sdk.BuildXL]useManagedSharedCompilation", "1")
|
||||
}
|
||||
|
||||
# Use Env var to check for microsoftInternal
|
||||
$isMicrosoftInternal = [Environment]::GetEnvironmentVariable("[Sdk.BuildXL]microsoftInternal") -eq "1"
|
||||
|
||||
# Even if managed shared compilation was requested to be on, we turn it off when:
|
||||
# - /ado option is present, so AzDevOps scenarios are kept unchanged.
|
||||
# - this is not considered an internal build
|
||||
# We might decide to relax this once shared compilation gets enough mileage.
|
||||
if ($UseManagedSharedCompilation -and
|
||||
(($DominoArguments -like '*/ado*') -or (-not $isMicrosoftInternal))) {
|
||||
$UseManagedSharedCompilation = $false
|
||||
}
|
||||
|
||||
if ($UseManagedSharedCompilation) {
|
||||
[Environment]::SetEnvironmentVariable("[Sdk.BuildXL]useManagedSharedCompilation", "1")
|
||||
}
|
||||
|
||||
# Dev cache adds 5-10s to TTFP due to cache initialization. Since we want tight inner loop (code-test-debug)
|
||||
# to be crisp, we disable dev cache when TestMethod or TestClass is specified, i.e., when testing
|
||||
# a single unit test method or a single unit test class.
|
||||
|
|
Загрузка…
Ссылка в новой задаче