clang --version
clang version 20.1.8 (Fedora 20.1.8-3.fc43)
Target: aarch64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/aarch64-redhat-linux-gnu-clang.cfg
export CC=clang
export CXX=clang++
# CMAKE_INTERPROCEDURAL_OPTIMIZATION is -flto=thin for clang
cmake -B build -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DSANITIZERS=address
<snip>
[ 54%] Built target bitcoin-util
[ 55%] Built target bitcoin-wallet
[ 72%] Built target bitcoin_node
[ 73%] Built target bitcoind
[ 73%] Linking CXX executable ../../bin/test_bitcoin
/usr/bin/ld: error: Failed to link module ../../lib/libbitcoin_consensus.a.llvm.20628.arith_uint256.cpp: Expected at most one ThinLTO module per bitcode file
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
We have seen the same issue in oss-fuzz: https://github.com/google/oss-fuzz/blob/564805ba6f3d5b3b9386ae68aaa919ffcf8b50da/projects/bitcoin-core/build.sh#L33.