meson, build: Disable CodeView (.pdb) generation and bundling for now

1) Right now, MS Partner Center doesn't tell us if the .pdb bunbled as .appxsym
are fine and we only have "Unknow" dumps in the Health page from MS Par. Cen.

My theory, according to my tests with 'SymChk', 'PDBCopy' and 'llvm-pdbutil',
is that this is happening because .pdb from clang or gcc are not "perfect", but
I really have no proof to afirm this, since Partner Center tell us nothing
about them, and we don't even know if the .appxsym were uploaded to begin with.

---

2) The compiler can't generate DWARF (.debug*) symbols when generating .pdb,
which breaks debugging in DrMingw and even lldb according to my tests.
(This is not a fault of the .pdb format but a circumstance: our debuggers
only support DWARF, which is the format already used by MSYS2 packages)

---

So, the .pdb will return probably only in the potential vcpkg transition.
This commit is contained in:
Bruno Lopes 2024-05-23 07:11:33 -03:00 committed by Bruno
parent 742ec5689d
commit dc21fb7601
3 changed files with 23 additions and 23 deletions

View file

@ -134,9 +134,9 @@ done
### .pdb (CodeView) debug symbols ### .pdb (CodeView) debug symbols
### crossroad don't have LLVM/Clang backend yet ### crossroad don't have LLVM/Clang backend yet
if [ "$CI_JOB_NAME" != "gimp-win-x64-cross" ]; then #if [ "$CI_JOB_NAME" != "gimp-win-x64-cross" ]; then
cp -fr ${GIMP_PREFIX}/bin/*.pdb ${GIMP_DISTRIB}/bin/ # cp -fr ${GIMP_PREFIX}/bin/*.pdb ${GIMP_DISTRIB}/bin/
fi #fi
## Optional executables, .DLLs and resources for GObject Introspection support ## Optional executables, .DLLs and resources for GObject Introspection support
if [[ ! "$CI_JOB_NAME" =~ "cross" ]]; then if [[ ! "$CI_JOB_NAME" =~ "cross" ]]; then

View file

@ -165,20 +165,20 @@ New-Item -ItemType Directory -Path "_Output"
$archsArray_limited = $archsArray -replace "gimp-", "" $archsArray_limited = $archsArray -replace "gimp-", ""
## Make .appxsym for each arch ## Make .appxsym for each arch
if ($CI_COMMIT_TAG -or ($GIMP_CI_MS_STORE -eq 'MSIXUPLOAD')) #if ($CI_COMMIT_TAG -or ($GIMP_CI_MS_STORE -eq 'MSIXUPLOAD'))
{ # {
foreach ($arch in $archsArray_limited) # foreach ($arch in $archsArray_limited)
{ # {
Get-ChildItem -Path "gimp-$arch" -Filter "*.pdb" -Recurse | # Get-ChildItem -Path "gimp-$arch" -Filter "*.pdb" -Recurse |
Compress-Archive -DestinationPath "_Output\${identity_name}_${gimp_version}.0_$arch.zip" # Compress-Archive -DestinationPath "_Output\${identity_name}_${gimp_version}.0_$arch.zip"
Get-ChildItem "_Output\*.zip" | Rename-Item -NewName { $_.Name -replace '.zip','.appxsym' } # Get-ChildItem "_Output\*.zip" | Rename-Item -NewName { $_.Name -replace '.zip','.appxsym' }
} # }
} # }
## Make .msix for each arch (this is needed to make the .msixbundle too) ## Make .msix for each arch (this is needed to make the .msixbundle too)
foreach ($arch in $archsArray_limited) foreach ($arch in $archsArray_limited)
{ {
Get-ChildItem "gimp-$arch" -Include "*.pdb" -Recurse -Force | Remove-Item -Recurse -Force #Get-ChildItem "gimp-$arch" -Include "*.pdb" -Recurse -Force | Remove-Item -Recurse -Force
makeappx pack /d "gimp-$arch" /p "_TempOutput\${identity_name}_${gimp_version}.0_$arch.msix" makeappx pack /d "gimp-$arch" /p "_TempOutput\${identity_name}_${gimp_version}.0_$arch.msix"
Remove-Item "gimp-$arch" -Recurse Remove-Item "gimp-$arch" -Recurse
} }
@ -194,7 +194,7 @@ if ($CI_COMMIT_TAG -or ($GIMP_CI_MS_STORE -eq 'MSIXUPLOAD'))
{ {
Compress-Archive -Path "_Output\*" "_Output\${identity_name}_${gimp_version}.0_x64_arm64_bundle.zip" Compress-Archive -Path "_Output\*" "_Output\${identity_name}_${gimp_version}.0_x64_arm64_bundle.zip"
Get-ChildItem "_Output\*.zip" | Rename-Item -NewName { $_.Name -replace '.zip','.msixupload' } Get-ChildItem "_Output\*.zip" | Rename-Item -NewName { $_.Name -replace '.zip','.msixupload' }
Get-ChildItem "_Output\*.appxsym" | Remove-Item -Recurse -Force #Get-ChildItem "_Output\*.appxsym" | Remove-Item -Recurse -Force
} }

View file

@ -290,11 +290,11 @@ if platform_windows and cc.get_id() == 'gcc'
endif endif
# Generate .pdb (CodeView) debug symbols (makes possible to debug with DIA SDK) # Generate .pdb (CodeView) debug symbols (makes possible to debug with DIA SDK)
pdb_support = cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=') #pdb_support = cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=')
if platform_windows and pdb_support #if platform_windows and pdb_support
compiler_args += '-gcodeview' # compiler_args += '-gcodeview'
linker_args += '-Wl,--pdb=' # linker_args += '-Wl,--pdb='
endif #endif
conf.set('HAVE__NL_MEASUREMENT_MEASUREMENT', conf.set('HAVE__NL_MEASUREMENT_MEASUREMENT',
@ -2020,10 +2020,10 @@ pkgconfig.generate(libgimpui,
# Install native debug data (.pdb) on Windows # Install native debug data (.pdb) on Windows
# Ideally meson should take care of it automatically. # Ideally meson should take care of it automatically.
# See: https://github.com/mesonbuild/meson/issues/12977 # See: https://github.com/mesonbuild/meson/issues/12977
if platform_windows and pdb_support #if platform_windows and pdb_support
install_win_debug_script = find_program('./meson_install_win_debug.sh') # install_win_debug_script = find_program('./meson_install_win_debug.sh')
meson.add_install_script(install_win_debug_script) # meson.add_install_script(install_win_debug_script)
endif #endif
################################################################################ ################################################################################
# Subdir installations # Subdir installations