From 9b57e480c68221c92c6fe0634c33126d0b6cd2dc Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Mon, 19 May 2025 17:32:50 -0400 Subject: [PATCH 1/2] deps.ffmpeg: Enable PDBs for FFmpeg builds on Windows Enable PDBs for FFmpeg builds on Windows for all configurations. If the configuration is set to Release, or RelWithDebInfo, or MinSizeRel, adjust the linker options accordingly. --- deps.ffmpeg/99-ffmpeg.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps.ffmpeg/99-ffmpeg.ps1 b/deps.ffmpeg/99-ffmpeg.ps1 index af5ae35a9..6e3df7ed4 100644 --- a/deps.ffmpeg/99-ffmpeg.ps1 +++ b/deps.ffmpeg/99-ffmpeg.ps1 @@ -68,7 +68,8 @@ function Configure { '--toolchain=msvc' ('--extra-cflags=' + "'-D_WINDLL -MD -D_WIN32_WINNT=0x0A00" + $(if ( $Target -eq 'arm64' ) { ' -D__ARM_PCS_VFP' }) + "'") ('--extra-cxxflags=' + "'-MD -D_WIN32_WINNT=0x0A00'") - ('--extra-ldflags=' + "'-APPCONTAINER:NO -MACHINE:${Target}'") + ('--extra-ldflags=' + "'-APPCONTAINER:NO -MACHINE:${Target} -DEBUG" + + $(if ( $Configuration -match '(Release|RelWithDebInfo|MinSizeRel)' ) { ' -OPT:REF -OPT:ICF -LTCG -INCREMENTAL:NO' }) + "'") $(if ( $Target -eq 'arm64' ) { '--as=armasm64.exe','--cpu=armv8' }) '--pkg-config=pkg-config' $(if ( $Target -ne 'x86' ) { '--target-os=win64' } else { '--target-os=win32' }) From d239d0202eb52bed26e912869c8a25c995d106ff Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Tue, 19 May 2026 11:58:17 -0400 Subject: [PATCH 2/2] deps.ffmpeg: Copy PDBs to the install dir The make install command does not copy the PDBs to the install dir, so we have to copy them manually. --- Build-Dependencies.ps1 | 2 +- deps.ffmpeg/99-ffmpeg.ps1 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Build-Dependencies.ps1 b/Build-Dependencies.ps1 index 5f7247cd6..ecd277e9c 100644 --- a/Build-Dependencies.ps1 +++ b/Build-Dependencies.ps1 @@ -122,7 +122,7 @@ function Package-Dependencies { switch ( $PackageName ) { ffmpeg { - Get-ChildItem ./bin/* -Include '*.exe','srt-ffplay' -Exclude 'ffmpeg.exe','ffprobe.exe' | Remove-Item -Force -Recurse + Get-ChildItem ./bin/* -Include '*.exe','srt-ffplay' -Exclude 'ffmpeg.exe','ffprobe.exe','ffmpeg_g.exe','ffprobe_g.exe' | Remove-Item -Force -Recurse Get-ChildItem ./lib -Exclude 'librist.lib','zlibstatic.lib','srt.lib','libx264.lib','mbed*.lib','everest.lib','p256m.lib','zlib.lib','datachannel.lib','cmake' | Remove-Item -Force -Recurse Get-ChildItem ./lib/cmake -Exclude 'LibDataChannel','MbedTLS' | Remove-Item -Force -Recurse Get-ChildItem ./share/* | Remove-Item -Force -Recurse diff --git a/deps.ffmpeg/99-ffmpeg.ps1 b/deps.ffmpeg/99-ffmpeg.ps1 index 6e3df7ed4..ecdf2fb47 100644 --- a/deps.ffmpeg/99-ffmpeg.ps1 +++ b/deps.ffmpeg/99-ffmpeg.ps1 @@ -166,4 +166,9 @@ function Install { $env:VERBOSE = $(if ( $VerbosePreference -eq 'Continue' ) { '1' }) Invoke-DevShell @Params $Backup.GetEnumerator() | ForEach-Object { Set-Item -Path "env:\$($_.Key)" -Value $_.Value } + + Push-Location "build_${Target}" + Copy-Item 'ffmpeg_g.exe','ffprobe_g.exe' "$($script:ConfigData.OutputPath)/bin" + Get-ChildItem -Path '.' -Filter '*.pdb' -Recurse | Copy-Item -Destination "$($script:ConfigData.OutputPath)/bin" + Pop-Location }