Skip to content

Commit d7f61f6

Browse files
shahmishalelsakeirouz
authored andcommitted
Revert "Revert "Revert "build: setup a CMake based build for DocC"""
1 parent fcb005b commit d7f61f6

File tree

1 file changed

+7
-33
lines changed

1 file changed

+7
-33
lines changed

utils/build.ps1

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4067,38 +4067,13 @@ function Build-Inspect([Hashtable] $Platform) {
40674067
}
40684068
}
40694069

4070-
function Build-SymbolKit([hashtable] $Platform) {
4071-
Build-CMakeProject `
4072-
-Src $SourceCache\swift-docc-symbolkit `
4073-
-Bin $(Get-ProjectBinaryCache $Platform SymbolKit) `
4074-
-BuildTargets default `
4075-
-Platform $Platform `
4076-
-UseBuiltCompilers C,Swift `
4077-
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
4078-
-Defines @{
4079-
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
4080-
}
4081-
}
4082-
4083-
function Build-DocC([hashtable] $Platform) {
4084-
Build-CMakeProject `
4070+
function Build-DocC() {
4071+
Build-SPMProject `
4072+
-Action Build `
40854073
-Src $SourceCache\swift-docc `
4086-
-Bin (Get-ProjectBinaryCache $BuildPlatform DocC) `
4087-
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" `
4088-
-Platform $Platform `
4089-
-UseBuiltCompilers C,Swift `
4090-
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
4091-
-Defines @{
4092-
BUILD_SHARED_LIBS = "YES";
4093-
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
4094-
ArgumentParser_DIR = (Get-ProjectCMakeModules $Platform ArgumentParser);
4095-
SwiftASN1_DIR = (Get-ProjectCMakeModules $Platform ASN1);
4096-
SwiftCrypto_DIR = (Get-ProjectCMakeModules $Platform Crypto);
4097-
SwiftMarkdown_DIR = (Get-ProjectCMakeModules $Platform Markdown);
4098-
LMDB_DIR = (Get-ProjectCMakeModules $Platform LMDB);
4099-
SymbolKit_DIR = (Get-ProjectCMakeModules $Platform SymbolKit);
4100-
"cmark-gfm_DIR" = "$($Platform.ToolchainInstallRoot)\usr\lib\cmake";
4101-
}
4074+
-Bin $(Get-ProjectBinaryCache $BuildPlatform DocC) `
4075+
-Platform $BuildPlatform `
4076+
--product docc
41024077
}
41034078

41044079
function Test-PackageManager() {
@@ -4473,8 +4448,7 @@ if (-not $SkipBuild -and $IncludeNoAsserts) {
44734448
Build-NoAssertsToolchain
44744449
}
44754450

4476-
if (-not $SkipBuild) {
4477-
Invoke-BuildStep Build-SymbolKit $HostPlatform
4451+
if (-not $SkipBuild -and -not $IsCrossCompiling) {
44784452
Invoke-BuildStep Build-DocC $HostPlatform
44794453
}
44804454

0 commit comments

Comments
 (0)