This change adds sanitizer support for LLVM's libunwind and libc++abi
as an alternative to libstdc++. This allows using the in tree version
of libunwind and libc++abi which is useful when building a toolchain
for different target.
Details
- Reviewers
EricWF eugenis kcc alekseyshl mcgrathr - Commits
- rGa7a9ca4ad1cd: Support libc++abi in addition to libstdc++
rGc2c3d6b87ba9: [sanitizer] Support libc++abi in addition to libstdc++
rCRT309362: Support libc++abi in addition to libstdc++
rCRT309074: [sanitizer] Support libc++abi in addition to libstdc++
rL309362: Support libc++abi in addition to libstdc++
rL309074: [sanitizer] Support libc++abi in addition to libstdc++
Diff Detail
- Repository
- rL LLVM
Event Timeline
CMakeLists.txt | ||
---|---|---|
269 | SANITIZER_USE_COMPILER_RT - is that a user-facing option? then it should be declared as such. This nodefaultlibs / rtlib change looks unrelated to the rest of this patch, could you upload it separately? | |
cmake/Modules/HandleCompilerRT.cmake | ||
15 | This looks fragile, plus you only call this function with "builtins" as the first argument. Remove the argument? | |
17 | Should this say Found ${name} library ? |
Something is not right with the android build after this change:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/1138
This is strange, according to build log, CMake succeeds when looking for liblog.so:
-- Looking for __android_log_write in log - found
However, later fails when trying to link it:
warning: liblog.so, needed by /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/lib/clang/6.0.0/lib/linux/libclang_rt.asan-aarch64-android.so, not found (try using -rpath or -rpath-link)
This is likely the reason why the link fails with a missing symbol. I'll continue investigating.
liblog warning could be a red herring - it's been happening before with aarch64 android toolchain.
SANITIZER_USE_COMPILER_RT - is that a user-facing option? then it should be declared as such.
Could you just use the regular cmake link flags instead?
This nodefaultlibs / rtlib change looks unrelated to the rest of this patch, could you upload it separately?