Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions projects/bitcoin-core/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@ else
export BUILD_TRIPLET="x86_64-pc-linux-gnu"
fi

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

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

export CPPFLAGS="-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"

Expand Down