Skip to content

[Build] Make sure to always use local package dependencies on Windows #79543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 18 additions & 27 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,7 @@ function Build-SPMProject {

$env:Path = "$RuntimeInstallRoot\usr\bin;$($HostArch.ToolchainInstallRoot)\usr\bin;${env:Path}"
$env:SDKROOT = $SDKInstallRoot
$env:SWIFTCI_USE_LOCAL_DEPS=1

$Arguments = @(
"--scratch-path", $Bin,
Expand Down Expand Up @@ -2179,18 +2180,14 @@ function Build-Foundation {

if ($Test) {
# Foundation tests build via swiftpm rather than CMake
Isolate-EnvVars {
$env:SWIFTCI_USE_LOCAL_DEPS=1
Build-SPMProject `
-Action Test `
-Src $SourceCache\swift-foundation `
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
-Arch $HostArch
}
Build-SPMProject `
-Action Test `
-Src $SourceCache\swift-foundation `
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
-Arch $HostArch

$ShortArch = $Arch.LLVMName
Isolate-EnvVars {
$env:SWIFTCI_USE_LOCAL_DEPS=1
$env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
$env:LIBXML_LIBRARY_PATH="$LibraryRoot/libxml2-2.11.5/usr/lib/$Platform/$ShortArch"
$env:LIBXML_INCLUDE_PATH="$LibraryRoot/libxml2-2.11.5/usr/include/libxml2"
Expand Down Expand Up @@ -3006,15 +3003,12 @@ function Build-Inspect([Platform]$Platform, $Arch) {
}

function Build-DocC() {
Isolate-EnvVars {
$env:SWIFTCI_USE_LOCAL_DEPS=1
Build-SPMProject `
-Action Build `
-Src $SourceCache\swift-docc `
-Bin $(Get-HostProjectBinaryCache DocC) `
-Arch $HostArch `
--product docc
}
Build-SPMProject `
-Action Build `
-Src $SourceCache\swift-docc `
-Bin $(Get-HostProjectBinaryCache DocC) `
-Arch $HostArch `
--product docc
}

function Test-PackageManager() {
Expand All @@ -3024,15 +3018,12 @@ function Test-PackageManager() {
"$SourceCache\swiftpm"
}

Isolate-EnvVars {
$env:SWIFTCI_USE_LOCAL_DEPS=1
Build-SPMProject `
-Action Test `
-Src $SrcDir `
-Bin "$BinaryCache\$($HostArch.LLVMTarget)\PackageManagerTests" `
-Arch $HostArch `
-Xcc "-I$LibraryRoot\sqlite-3.46.0\usr\include" -Xlinker "-L$LibraryRoot\sqlite-3.46.0\usr\lib"
}
Build-SPMProject `
-Action Test `
-Src $SrcDir `
-Bin "$BinaryCache\$($HostArch.LLVMTarget)\PackageManagerTests" `
-Arch $HostArch `
-Xcc "-I$LibraryRoot\sqlite-3.46.0\usr\include" -Xlinker "-L$LibraryRoot\sqlite-3.46.0\usr\lib"
}

function Build-Installer($Arch) {
Expand Down