Skip to content

Commit

Permalink
Disable ThinLTO on static builds
Browse files Browse the repository at this point in the history
  • Loading branch information
klzgrad committed Oct 13, 2023
1 parent 12d3796 commit 008ead4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ if [ "$target_cpu" = "mipsel" -o "$target_cpu" = "mips64el" ]; then
chrome_pgo_phase=0'
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"
mkdir -p out

Expand Down

0 comments on commit 008ead4

Please sign in to comment.