[llvm-dev] ubsan no longer compiles when libc++ is the default
İsmail Dönmez via llvm-dev
llvm-dev at lists.llvm.org
Tue Aug 1 07:07:39 PDT 2017
Hi,
Trying to compile llvm with the following configuration on Linux x86-64:
cmake -G Ninja -DBUILD_SHARED_LIBS=ON \
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold"
\
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=gold"\
-DCMAKE_BUILD_TYPE=RelWithDebInfo ' \
-DCMAKE_C_FLAGS="-O2 -g" \
-DCMAKE_CXX_FLAGS="-O2 -g" \
-DENABLE_LINKER_BUILD_ID=ON \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_TARGET_ARCH=host \
-DLLVM_LIBDIR_SUFFIX=64 \
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
-DLLVM_ENABLE_LIBCXX=ON ..
results in the following build error:
../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233:
error: undefined reference to 'typeinfo for std::type_info'
../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233:
error: undefined reference to 'typeinfo for
__cxxabiv1::__class_type_info'
../projects/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:233:
error: undefined reference to '__dynamic_cast'
[...]
Looks like ubsan no longer links to libc++abi ? (I see -lgcc_s -lc
-ldl -lrt -lpthread on the linker line.)
This configuration has worked with r308719 so I am guessing this is a
regression.
Regards,
ismail
More information about the llvm-dev
mailing list