@@ -1767,23 +1767,23 @@ function Build-SPMProject {
1767
1767
$RuntimeInstallRoot = [IO.Path ]::Combine((Get-InstallDir $BuildPlatform ), " Runtimes" , $ProductVersion )
1768
1768
1769
1769
$env: Path = " $RuntimeInstallRoot \usr\bin;$ ( $BuildPlatform.ToolchainInstallRoot ) \usr\bin;${env: Path} "
1770
- $env: SDKROOT = (Get-SwiftSDK Windows )
1770
+ $env: SDKROOT = (Get-SwiftSDK $Platform .OS )
1771
1771
$env: SWIFTCI_USE_LOCAL_DEPS = " 1"
1772
1772
1773
1773
$Arguments = @ (
1774
- " --scratch-path" , $Bin ,
1775
- " --package-path" , $Src ,
1776
- " -c" , $Configuration ,
1777
- " -Xbuild-tools-swiftc" , " -I$ ( Get-SwiftSDK Windows ) \usr\lib\swift" ,
1778
- " -Xbuild-tools-swiftc" , " -L$ ( Get-SwiftSDK Windows ) \usr\lib\swift\windows" ,
1779
- " -Xcc" , " -I$ ( Get-SwiftSDK Windows ) \usr\lib\swift" ,
1780
- " -Xlinker" , " -L$ ( Get-SwiftSDK Windows ) \usr\lib\swift\windows"
1774
+ " --scratch-path" , $Bin ,
1775
+ " --package-path" , $Src ,
1776
+ " -c" , $Configuration ,
1777
+ " -Xbuild-tools-swiftc" , " -I${ env: SDKROOT} \usr\lib\swift" ,
1778
+ " -Xbuild-tools-swiftc" , " -L${ env: SDKROOT} \usr\lib\swift\windows" ,
1779
+ " -Xcc" , " -I${ env: SDKROOT} \usr\lib\swift" ,
1780
+ " -Xlinker" , " -L${ env: SDKROOT} \usr\lib\swift\windows"
1781
1781
)
1782
1782
if ($DebugInfo ) {
1783
- if ($SwiftDebugFormat -eq " dwarf" ) {
1784
- $Arguments += @ (" -debug-info-format" , " dwarf" )
1785
- } else {
1783
+ if ($Platform.OS -eq [OS ]::Windows -and $SwiftDebugFormat -eq " codeview" ) {
1786
1784
$Arguments += @ (" -debug-info-format" , " codeview" )
1785
+ } else {
1786
+ $Arguments += @ (" -debug-info-format" , " dwarf" )
1787
1787
}
1788
1788
} else {
1789
1789
$Arguments += @ (" -debug-info-format" , " none" )
@@ -1802,7 +1802,7 @@ function Build-SPMProject {
1802
1802
}
1803
1803
}
1804
1804
1805
- Invoke-Program " $ ( $BuildPlatform .ToolchainInstallRoot ) \usr\bin\ swift.exe " $ActionName @Arguments @AdditionalArguments
1805
+ Invoke-Program swift $ActionName @Arguments @AdditionalArguments
1806
1806
}
1807
1807
1808
1808
if (-not $ToBatch ) {
0 commit comments