Scudo minimal runtime support for Soong
Scudo is now compatible with the -fsanitize-minimal-runtime, and offers a new
dynamic library that doesn't bundle UBSan.
This patch adds support for this new library in Soong, preferring it over the
full one, unless a UBSan or diagnostic dependency is found.
Test: aosp compiled with m -j
Test: local test enabling Scudo for tombstoned
Change-Id: I17794131db148b33f8a8710ac43302cadf1af314
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index 997bca6..d5e9d01 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -220,6 +220,10 @@
return LibclangRuntimeLibrary(t, "scudo")
}
+func ScudoMinimalRuntimeLibrary(t Toolchain) string {
+ return LibclangRuntimeLibrary(t, "scudo_minimal")
+}
+
func ToolPath(t Toolchain) string {
if p := t.ToolPath(); p != "" {
return p