Disable ThinLTO on static builds

This commit is contained in:
klzgrad 2023-09-21 00:39:07 +08:00
parent 9d1f75fae9
commit ee343b9f01

View File

@ -94,6 +94,15 @@ if [ "$target_cpu" = "mipsel" -o "$target_cpu" = "mips64el" ]; then
chrome_pgo_phase=0' chrome_pgo_phase=0'
fi fi
# OpenWrt static builds are bad with Clang 18+ and ThinLTO.
# Segfaults in fstack-protector on ARM.
case "$EXTRA_FLAGS" in
*build_static=true*)
flags="$flags"'
use_thin_lto=false'
;;
esac
rm -rf "./$out" rm -rf "./$out"
mkdir -p out mkdir -p out