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 Nov 5, 2023
1 parent 03f7548 commit b5824de
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 @@ -94,6 +94,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 b5824de

Please sign in to comment.