Skip to content

Commit bab8fd8

Browse files
committed
[Build] Make sure to always use local package dependencies on Windows
1 parent 2ceb8f1 commit bab8fd8

File tree

1 file changed

+18
-27
lines changed

1 file changed

+18
-27
lines changed

Diff for: utils/build.ps1

+18-27
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@ function Build-SPMProject {
13921392

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

13961397
$Arguments = @(
13971398
"--scratch-path", $Bin,
@@ -2179,18 +2180,14 @@ function Build-Foundation {
21792180

21802181
if ($Test) {
21812182
# Foundation tests build via swiftpm rather than CMake
2182-
Isolate-EnvVars {
2183-
$env:SWIFTCI_USE_LOCAL_DEPS=1
2184-
Build-SPMProject `
2185-
-Action Test `
2186-
-Src $SourceCache\swift-foundation `
2187-
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
2188-
-Arch $HostArch
2189-
}
2183+
Build-SPMProject `
2184+
-Action Test `
2185+
-Src $SourceCache\swift-foundation `
2186+
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
2187+
-Arch $HostArch
21902188

21912189
$ShortArch = $Arch.LLVMName
21922190
Isolate-EnvVars {
2193-
$env:SWIFTCI_USE_LOCAL_DEPS=1
21942191
$env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
21952192
$env:LIBXML_LIBRARY_PATH="$LibraryRoot/libxml2-2.11.5/usr/lib/$Platform/$ShortArch"
21962193
$env:LIBXML_INCLUDE_PATH="$LibraryRoot/libxml2-2.11.5/usr/include/libxml2"
@@ -3006,15 +3003,12 @@ function Build-Inspect([Platform]$Platform, $Arch) {
30063003
}
30073004

30083005
function Build-DocC() {
3009-
Isolate-EnvVars {
3010-
$env:SWIFTCI_USE_LOCAL_DEPS=1
3011-
Build-SPMProject `
3012-
-Action Build `
3013-
-Src $SourceCache\swift-docc `
3014-
-Bin $(Get-HostProjectBinaryCache DocC) `
3015-
-Arch $HostArch `
3016-
--product docc
3017-
}
3006+
Build-SPMProject `
3007+
-Action Build `
3008+
-Src $SourceCache\swift-docc `
3009+
-Bin $(Get-HostProjectBinaryCache DocC) `
3010+
-Arch $HostArch `
3011+
--product docc
30183012
}
30193013

30203014
function Test-PackageManager() {
@@ -3024,15 +3018,12 @@ function Test-PackageManager() {
30243018
"$SourceCache\swiftpm"
30253019
}
30263020

3027-
Isolate-EnvVars {
3028-
$env:SWIFTCI_USE_LOCAL_DEPS=1
3029-
Build-SPMProject `
3030-
-Action Test `
3031-
-Src $SrcDir `
3032-
-Bin "$BinaryCache\$($HostArch.LLVMTarget)\PackageManagerTests" `
3033-
-Arch $HostArch `
3034-
-Xcc "-I$LibraryRoot\sqlite-3.46.0\usr\include" -Xlinker "-L$LibraryRoot\sqlite-3.46.0\usr\lib"
3035-
}
3021+
Build-SPMProject `
3022+
-Action Test `
3023+
-Src $SrcDir `
3024+
-Bin "$BinaryCache\$($HostArch.LLVMTarget)\PackageManagerTests" `
3025+
-Arch $HostArch `
3026+
-Xcc "-I$LibraryRoot\sqlite-3.46.0\usr\include" -Xlinker "-L$LibraryRoot\sqlite-3.46.0\usr\lib"
30363027
}
30373028

30383029
function Build-Installer($Arch) {

0 commit comments

Comments
 (0)