Skip to content

Commit fda05f0

Browse files
authored
Merge pull request #79360 from compnerd/build
utils: add the rules to build swift-build
2 parents 51c833f + 06c52ce commit fda05f0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

utils/build.ps1

+24
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ enum HostComponent {
459459
ASN1
460460
Certificates
461461
System
462+
Build
462463
PackageManager
463464
Markdown
464465
Format
@@ -2526,6 +2527,28 @@ function Build-System($Arch) {
25262527
}
25272528
}
25282529

2530+
function Build-Build($Arch) {
2531+
Build-CMakeProject `
2532+
-Src $SourceCache\swift-build `
2533+
-Bin (Get-HostProjectBinaryCache Build) `
2534+
-InstallTo "$($Arch.ToolchainInstallRoot)\usr" `
2535+
-Arch $Arch `
2536+
-Platform Windows `
2537+
-UseBuiltCompilers C,CXX,Swift `
2538+
-SwiftSDK (Get-SwiftSDK Windows) `
2539+
-Defines @{
2540+
BUILD_SHARED_LIBS = "YES";
2541+
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2542+
ArgumentParser_DIR = (Get-HostProjectCMakeModules ArgumentParser);
2543+
LLBuild_DIR = (Get-HostProjectCMakeModules LLBuild);
2544+
SwiftDriver_DIR = (Get-HostProjectCMakeModules Driver);
2545+
SwiftSystem_DIR = (Get-HostProjectCMakeModules System);
2546+
TSC_DIR = (Get-HostProjectCMakeModules ToolsSupportCore);
2547+
SQLite3_INCLUDE_DIR = "$LibraryRoot\sqlite-3.46.0\usr\include";
2548+
SQLite3_LIBRARY = "$LibraryRoot\sqlite-3.46.0\usr\lib\SQLite3.lib";
2549+
}
2550+
}
2551+
25292552
function Build-ToolsSupportCore($Arch) {
25302553
Build-CMakeProject `
25312554
-Src $SourceCache\swift-tools-support-core `
@@ -3246,6 +3269,7 @@ if (-not $SkipBuild) {
32463269
Invoke-BuildStep Build-ASN1 $HostArch
32473270
Invoke-BuildStep Build-Certificates $HostArch
32483271
Invoke-BuildStep Build-System $HostArch
3272+
Invoke-BuildStep Build-Build $HostArch
32493273
Invoke-BuildStep Build-PackageManager $HostArch
32503274
Invoke-BuildStep Build-Markdown $HostArch
32513275
Invoke-BuildStep Build-Format $HostArch

0 commit comments

Comments
 (0)