@@ -2122,7 +2122,7 @@ function Get-CompilersDefines([Hashtable] $Platform, [string] $Variant, [switch]
2122
2122
SWIFT_ENABLE_VOLATILE = " YES" ;
2123
2123
SWIFT_PATH_TO_LIBDISPATCH_SOURCE = " $SourceCache \swift-corelibs-libdispatch" ;
2124
2124
SWIFT_PATH_TO_STRING_PROCESSING_SOURCE = " $SourceCache \swift-experimental-string-processing" ;
2125
- SWIFT_PATH_TO_SWIFT_SDK = (Get-PinnedToolchainSDK );
2125
+ SWIFT_PATH_TO_SWIFT_SDK = (Get-PinnedToolchainSDK - OS $Platform .OS );
2126
2126
SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE = " $SourceCache \swift-syntax" ;
2127
2127
SWIFT_STDLIB_ASSERTIONS = " NO" ;
2128
2128
SWIFTSYNTAX_ENABLE_ASSERTIONS = " NO" ;
@@ -2139,7 +2139,7 @@ function Build-Compilers([Hashtable] $Platform, [string] $Variant) {
2139
2139
- Platform $Platform `
2140
2140
- UseMSVCCompilers $ (if ($UseHostToolchain ) { @ (" C" , " CXX" ) } else { @ (" " ) }) `
2141
2141
- UsePinnedCompilers $ (if ($UseHostToolchain ) { @ (" Swift" ) } else { @ (" C" , " CXX" , " Swift" ) }) `
2142
- - SwiftSDK (Get-PinnedToolchainSDK ) `
2142
+ - SwiftSDK (Get-PinnedToolchainSDK - OS $Platform .OS ) `
2143
2143
- BuildTargets @ (" install-distribution" ) `
2144
2144
- CacheScript $SourceCache \swift\cmake\caches\Windows- $ ($Platform.Architecture.LLVMName ).cmake `
2145
2145
- Defines (Get-CompilersDefines $Platform $Variant )
@@ -2207,7 +2207,7 @@ function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $Test
2207
2207
- Platform $Platform `
2208
2208
- UseMSVCCompilers $ (if ($UseHostToolchain ) { @ (" C" , " CXX" ) } else { @ (" " ) }) `
2209
2209
- UsePinnedCompilers $ (if ($UseHostToolchain ) { @ (" Swift" ) } else { @ (" C" , " CXX" , " Swift" ) }) `
2210
- - SwiftSDK (Get-PinnedToolchainSDK ) `
2210
+ - SwiftSDK (Get-PinnedToolchainSDK - OS $Platform .OS ) `
2211
2211
- BuildTargets $Targets `
2212
2212
- CacheScript $SourceCache \swift\cmake\caches\Windows- $ ($Platform.Architecture.LLVMName ).cmake `
2213
2213
- Defines $TestingDefines
@@ -3602,6 +3602,7 @@ function Build-LMDB([Hashtable] $Platform) {
3602
3602
}
3603
3603
3604
3604
function Build-IndexStoreDB ([Hashtable ] $Platform ) {
3605
+ $SDKROOT = Get-SwiftSDK $Platform.OS
3605
3606
Build-CMakeProject `
3606
3607
- Src $SourceCache \indexstore- db `
3607
3608
- Bin (Get-ProjectBinaryCache $Platform IndexStoreDB) `
@@ -3612,8 +3613,8 @@ function Build-IndexStoreDB([Hashtable] $Platform) {
3612
3613
- Defines @ {
3613
3614
BUILD_SHARED_LIBS = " NO" ;
3614
3615
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3615
- CMAKE_C_FLAGS = @ (" -I$ ( Get-SwiftSDK $Platform .OS ) \usr\include" , " -I$ ( Get-SwiftSDK $Platform .OS ) \usr\include\Block" );
3616
- CMAKE_CXX_FLAGS = @ (" -I$ ( Get-SwiftSDK $Platform .OS ) \usr\include" , " -I$ ( Get-SwiftSDK $Platform .OS ) \usr\include\Block" );
3616
+ CMAKE_C_FLAGS = @ (" -I$SDKROOT \usr\include" , " -I$SDKROOT \usr\include\Block" );
3617
+ CMAKE_CXX_FLAGS = @ (" -I$SDKROOT \usr\include" , " -I$SDKROOT \usr\include\Block" );
3617
3618
LMDB_DIR = (Get-ProjectCMakeModules $Platform LMDB);
3618
3619
}
3619
3620
}
@@ -3781,6 +3782,8 @@ function Build-Inspect([Hashtable] $Platform) {
3781
3782
$InstallPath = " $ ( Get-PlatformRoot $Platform.OS ) \Developer\Library\$ ( Get-ModuleTriple $Platform ) "
3782
3783
}
3783
3784
3785
+ $SDKROOT = Get-SwiftSDK $Platform.OS
3786
+
3784
3787
Build-CMakeProject `
3785
3788
- Src $SourceCache \swift\tools\swift- inspect `
3786
3789
- Bin (Get-ProjectBinaryCache $Platform SwiftInspect)`
@@ -3790,10 +3793,10 @@ function Build-Inspect([Hashtable] $Platform) {
3790
3793
- SwiftSDK (Get-SwiftSDK $Platform.OS ) `
3791
3794
- Defines @ {
3792
3795
CMAKE_Swift_FLAGS = @ (
3793
- " -Xcc" , " -I$ ( Get-SwiftSDK $Platform .OS ) \usr\include" ,
3794
- " -Xcc" , " -I$ ( Get-SwiftSDK $Platform .OS ) \usr\lib\swift" ,
3795
- " -Xcc" , " -I$ ( Get-SwiftSDK $Platform .OS ) \usr\include\swift\SwiftRemoteMirror" ,
3796
- " -L$ ( Get-SwiftSDK $Platform .OS ) \usr\lib\swift\$ ( $Platform.OS.ToString ()) \$ ( $Platform.Architecture.LLVMName ) "
3796
+ " -Xcc" , " -I$SDKROOT \usr\include" ,
3797
+ " -Xcc" , " -I$SDKROOT \usr\lib\swift" ,
3798
+ " -Xcc" , " -I$SDKROOT \usr\include\swift\SwiftRemoteMirror" ,
3799
+ " -L$SDKROOT \usr\lib\swift\$ ( $Platform.OS.ToString ()) \$ ( $Platform.Architecture.LLVMName ) "
3797
3800
);
3798
3801
ArgumentParser_DIR = $ArgumentParserDir ;
3799
3802
}
0 commit comments