Disable LTO in libretro Alpine Linux s390x autobuild if Clang version < 19.1.0

This commit is contained in:
刘皓 2025-02-19 12:52:12 -05:00
parent 9343a5084b
commit f5406d34b4
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -612,7 +612,14 @@ jobs:
echo "CMAKE_SHARED_LINKER_FLAGS_INIT = '-fuse-ld=lld'" | tee -a ${{ runner.temp }}/cross.ini
echo "CMAKE_STATIC_LINKER_FLAGS_INIT = '-fuse-ld=lld'" | tee -a ${{ runner.temp }}/cross.ini
echo '--------------------------------------------------------------------------------'
CLICOLOR_FORCE=1 meson setup build --cross-file ${{ runner.temp }}/cross.ini --buildtype release -Db_lto=true -Dlibretro=true
# If architecture is s390x and Clang version is older than 19.1.0, disable LTO due to https://github.com/llvm/llvm-project/issues/61101
if [ '${{ matrix.arch_mkxpz }}' = 's390x' ] && (echo "$(clang --version | head -n 1 | sed -e 's/.*clang version * \([0-9.]*\).*/\1/')\n19.1.0" | sort -CV)
then
lto=false
else
lto=true
fi
CLICOLOR_FORCE=1 meson setup build --cross-file ${{ runner.temp }}/cross.ini --buildtype release -Db_lto=$lto -Dlibretro=true
- name: Build core
run: |