Sanitizers are conflicting with this option:
When linking shared libraries, the AddressSanitizer run-time is not
linked, so -Wl,-z,defs may cause link errors (t use it with
AddressSanitizer).
https://clang.llvm.org/docs/AddressSanitizer.html
When linking shared libraries, the MemorySanitizer run-time is not
linked, so -Wl,-z,defs may cause link errors (t use it with
MemorySanitizer).
https://clang.llvm.org/docs/MemorySanitizer.html
Solution suggested by <christos>
Root cause of breaking libc++ investigated by <Yang Zheng>