@@ -1767,23 +1767,23 @@ function Build-SPMProject {
17671767 $RuntimeInstallRoot = [IO.Path ]::Combine((Get-InstallDir $BuildPlatform ), " Runtimes" , $ProductVersion )
17681768
17691769 $env: Path = " $RuntimeInstallRoot \usr\bin;$ ( $BuildPlatform.ToolchainInstallRoot ) \usr\bin;${env: Path} "
1770- $env: SDKROOT = (Get-SwiftSDK Windows )
1770+ $env: SDKROOT = (Get-SwiftSDK $Platform .OS )
17711771 $env: SWIFTCI_USE_LOCAL_DEPS = " 1"
17721772
17731773 $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"
17811781 )
17821782 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" ) {
17861784 $Arguments += @ (" -debug-info-format" , " codeview" )
1785+ } else {
1786+ $Arguments += @ (" -debug-info-format" , " dwarf" )
17871787 }
17881788 } else {
17891789 $Arguments += @ (" -debug-info-format" , " none" )
@@ -1802,7 +1802,7 @@ function Build-SPMProject {
18021802 }
18031803 }
18041804
1805- Invoke-Program " $ ( $BuildPlatform .ToolchainInstallRoot ) \usr\bin\ swift.exe " $ActionName @Arguments @AdditionalArguments
1805+ Invoke-Program swift $ActionName @Arguments @AdditionalArguments
18061806 }
18071807
18081808 if (-not $ToBatch ) {
0 commit comments