diff options
| author | 2023-10-08 14:51:29 -0400 | |
|---|---|---|
| committer | 2023-10-10 11:55:55 -0400 | |
| commit | 00b0938f1070bc817bbef1b30d4567dacd29c07e (patch) | |
| tree | 96b2171b8d8c3d21148831204cd661e32f3609ed /.ci/scripts/linux/docker.sh | |
| parent | Merge pull request #11656 from liamwhite/recreate-surface-automatically (diff) | |
| download | yuzu-00b0938f1070bc817bbef1b30d4567dacd29c07e.tar.gz yuzu-00b0938f1070bc817bbef1b30d4567dacd29c07e.tar.xz yuzu-00b0938f1070bc817bbef1b30d4567dacd29c07e.zip | |
ci/linux: Upload separated debug symbols
Creates a new archive with a debug suffix that contains the debug symbols from
compiling yuzu for mainline. The yuzu executable also gets a GNU debug link to the symbols file.
ci/linux: Compile with debug symbols and upload separately
Currently only uploads for yuzu but yuzu-cmd or other future executables can be
added to the for-loop's parameters.
Diffstat (limited to '')
| -rwxr-xr-x | .ci/scripts/linux/docker.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh index e5d83d4b9..202c07577 100755 --- a/.ci/scripts/linux/docker.sh +++ b/.ci/scripts/linux/docker.sh | |||
| @@ -11,7 +11,7 @@ ccache -s | |||
| 11 | mkdir build || true && cd build | 11 | mkdir build || true && cd build |
| 12 | cmake .. \ | 12 | cmake .. \ |
| 13 | -DBoost_USE_STATIC_LIBS=ON \ | 13 | -DBoost_USE_STATIC_LIBS=ON \ |
| 14 | -DCMAKE_BUILD_TYPE=Release \ | 14 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 15 | -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ | 15 | -DCMAKE_CXX_FLAGS="-march=x86-64-v2" \ |
| 16 | -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \ | 16 | -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \ |
| 17 | -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \ | 17 | -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \ |
| @@ -31,6 +31,19 @@ ccache -s | |||
| 31 | 31 | ||
| 32 | ctest -VV -C Release | 32 | ctest -VV -C Release |
| 33 | 33 | ||
| 34 | # Separate debug symbols from specified executables | ||
| 35 | for EXE in yuzu; do | ||
| 36 | EXE_PATH="bin/$EXE" | ||
| 37 | # Copy debug symbols out | ||
| 38 | objcopy --only-keep-debug $EXE_PATH $EXE_PATH.debug | ||
| 39 | # Add debug link and strip debug symbols | ||
| 40 | objcopy -g --add-gnu-debuglink=$EXE_PATH.debug $EXE_PATH $EXE_PATH.out | ||
| 41 | # Overwrite original with stripped copy | ||
| 42 | mv $EXE_PATH.out $EXE_PATH | ||
| 43 | done | ||
| 44 | # Strip debug symbols from all executables | ||
| 45 | find -type f bin/ -not -regex '.*.debug' -exec strip -g {} ';' | ||
| 46 | |||
| 34 | DESTDIR="$PWD/AppDir" ninja install | 47 | DESTDIR="$PWD/AppDir" ninja install |
| 35 | rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester | 48 | rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester |
| 36 | 49 | ||