Diff Detail
- Repository
- rL LLVM
Event Timeline
Is that for <atomic> implementation? It is normally in CXX, not CXXABI, so this it not entirely correct.
Besides, ubsan-minimal does not link with -nodefaultlibs (because it does not use SANITIZER_COMMON_LINK_FLAGS). It should not need this.
Does it help to add -stdlib=libc++ to both cflags and linkflags?
I think I see your problem.
If I build compiler-rt against Android NDK toolchain with
-DSANITIZER_CXX_ABI=none -DSANITIZER_CXX_ABI_LIBRARY="unwind;c++abi"
, all sanitizer libraries link c++abi stuff statically, but ubsan_minimal still gets a dependency on libc++_shared.so.
My build succeeds, so you might have a different problem after all.
But the end result is still broken, we want a way to build ubsan_minimal without runtime dependency on libc++.
Perhaps the right solution is to switch to C11 atomics.
We don't need libc++ for anything else here, and don't plan to introduce new dependencies.