mirror of https://github.com/GNOME/gimp.git
build/windows: Merge '(INFO): moving DWARF...' with '(INFO): extracting...'
This makes easier to understand to where the .debug files are being moved.
This commit is contained in:
parent
bf457a9fc8
commit
e5b6dab298
|
@ -13,24 +13,21 @@ fi
|
||||||
for ARTIFACTS_SUFFIX in "${archsArray[@]}"; do
|
for ARTIFACTS_SUFFIX in "${archsArray[@]}"; do
|
||||||
binArray=($(find gimp${ARTIFACTS_SUFFIX} \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f))
|
binArray=($(find gimp${ARTIFACTS_SUFFIX} \( -iname '*.dll' -or -iname '*.exe' -or -iname '*.pyd' \) -type f))
|
||||||
for bin in "${binArray[@]}"; do
|
for bin in "${binArray[@]}"; do
|
||||||
echo "(INFO): extracting DWARF symbols from $bin"
|
debug=$(echo "${bin}.debug")
|
||||||
## Split/extract DWARF symbols from binary to .debug
|
NAME="${bin##*/}"
|
||||||
objcopy --only-keep-debug $bin $bin.debug
|
DIR="${debug%/*}/.debug/"
|
||||||
## Link .debug to binary
|
|
||||||
objcopy --add-gnu-debuglink=$bin.debug $bin --strip-unneeded
|
|
||||||
done
|
|
||||||
|
|
||||||
## Move .debug files to .debug folder
|
## Split/extract DWARF symbols from binary to .debug
|
||||||
debugArray=($(find gimp${ARTIFACTS_SUFFIX} -iname '*.debug'))
|
echo "(INFO): extracting DWARF symbols from $NAME to $DIR"
|
||||||
for debug in "${debugArray[@]}"; do
|
objcopy --only-keep-debug $bin $debug
|
||||||
DIR="${debug%/*}"
|
|
||||||
if [ ! -d "$DIR/.debug" ]; then
|
## Link .debug to binary
|
||||||
mkdir "$DIR/.debug"
|
objcopy --add-gnu-debuglink=$debug $bin --strip-unneeded
|
||||||
|
|
||||||
|
## Move .debug files to .debug folder
|
||||||
|
if [ ! -d "$DIR" ]; then
|
||||||
|
mkdir "$DIR"
|
||||||
fi
|
fi
|
||||||
if [ "$DIR" != "$PREVIOUS_DIR" ]; then
|
mv "$debug" "$DIR"
|
||||||
echo "(INFO): moving DWARF symbols to $DIR/.debug"
|
|
||||||
fi
|
|
||||||
mv "$debug" "$DIR/.debug"
|
|
||||||
export PREVIOUS_DIR="$DIR"
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue