Skip to content

Commit c6d1060

Browse files
authored
Merge pull request #79543 from bnbarham/always-use-local-deps
[Build] Make sure to always use local package dependencies on Windows
2 parents 14dd14d + bab8fd8 commit c6d1060

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
@@ -1412,6 +1412,7 @@ function Build-SPMProject {
14121412

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

14161417
$Arguments = @(
14171418
"--scratch-path", $Bin,
@@ -2213,18 +2214,14 @@ function Build-Foundation {
22132214

22142215
if ($Test) {
22152216
# Foundation tests build via swiftpm rather than CMake
2216-
Isolate-EnvVars {
2217-
$env:SWIFTCI_USE_LOCAL_DEPS=1
2218-
Build-SPMProject `
2219-
-Action Test `
2220-
-Src $SourceCache\swift-foundation `
2221-
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
2222-
-Arch $HostArch
2223-
}
2217+
Build-SPMProject `
2218+
-Action Test `
2219+
-Src $SourceCache\swift-foundation `
2220+
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
2221+
-Arch $HostArch
22242222

22252223
$ShortArch = $Arch.LLVMName
22262224
Isolate-EnvVars {
2227-
$env:SWIFTCI_USE_LOCAL_DEPS=1
22282225
$env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
22292226
$env:LIBXML_LIBRARY_PATH="$LibraryRoot/libxml2-2.11.5/usr/lib/$Platform/$ShortArch"
22302227
$env:LIBXML_INCLUDE_PATH="$LibraryRoot/libxml2-2.11.5/usr/include/libxml2"
@@ -3047,15 +3044,12 @@ function Build-Inspect([Platform]$Platform, $Arch) {
30473044
}
30483045

30493046
function Build-DocC() {
3050-
Isolate-EnvVars {
3051-
$env:SWIFTCI_USE_LOCAL_DEPS=1
3052-
Build-SPMProject `
3053-
-Action Build `
3054-
-Src $SourceCache\swift-docc `
3055-
-Bin $(Get-HostProjectBinaryCache DocC) `
3056-
-Arch $HostArch `
3057-
--product docc
3058-
}
3047+
Build-SPMProject `
3048+
-Action Build `
3049+
-Src $SourceCache\swift-docc `
3050+
-Bin $(Get-HostProjectBinaryCache DocC) `
3051+
-Arch $HostArch `
3052+
--product docc
30593053
}
30603054

30613055
function Test-PackageManager() {
@@ -3065,15 +3059,12 @@ function Test-PackageManager() {
30653059
"$SourceCache\swiftpm"
30663060
}
30673061

3068-
Isolate-EnvVars {
3069-
$env:SWIFTCI_USE_LOCAL_DEPS=1
3070-
Build-SPMProject `
3071-
-Action Test `
3072-
-Src $SrcDir `
3073-
-Bin "$BinaryCache\$($HostArch.LLVMTarget)\PackageManagerTests" `
3074-
-Arch $HostArch `
3075-
-Xcc "-I$LibraryRoot\sqlite-3.46.0\usr\include" -Xlinker "-L$LibraryRoot\sqlite-3.46.0\usr\lib"
3076-
}
3062+
Build-SPMProject `
3063+
-Action Test `
3064+
-Src $SrcDir `
3065+
-Bin "$BinaryCache\$($HostArch.LLVMTarget)\PackageManagerTests" `
3066+
-Arch $HostArch `
3067+
-Xcc "-I$LibraryRoot\sqlite-3.46.0\usr\include" -Xlinker "-L$LibraryRoot\sqlite-3.46.0\usr\lib"
30773068
}
30783069

30793070
function Build-Installer($Arch) {

0 commit comments

Comments
 (0)