[compiler-rt] [sanitizer] Lift AsanDoesNotSupportStaticLinkage to sanitizer_common.h. NFC (PR #80948)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 14:09:10 PST 2024


================
@@ -290,6 +290,17 @@ bool SetEnv(const char *name, const char *value);
 
 u32 GetUid();
 void ReExec();
+
+#if defined(__ELF__) && !SANITIZER_FUCHSIA
----------------
MaskRay wrote:

`compiler-rt/lib/asan/asan_fuchsia.cpp` has `void *AsanDoesNotSupportStaticLinkage() { return nullptr; }`, which opts out the check. I am not familiar with Fuchsia, but it doesn't seem to use interceptors, so technically static linking is supported, unlike other ELF OSes. 

@petrhosek 

https://github.com/llvm/llvm-project/pull/80948


More information about the llvm-commits mailing list