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 Jan 21, 2024
1 parent 9a67a1a commit b7aab69
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ case "$EXTRA_FLAGS" in
;;
esac

# OpenWrt static builds are bad with Clang 18+ and ThinLTO.
# Segfaults in fstack-protector on ARM.
# See https://github.com/llvm/llvm-project/issues/64999
case "$EXTRA_FLAGS" in
*build_static=true*)
if [ "$target_cpu" = "arm" ]; then
flags="$flags"'
use_thin_lto=false'
fi
;;
esac

rm -rf "./$out"
mkdir -p out

Expand Down

0 comments on commit b7aab69

Please sign in to comment.