[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 09:08:17 PDT 2024


================
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain &TC, const ArgList &Args,
       StaticRuntimes.push_back("asan_cxx");
   }
 
+  if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) {
+    StaticRuntimes.push_back("radsan");
+  }
----------------
cjappl wrote:

Ok, if I can summarize the important bits in my own words:

Different platforms have different defaults they use for the sanitizers, some (Darwin, for example) use shared, others (clang on Linux) use static.

A user can specify and override the default with the flags `-[shared|static]-libsan`.



To support the most possible configurations, do you think we should add back in the ability to link the shared library in this file? In Darwin.cpp we already show the ability to link the shared runtime, so it seemingly would be as simple as adding in a:

```
    if (SanArgs.needsRadsanRt())
      SharedRuntimes.push_back("radsan");

```

To the block above. Any advice?

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


More information about the llvm-commits mailing list