[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 15:05:06 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:
The reference is intentionally in an inline function in the `RTSanitizerCommon` library, so that if the function is not called, there is no such check. If we move it into `.cpp`, programs linking in ubsan/xray will fail for `-static`.
I think we can make ubsan standalone runtime work for `-static`: https://github.com/llvm/llvm-project/pull/80943
At the very least, we should not let `-fsanitize-minimal-runtime` fail for `-static`.
https://github.com/llvm/llvm-project/pull/80948
More information about the llvm-commits
mailing list