mirror of
https://github.com/KDE/kde-linux.git
synced 2026-06-15 19:10:28 -04:00
this is slightly hacky because kde-builder doesn't support running arbitrary targets. we first override ninja with a special program that turns install commands into install/strip commands we then set -DCMAKE_STRIP to a special strip command that invokes eu-strip with the right arguments to strip stuff to /tmp/debugroot from there we then pick it up in the archive generator
22 lines
521 B
Bash
Executable File
22 lines
521 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
# SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
|
|
|
|
set -eux
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Usage: $0 <file>"
|
|
exit 1
|
|
fi
|
|
|
|
FILE=$1
|
|
|
|
REALPATH=$(realpath "$FILE")
|
|
DEBUGROOT=/tmp/debugroot
|
|
REALDEBUGFILE=/usr/lib/debug$REALPATH.debug
|
|
DEBUGFILE=$DEBUGROOT$REALDEBUGFILE
|
|
|
|
mkdir -p "$(dirname "$DEBUGFILE")"
|
|
|
|
exec /usr/bin/eu-strip --remove-comment --reloc-debug-sections -f "$DEBUGFILE" -F "$REALDEBUGFILE" "$FILE"
|