Skip to content

Commit b72a9e4

Browse files
authored
Update build.ps1
1 parent 98cd0ea commit b72a9e4

File tree

1 file changed

+72
-67
lines changed

1 file changed

+72
-67
lines changed

utils/build.ps1

Lines changed: 72 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,76 +1590,81 @@ function Build-Installer() {
15901590

15911591
#-------------------------------------------------------------------
15921592

1593-
if (-not $SkipBuild) {
1594-
Ensure-WindowsSDK
1595-
}
1596-
1597-
if (-not $SkipBuild) {
1598-
Ensure-SwiftToolchain $HostArch
1599-
Build-BuildTools $HostArch
1600-
Build-Compilers $HostArch
1601-
}
1602-
1603-
foreach ($Arch in $SDKArchs) {
1593+
try {
16041594
if (-not $SkipBuild) {
1605-
Build-ZLib $Arch
1606-
Build-XML2 $Arch
1607-
Build-CURL $Arch
1608-
Build-ICU $Arch
1609-
Build-LLVM $Arch
1610-
1611-
# Build platform: SDK, Redist and XCTest
1612-
Build-Runtime $Arch
1613-
Build-Dispatch $Arch
1614-
Build-Foundation $Arch
1615-
Build-XCTest $Arch
1595+
Ensure-WindowsSDK
16161596
}
1617-
}
1618-
1619-
if (-not $ToBatch) {
1620-
if ($HostArch -in $SDKArchs) {
1621-
Remove-Item -Force -Recurse $RuntimeInstallRoot -ErrorAction Ignore
1622-
Copy-Directory "$($HostArch.SDKInstallRoot)\usr\bin" "$RuntimeInstallRoot\usr"
1597+
1598+
if (-not $SkipBuild) {
1599+
Ensure-SwiftToolchain $HostArch
1600+
Build-BuildTools $HostArch
1601+
Build-Compilers $HostArch
16231602
}
1624-
1625-
Remove-Item -Force -Recurse $PlatformInstallRoot -ErrorAction Ignore
1603+
16261604
foreach ($Arch in $SDKArchs) {
1627-
Install-Platform $Arch
1605+
if (-not $SkipBuild) {
1606+
Build-ZLib $Arch
1607+
Build-XML2 $Arch
1608+
Build-CURL $Arch
1609+
Build-ICU $Arch
1610+
Build-LLVM $Arch
1611+
1612+
# Build platform: SDK, Redist and XCTest
1613+
Build-Runtime $Arch
1614+
Build-Dispatch $Arch
1615+
Build-Foundation $Arch
1616+
Build-XCTest $Arch
1617+
}
16281618
}
1619+
1620+
if (-not $ToBatch) {
1621+
if ($HostArch -in $SDKArchs) {
1622+
Remove-Item -Force -Recurse $RuntimeInstallRoot -ErrorAction Ignore
1623+
Copy-Directory "$($HostArch.SDKInstallRoot)\usr\bin" "$RuntimeInstallRoot\usr"
1624+
}
1625+
1626+
Remove-Item -Force -Recurse $PlatformInstallRoot -ErrorAction Ignore
1627+
foreach ($Arch in $SDKArchs) {
1628+
Install-Platform $Arch
1629+
}
1630+
}
1631+
1632+
if (-not $SkipBuild) {
1633+
Build-SQLite $HostArch
1634+
Build-System $HostArch
1635+
Build-ToolsSupportCore $HostArch
1636+
Build-LLBuild $HostArch
1637+
Build-Yams $HostArch
1638+
Build-ArgumentParser $HostArch
1639+
Build-Driver $HostArch
1640+
Build-Crypto $HostArch
1641+
Build-Collections $HostArch
1642+
Build-ASN1 $HostArch
1643+
Build-Certificates $HostArch
1644+
Build-PackageManager $HostArch
1645+
Build-IndexStoreDB $HostArch
1646+
Build-Syntax $HostArch
1647+
Build-SourceKitLSP $HostArch
1648+
}
1649+
1650+
Install-HostToolchain
1651+
1652+
if (-not $SkipBuild) {
1653+
Build-Inspect $HostArch
1654+
Build-Format $HostArch
1655+
Build-DocC $HostArch
1656+
}
1657+
1658+
if (-not $SkipPackaging) {
1659+
Build-Installer
1660+
}
1661+
1662+
if ($Test -contains "swift") { Build-Compilers $HostArch -Test }
1663+
if ($Test -contains "dispatch") { Build-Dispatch $HostArch -Test }
1664+
if ($Test -contains "foundation") { Build-Foundation $HostArch -Test }
1665+
if ($Test -contains "xctest") { Build-XCTest $HostArch -Test }
1666+
if ($Test -contains "llbuild") { Build-LLBuild $HostArch -Test }
1667+
} catch {
1668+
Write-Error $_
1669+
exit 1
16291670
}
1630-
1631-
if (-not $SkipBuild) {
1632-
Build-SQLite $HostArch
1633-
Build-System $HostArch
1634-
Build-ToolsSupportCore $HostArch
1635-
Build-LLBuild $HostArch
1636-
Build-Yams $HostArch
1637-
Build-ArgumentParser $HostArch
1638-
Build-Driver $HostArch
1639-
Build-Crypto $HostArch
1640-
Build-Collections $HostArch
1641-
Build-ASN1 $HostArch
1642-
Build-Certificates $HostArch
1643-
Build-PackageManager $HostArch
1644-
Build-IndexStoreDB $HostArch
1645-
Build-Syntax $HostArch
1646-
Build-SourceKitLSP $HostArch
1647-
}
1648-
1649-
Install-HostToolchain
1650-
1651-
if (-not $SkipBuild) {
1652-
Build-Inspect $HostArch
1653-
Build-Format $HostArch
1654-
Build-DocC $HostArch
1655-
}
1656-
1657-
if (-not $SkipPackaging) {
1658-
Build-Installer
1659-
}
1660-
1661-
if ($Test -contains "swift") { Build-Compilers $HostArch -Test }
1662-
if ($Test -contains "dispatch") { Build-Dispatch $HostArch -Test }
1663-
if ($Test -contains "foundation") { Build-Foundation $HostArch -Test }
1664-
if ($Test -contains "xctest") { Build-XCTest $HostArch -Test }
1665-
if ($Test -contains "llbuild") { Build-LLBuild $HostArch -Test }

0 commit comments

Comments
 (0)