Soong support for Scudo
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.
This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.
Bug: 72112048
Test: aosp compiled with m -j
Test: local experiment with scudo: true to ensure that a test target
(tombstoned) could be linked with scudo.
Change-Id: I76bb6c60891d4782f6665a112c4c2bf7c31645da
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index ca863a7..ea8397d 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -243,6 +243,10 @@
return SanitizerRuntimeLibrary(t, "profile")
}
+func ScudoRuntimeLibrary(t Toolchain) string {
+ return SanitizerRuntimeLibrary(t, "scudo")
+}
+
func ToolPath(t Toolchain) string {
if p := t.ToolPath(); p != "" {
return p