Skip to content

Commit 3130bce

Browse files
committed
bitcoin-core: use lld to work around link failures
See https://oss-fuzz-build-logs.storage.googleapis.com/log-08166704-3ba3-406e-9e55-637c906d1fd2.txt: ```bash Step google#3 - "compile-afl-address-x86_64": `.text.asan.module_dtor.124671' referenced in section `.fini_array.1[asan.module_dtor.124671]' of /tmp/lto-llvm-b064c1.o: defined in discarded section `.text.asan.module_dtor.124671[asan.module_dtor]' of /tmp/lto-llvm-b064c1.o Step google#3 - "compile-afl-address-x86_64": clang++: �[0;1;31merror: �[0m�[1mlinker command failed with exit code 1 (use -v to see invocation)�[0m Step google#3 - "compile-afl-address-x86_64": make[2]: *** [src/test/fuzz/CMakeFiles/fuzz.dir/build.make:2268: bin/fuzz] Error 1 Step google#3 - "compile-afl-address-x86_64": make[1]: *** [CMakeFiles/Makefile2:854: src/test/fuzz/CMakeFiles/fuzz.dir/all] Error 2 Step google#3 - "compile-afl-address-x86_64": make: *** [Makefile:91: all] Error 2 ``` Closes bitcoin/bitcoin#33366.
1 parent 2f452ff commit 3130bce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/bitcoin-core/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ fi
3737
# export CXXFLAGS="$CXXFLAGS -flto=thin"
3838
# export LDFLAGS="-flto=thin"
3939

40+
# Use lld to workaround <module> referenced in <section> of /tmp/lto-llvm-*.o: defined in discarded section
41+
export LDFLAGS="-fuse-ld=lld"
42+
4043
export CPPFLAGS="-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"
4144

4245
(

0 commit comments

Comments
 (0)