Skip to content

Commit 58a3ba8

Browse files
authored
bitcoin: re-enable -flto=thin (#14051)
Now that we are using `lld` (some) local builds point to this working.
1 parent a39b832 commit 58a3ba8

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

projects/bitcoin-core/build.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,11 @@ else
2828
export BUILD_TRIPLET="x86_64-pc-linux-gnu"
2929
fi
3030

31-
# Build using ThinLTO, to avoid OOM, and other LLVM issues.
32-
# See https://github.com/google/oss-fuzz/pull/10123.
33-
# Skip CFLAGS for now, to avoid:
34-
# "/usr/bin/ld: error: Failed to link module lib/libevent.a.llvm.17822.buffer.c: Expected at most one ThinLTO module per bitcode file".
35-
# export CFLAGS="$CFLAGS -flto=thin"
36-
# Skip CXXFLAGS for now, to avoid: undefined reference to __sancov_gen_.
37-
# export CXXFLAGS="$CXXFLAGS -flto=thin"
38-
# export LDFLAGS="-flto=thin"
3931

32+
export CFLAGS="$CFLAGS -flto=full"
33+
export CXXFLAGS="$CXXFLAGS -flto=full"
4034
# Use lld to workaround <module> referenced in <section> of /tmp/lto-llvm-*.o: defined in discarded section
41-
export LDFLAGS="-fuse-ld=lld"
35+
export LDFLAGS="-fuse-ld=lld -flto=full"
4236

4337
export CPPFLAGS="-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"
4438

0 commit comments

Comments
 (0)