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 34983ee commit fc89e56
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 fc89e56

Please sign in to comment.