Skip to content

Commit a64d1a5

Browse files
committed
build: add swift-format to the build
`swift-format` is part of the default toolchain distribution and must be built to be packaged.
1 parent bb313f0 commit a64d1a5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

build.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,15 @@ function Build-Inspect() {
13321332
-Xcc "-I$($HostArch.SDKInstallRoot)\usr\include\swift\SwiftRemoteMirror" -Xlinker "$($HostArch.SDKInstallRoot)\usr\lib\swift\windows\$($HostArch.LLVMName)\swiftRemoteMirror.lib"
13331333
}
13341334

1335+
function Build-Format() {
1336+
$OutDir = Join-Path -Path $HostArch.BinaryRoot -ChildPath swift-format
1337+
1338+
Build-SPMProject `
1339+
-Src $SourceCache\swift-format `
1340+
-Bin $OutDir `
1341+
-Arch $HostArch
1342+
}
1343+
13351344
function Build-Installer() {
13361345
Build-WiXProject bld.wixproj -Arch $HostArch -Properties @{
13371346
DEVTOOLS_ROOT = "$($HostArch.ToolchainInstallRoot)\";
@@ -1365,6 +1374,10 @@ function Build-Installer() {
13651374
}
13661375
}
13671376

1377+
Build-WiXProject swift-format.wixproj -Arch $HostArch -Properties @{
1378+
SWIFT_FORMAT_BUILD = "$($HostArch.BinaryRoot)\swift-format\release"
1379+
}
1380+
13681381
Build-WiXProject swift-inspect.wixproj -Arch $HostArch -Properties @{
13691382
SWIFT_INSPECT_BUILD = "$($HostArch.BinaryRoot)\swift-inspect\release"
13701383
}
@@ -1432,6 +1445,7 @@ Install-HostToolchain
14321445

14331446
if (-not $SkipBuild) {
14341447
Build-Inspect $HostArch
1448+
Build-Format $HostArch
14351449
}
14361450

14371451
if (-not $SkipPackaging) {

0 commit comments

Comments
 (0)