Skip to content

Commit d0ac192

Browse files
committed
build.ps1: introduce a -SkipBuild option
This is helpful for testing the packaging process where the toolchain build has been completed previously. This enables a more rapid testing cycle for just the packaging which is already a long process.
1 parent 6b9a49b commit d0ac192

File tree

1 file changed

+42
-28
lines changed

1 file changed

+42
-28
lines changed

build.ps1

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ An array of architectures for which the Swift SDK should be built.
3535
The product version to be used when building the installer.
3636
Supports semantic version strings.
3737
38+
.PARAMETER SkipBuild
39+
If set, does not run the build phase.
40+
3841
.PARAMETER SkipRedistInstall
3942
If set, does not create S:\Program Files to mimic an installed redistributable.
4043
@@ -69,6 +72,7 @@ param(
6972
[string] $BuildType = "Release",
7073
[string[]] $SDKs = @("X64","X86","Arm64"),
7174
[string] $ProductVersion = "0.0.0",
75+
[switch] $SkipBuild = $false,
7276
[switch] $SkipRedistInstall = $false,
7377
[switch] $SkipPackaging = $false,
7478
[bool] $DefaultsLLD = $true,
@@ -1359,22 +1363,29 @@ function Build-Installer()
13591363

13601364
#-------------------------------------------------------------------
13611365

1362-
Build-BuildTools $HostArch
1363-
Build-Compilers $HostArch
1366+
if (-not $SkipBuild)
1367+
{
1368+
Build-BuildTools $HostArch
1369+
Build-Compilers $HostArch
1370+
}
1371+
13641372

13651373
foreach ($Arch in $SDKArchs)
13661374
{
1367-
Build-ZLib $Arch
1368-
Build-XML2 $Arch
1369-
Build-CURL $Arch
1370-
Build-ICU $Arch
1371-
Build-LLVM $Arch
1372-
1373-
# Build platform: SDK, Redist and XCTest
1374-
Build-Runtime $Arch
1375-
Build-Dispatch $Arch
1376-
Build-Foundation $Arch
1377-
Build-XCTest $Arch
1375+
if (-not $SkipBuild)
1376+
{
1377+
Build-ZLib $Arch
1378+
Build-XML2 $Arch
1379+
Build-CURL $Arch
1380+
Build-ICU $Arch
1381+
Build-LLVM $Arch
1382+
1383+
# Build platform: SDK, Redist and XCTest
1384+
Build-Runtime $Arch
1385+
Build-Dispatch $Arch
1386+
Build-Foundation $Arch
1387+
Build-XCTest $Arch
1388+
}
13781389

13791390
if (-not $SkipRedistInstall)
13801391
{
@@ -1391,21 +1402,24 @@ if (-not $ToBatch)
13911402
}
13921403
}
13931404

1394-
Build-SQLite $HostArch
1395-
Build-System $HostArch
1396-
Build-ToolsSupportCore $HostArch
1397-
Build-LLBuild $HostArch
1398-
Build-Yams $HostArch
1399-
Build-ArgumentParser $HostArch
1400-
Build-Driver $HostArch
1401-
Build-Crypto $HostArch
1402-
Build-Collections $HostArch
1403-
Build-ASN1 $HostArch
1404-
Build-Certificates $HostArch
1405-
Build-PackageManager $HostArch
1406-
Build-IndexStoreDB $HostArch
1407-
Build-Syntax $HostArch
1408-
Build-SourceKitLSP $HostArch
1405+
if (-not $SkipBuild)
1406+
{
1407+
Build-SQLite $HostArch
1408+
Build-System $HostArch
1409+
Build-ToolsSupportCore $HostArch
1410+
Build-LLBuild $HostArch
1411+
Build-Yams $HostArch
1412+
Build-ArgumentParser $HostArch
1413+
Build-Driver $HostArch
1414+
Build-Crypto $HostArch
1415+
Build-Collections $HostArch
1416+
Build-ASN1 $HostArch
1417+
Build-Certificates $HostArch
1418+
Build-PackageManager $HostArch
1419+
Build-IndexStoreDB $HostArch
1420+
Build-Syntax $HostArch
1421+
Build-SourceKitLSP $HostArch
1422+
}
14091423

14101424
Install-HostToolchain
14111425

0 commit comments

Comments
 (0)