Skip to content

Commit 74a93ff

Browse files
authored
improve SDK incremental builds by not running redist-installer layout generation on inner loop builds (#44687)
1 parent 0291838 commit 74a93ff

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

build.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ echo %* | findstr /C:"-pack" >nul
44
if %errorlevel%==0 (
55
set PackInstaller=
66
) else (
7+
REM disable crossgen for inner-loop builds to save a ton of time
78
set PackInstaller=/p:PackInstaller=false
9+
set DISABLE_CROSSGEN=true
810
)
911
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -command "& """%~dp0eng\common\build.ps1""" -restore -build -nativeToolsOnMachine -msbuildEngine dotnet %PackInstaller% %*"
1012
exit /b %ErrorLevel%

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ done
99
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
1010

1111
if [[ "$@" != *"-pack"* ]]; then
12+
# disable crossgen for inner-loop builds to save a ton of time
13+
export DISABLE_CROSSGEN=true
1214
packInstallerFlag="/p:PackInstaller=false"
1315
else
1416
packInstallerFlag=

src/Installer/redist-installer/targets/GenerateLayout.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@
623623

624624
<Target Name="GenerateInternalLayout"
625625
DependsOnTargets="GenerateLayout"
626-
BeforeTargets="AfterBuild">
626+
BeforeTargets="AfterBuild" >
627627
<RemoveDir Directories="$(SdkInternalLayoutPath)" />
628628
<MakeDir Directories="$(SdkInternalLayoutPath)" />
629629

0 commit comments

Comments
 (0)