Commit Graph

3 Commits

Author SHA1 Message Date
Kefu Chai
fd58e5d4ad cmake,ceph.in: preload libasan if WITH_ASAN
we need to preload libasan.so as the python exectuable is not likely to
be compiled with ASan enabled.
see:
https://github.com/google/sanitizers/wiki/AddressSanitizerAsDso#asan-and-ld_preload

just to ease the use of ASan, for fine-tuned behaviour, use
`ASAN_OPTIONS`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-10-22 14:40:03 +08:00
Kefu Chai
dda006a007 cmake: should use lowercase for component name in FindSanitizers.cmake
and s/undefined-behavior/undefined_behavior/ to be compatible with
seastar

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-21 20:05:49 +08:00
Kefu Chai
a7326ee0f4 cmake: extract sanitizer detection out
also, we don't need to pass '-lasan' or '-ltsan' to linker. it's
suggested to use the "-fsanitize=${sanitizer}".

please note, this module is compatible with the one used in seastar on
purpose, as seastar is included in ceph using add_subdirectory(), and it
in turn add its own cmake modules directory using list(APPEND ...), so
cmake/modules/FindSantitizers.cmake is prefered over
src/seastar/cmake/FindSantitizers.cmake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-02 14:43:47 +08:00