From dc21fb7601b5fad745fc0305795ccdee3697e435 Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Thu, 23 May 2024 07:11:33 -0300 Subject: [PATCH] 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. --- .../gitlab-ci/3_bundle-gimp-uni_base.sh | 6 ++--- .../windows/gitlab-ci/4_dist-gimp-winsdk.ps1 | 22 +++++++++---------- meson.build | 18 +++++++-------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/windows/gitlab-ci/3_bundle-gimp-uni_base.sh b/build/windows/gitlab-ci/3_bundle-gimp-uni_base.sh index 97cf863b62..35bf8229b5 100644 --- a/build/windows/gitlab-ci/3_bundle-gimp-uni_base.sh +++ b/build/windows/gitlab-ci/3_bundle-gimp-uni_base.sh @@ -134,9 +134,9 @@ done ### .pdb (CodeView) debug symbols ### crossroad don't have LLVM/Clang backend yet -if [ "$CI_JOB_NAME" != "gimp-win-x64-cross" ]; then - cp -fr ${GIMP_PREFIX}/bin/*.pdb ${GIMP_DISTRIB}/bin/ -fi +#if [ "$CI_JOB_NAME" != "gimp-win-x64-cross" ]; then +# cp -fr ${GIMP_PREFIX}/bin/*.pdb ${GIMP_DISTRIB}/bin/ +#fi ## Optional executables, .DLLs and resources for GObject Introspection support if [[ ! "$CI_JOB_NAME" =~ "cross" ]]; then diff --git a/build/windows/gitlab-ci/4_dist-gimp-winsdk.ps1 b/build/windows/gitlab-ci/4_dist-gimp-winsdk.ps1 index cd064302b3..f19699420f 100644 --- a/build/windows/gitlab-ci/4_dist-gimp-winsdk.ps1 +++ b/build/windows/gitlab-ci/4_dist-gimp-winsdk.ps1 @@ -165,20 +165,20 @@ New-Item -ItemType Directory -Path "_Output" $archsArray_limited = $archsArray -replace "gimp-", "" ## Make .appxsym for each arch -if ($CI_COMMIT_TAG -or ($GIMP_CI_MS_STORE -eq 'MSIXUPLOAD')) - { - foreach ($arch in $archsArray_limited) - { - Get-ChildItem -Path "gimp-$arch" -Filter "*.pdb" -Recurse | - Compress-Archive -DestinationPath "_Output\${identity_name}_${gimp_version}.0_$arch.zip" - Get-ChildItem "_Output\*.zip" | Rename-Item -NewName { $_.Name -replace '.zip','.appxsym' } - } - } +#if ($CI_COMMIT_TAG -or ($GIMP_CI_MS_STORE -eq 'MSIXUPLOAD')) +# { +# foreach ($arch in $archsArray_limited) +# { +# Get-ChildItem -Path "gimp-$arch" -Filter "*.pdb" -Recurse | +# Compress-Archive -DestinationPath "_Output\${identity_name}_${gimp_version}.0_$arch.zip" +# Get-ChildItem "_Output\*.zip" | Rename-Item -NewName { $_.Name -replace '.zip','.appxsym' } +# } +# } ## Make .msix for each arch (this is needed to make the .msixbundle too) 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" 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" 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 } diff --git a/meson.build b/meson.build index dccfbbd056..39a898ab96 100644 --- a/meson.build +++ b/meson.build @@ -290,11 +290,11 @@ if platform_windows and cc.get_id() == 'gcc' endif # 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=') -if platform_windows and pdb_support - compiler_args += '-gcodeview' - linker_args += '-Wl,--pdb=' -endif +#pdb_support = cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=') +#if platform_windows and pdb_support +# compiler_args += '-gcodeview' +# linker_args += '-Wl,--pdb=' +#endif conf.set('HAVE__NL_MEASUREMENT_MEASUREMENT', @@ -2020,10 +2020,10 @@ pkgconfig.generate(libgimpui, # Install native debug data (.pdb) on Windows # Ideally meson should take care of it automatically. # See: https://github.com/mesonbuild/meson/issues/12977 -if platform_windows and pdb_support - install_win_debug_script = find_program('./meson_install_win_debug.sh') - meson.add_install_script(install_win_debug_script) -endif +#if platform_windows and pdb_support +# install_win_debug_script = find_program('./meson_install_win_debug.sh') +# meson.add_install_script(install_win_debug_script) +#endif ################################################################################ # Subdir installations