Merge pull request #85995 from swiftlang/revert-85542-revert-85534-revert-71422-docc

Revert "Revert "Revert "build: setup a CMake based build for DocC"""
This commit is contained in:
Mishal Shah
2025-12-11 16:27:53 -08:00
committed by GitHub

View File

@@ -4067,38 +4067,13 @@ function Build-Inspect([Hashtable] $Platform) {
} }
} }
function Build-SymbolKit([hashtable] $Platform) { function Build-DocC() {
Build-CMakeProject ` Build-SPMProject `
-Src $SourceCache\swift-docc-symbolkit ` -Action Build `
-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 `
-Src $SourceCache\swift-docc ` -Src $SourceCache\swift-docc `
-Bin (Get-ProjectBinaryCache $BuildPlatform DocC) ` -Bin $(Get-ProjectBinaryCache $BuildPlatform DocC) `
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" ` -Platform $BuildPlatform `
-Platform $Platform ` --product docc
-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";
}
} }
function Test-PackageManager() { function Test-PackageManager() {
@@ -4473,8 +4448,7 @@ if (-not $SkipBuild -and $IncludeNoAsserts) {
Build-NoAssertsToolchain Build-NoAssertsToolchain
} }
if (-not $SkipBuild) { if (-not $SkipBuild -and -not $IsCrossCompiling) {
Invoke-BuildStep Build-SymbolKit $HostPlatform
Invoke-BuildStep Build-DocC $HostPlatform Invoke-BuildStep Build-DocC $HostPlatform
} }