mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 09:32:41 +02:00
gitlab-ci, build: Make DWARF (.debug) symbols splitting an Installer only script
Splitted .debug are not needed by crossbuilds, and breaks .msix certification.
This commit is contained in:
@@ -784,8 +784,11 @@ dist-installer-weekly:
|
||||
stage: distribution
|
||||
tags:
|
||||
- windows-aarch64
|
||||
variables:
|
||||
MSYSTEM: "CLANGARM64"
|
||||
cache: []
|
||||
script:
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x build/windows/gitlab-ci/3_bundle-gimp-uni_sym.sh"
|
||||
- build/windows/gitlab-ci/4_dist-gimp-inno.ps1 | Out-File -FilePath installer.log
|
||||
artifacts:
|
||||
expose_as: 'Windows exe'
|
||||
|
@@ -174,11 +174,3 @@ libList=$(find ${GIMP_DISTRIB}/lib/ \( -iname '*.dll' -or -iname '*.exe' \)) &&
|
||||
for lib in "${libArray[@]}"; do
|
||||
python3 build/windows/gitlab-ci/3_bundle-gimp-uni_dep.py $lib ${GIMP_PREFIX}/ ${MSYS_PREFIX}/ ${GIMP_DISTRIB} --output-dll-list done-dll.list;
|
||||
done
|
||||
|
||||
### .debug (DWARF) debug symbols
|
||||
### (we extract and link them to make possible save space with Inno custom install)
|
||||
if [ "$CI_JOB_NAME" != "gimp-win-x64-cross" ]; then
|
||||
find gimp${ARTIFACTS_SUFFIX} \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f -exec objcopy --only-keep-debug '{}' '{}'.debug \;
|
||||
find gimp${ARTIFACTS_SUFFIX} \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f -exec objcopy --add-gnu-debuglink='{}'.debug '{}' --strip-unneeded \;
|
||||
find gimp${ARTIFACTS_SUFFIX} -iname '*.debug' -exec "build/windows/gitlab-ci/3_bundle-gimp-uni_sym.sh" {} +
|
||||
fi
|
||||
|
@@ -1,17 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copy .debug to corresponding .debug folder
|
||||
# (this is done in a separate script to reduce output)
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
FP="$1"
|
||||
NAME="${FP##*/}"
|
||||
DIR="${FP%/*}"
|
||||
echo "$FP -> $DIR/.debug"
|
||||
if [ ! -d "$DIR/.debug" ]
|
||||
then
|
||||
mkdir "$DIR/.debug"
|
||||
fi
|
||||
mv "$FP" "$DIR/.debug"
|
||||
shift
|
||||
archsArray=("-a64"
|
||||
"-x64"
|
||||
"-x86")
|
||||
|
||||
# Splited .debug (DWARF) debug symbols
|
||||
# (we extract and link them to make possible save space with Inno custom install)
|
||||
for ARTIFACTS_SUFFIX in "${archsArray[@]}"; do
|
||||
|
||||
## Split/extract DWARF symbols from binary to .debug
|
||||
find gimp${ARTIFACTS_SUFFIX} \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f -exec objcopy --only-keep-debug '{}' '{}'.debug \;
|
||||
|
||||
## Link .debug to binary
|
||||
find gimp${ARTIFACTS_SUFFIX} \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f -exec objcopy --add-gnu-debuglink='{}'.debug '{}' --strip-unneeded \;
|
||||
|
||||
## Move .debug files to .debug folder
|
||||
debugList=$(find gimp${ARTIFACTS_SUFFIX} -iname '*.debug') && debugArray=($debugList)
|
||||
for debug in "${debugArray[@]}"; do
|
||||
#NAME="${debug##*/}"
|
||||
DIR="${debug%/*}"
|
||||
echo "$debug -> $DIR/.debug"
|
||||
if [ ! -d "$DIR/.debug" ]; then
|
||||
mkdir "$DIR/.debug"
|
||||
fi
|
||||
mv "$debug" "$DIR/.debug"
|
||||
done
|
||||
done
|
||||
|
Reference in New Issue
Block a user