From 52c746b24ebdd070addd6231e68d88542f6fd677 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 17 Nov 2025 19:36:51 +0900 Subject: [PATCH] Revert "build: setup a CMake based build for DocC" --- utils/build.ps1 | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/utils/build.ps1 b/utils/build.ps1 index 9cf1b37708ba..bd34555dae07 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -4080,38 +4080,13 @@ function Build-Inspect([Hashtable] $Platform) { } } -function Build-SymbolKit([hashtable] $Platform) { - Build-CMakeProject ` - -Src $SourceCache\swift-docc-symbolkit ` - -Bin $(Get-ProjectBinaryCache $Platform SymbolKit) ` - -BuildTargets default ` - -Platform $Platform ` - -UseBuiltCompilers C,Swift ` - -SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) ` - -Defines @{ - CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; - } -} - -function Build-DocC([hashtable] $Platform) { - Build-CMakeProject ` +function Build-DocC() { + Build-SPMProject ` + -Action Build ` -Src $SourceCache\swift-docc ` - -Bin (Get-ProjectBinaryCache $BuildPlatform DocC) ` - -InstallTo "$($Platform.ToolchainInstallRoot)\usr" ` - -Platform $Platform ` - -UseBuiltCompilers C,Swift ` - -SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) ` - -Defines @{ - BUILD_SHARED_LIBS = "YES"; - CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; - ArgumentParser_DIR = (Get-ProjectCMakeModules $Platform ArgumentParser); - SwiftASN1_DIR = (Get-ProjectCMakeModules $Platform ASN1); - SwiftCrypto_DIR = (Get-ProjectCMakeModules $Platform Crypto); - SwiftMarkdown_DIR = (Get-ProjectCMakeModules $Platform Markdown); - LMDB_DIR = (Get-ProjectCMakeModules $Platform LMDB); - SymbolKit_DIR = (Get-ProjectCMakeModules $Platform SymbolKit); - "cmark-gfm_DIR" = "$($Platform.ToolchainInstallRoot)\usr\lib\cmake"; - } + -Bin $(Get-ProjectBinaryCache $BuildPlatform DocC) ` + -Platform $BuildPlatform ` + --product docc } function Test-PackageManager() { @@ -4486,8 +4461,7 @@ if (-not $SkipBuild -and $IncludeNoAsserts) { Build-NoAssertsToolchain } -if (-not $SkipBuild) { - Invoke-BuildStep Build-SymbolKit $HostPlatform +if (-not $SkipBuild -and -not $IsCrossCompiling) { Invoke-BuildStep Build-DocC $HostPlatform }