Skip to content

Commit e50caba

Browse files
committed
build.ps1: adjust Build-SPMProject debug info handling
CodeView is only available on Windows, ensure that we restrict it to that. Default to DWARF even if the user requested codeview to ensure that we generate debug info for non-Windows hosts.
1 parent 1417ce4 commit e50caba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,10 +1778,10 @@ function Build-SPMProject {
17781778
"-Xlinker", "-L$(Get-SwiftSDK Windows)\usr\lib\swift\windows"
17791779
)
17801780
if ($DebugInfo) {
1781-
if ($SwiftDebugFormat -eq "dwarf") {
1782-
$Arguments += @("-debug-info-format", "dwarf")
1783-
} else {
1781+
if ($Platform.OS -eq [OS]::Windows -and $SwiftDebugFormat -eq "codeview") {
17841782
$Arguments += @("-debug-info-format", "codeview")
1783+
} else {
1784+
$Arguments += @("-debug-info-format", "dwarf")
17851785
}
17861786
} else {
17871787
$Arguments += @("-debug-info-format", "none")

0 commit comments

Comments
 (0)