Skip to content

Commit

Permalink
Fix source indexing to enable source debugging for official builds. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kmahone committed Dec 3, 2021
1 parent ec2aae6 commit f494d23
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
22 changes: 21 additions & 1 deletion build/SourceIndexing/IndexPdbs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $mappedFiles = New-Object System.Collections.ArrayList

foreach ($file in (Get-ChildItem -r:$recursive "$SearchDir\*.pdb"))
{
$mappedFiles = New-Object System.Collections.ArrayList
Write-Verbose "Found $file"

$ErrorActionPreference = "Continue" # Azure Pipelines defaults to "Stop", continue past errors in this script.
Expand Down Expand Up @@ -50,7 +51,7 @@ foreach ($file in (Get-ChildItem -r:$recursive "$SearchDir\*.pdb"))
if ($relative)
{
$mapping = $allFiles[$i] + "*$relative"
$mappedFiles.Add($mapping)
$ignore = $mappedFiles.Add($mapping)

Write-Verbose "Mapped path $($i): $mapping"
}
Expand Down Expand Up @@ -78,7 +79,26 @@ $($mappedFiles -join "`r`n")
SRCSRV: end ------------------------------------------------
"@ | Set-Content $pdbstrFile

Write-Host
Write-Host
Write-Host (Get-Content $pdbstrFile)
Write-Host
Write-Host

Write-Host "$pdbstrExe -p:""$file"" -w -s:srcsrv -i:$pdbstrFile"
& $pdbstrExe -p:"$file" -w -s:srcsrv -i:$pdbstrFile
Write-Host
Write-Host

Write-Host "$pdbstrExe -p:""$file"" -r -s:srcsrv"
& $pdbstrExe -p:"$file" -r -s:srcsrv
Write-Host
Write-Host

Write-Host "$srctoolExe $file"
& $srctoolExe "$file"
Write-Host
Write-Host
}

# Return with exit 0 to override any weird error code from other tools
Expand Down
4 changes: 2 additions & 2 deletions tools/InternalWindowsSDKNuget/SetUpInternalWindowsSDK.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
SETLOCAL
set ERRORLEVEL=

echo executing %~dp0..\..\packages\InternalWindowsSDK.1.0.7\winsdksetup.exe /quiet
call %~dp0..\..\packages\InternalWindowsSDK.1.0.7\winsdksetup.exe /quiet
echo executing %~dp0..\..\packages\InternalWindowsSDK.1.0.7\winsdksetup.exe /features OptionId.UWPCpp OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPPARM64 OptionId.DesktopCPPARM /quiet
call %~dp0..\..\packages\InternalWindowsSDK.1.0.7\winsdksetup.exe /features OptionId.UWPCpp OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPPARM64 OptionId.DesktopCPPARM /quiet

:END
exit /B %ERRORLEVEL%

0 comments on commit f494d23

Please sign in to comment.