The `_DYNAMIC` reference from `AsanDoesNotSupportStaticLinkage` ensures that `clang++ -fsanitize=address -static` gets a linker error. `MemprofDoesNotSupportStaticLinkage` is similar for `-fmemory-profile`. Move the functions to sanitizer_common.h to be used by more sanitizers on ELF platforms. Fuchsia does not use interposition and opts out the check (its `AsanDoesNotSupportStaticLinkage` is a no-op).
8.9 KiB
8.9 KiB