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 Feb 16, 2024
1 parent 8e0583b commit c310f5f
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 @@ -91,6 +91,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 c310f5f

Please sign in to comment.