Description
[8/85] Linking CXX shared library /data1/my-llvm/build-19/lib/clang/19/lib/x86_64-unknown-linux-gnu/libclang_rt.nsan.so
FAILED: /data1/my-llvm/build-19/lib/clang/19/lib/x86_64-unknown-linux-gnu/libclang_rt.nsan.so
: && /data1/my-llvm/build-19/./bin/clang++ --target=x86_64-unknown-linux-gnu -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werr .....
.dir/nsan_suppressions.cpp.o compiler-rt/lib/nsan/CMakeFiles/RTNsan_dynamic_version_script_dummy.x86_64.dir/dummy.cpp.o -lstdc++ -lgcc_s -lc -ldl -lrt -lm -lpthread && :
/usr/bin/ld: compiler-rt/lib/nsan/CMakeFiles/RTNsan_dynamic.x86_64.dir/nsan.cpp.o: .preinit_array section is not allowed in DSO
/usr/bin/ld: failed to set dynamic section sizes: nonrepresentable section on output
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
build attempted with clang++ 18, clang++ 19 (last successful build a few days ago), g++ 11
all attempts end with the same ld error
my cmake command was
cmake -G Ninja ../llvm -DCMAKE_BUILD_TYPE=Release -DFLANG_ENABLE_WERROR=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DLLVM_LIT_ARGS=-v -DLLVM_ENABLE_PROJECTS="clang;mlir;lld;flang;openmp" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi;libunwind" -DLLVM_OPTIMIZED_TABLEGEN=ON