Support "memtag_heap" sanitizer.
Memtag_heap adds an ELF note that enables MTE heap tagging in
bionic/scudo. Ignored on non-executables. With diagnostic
(diag:{memtag_heap:true}) enables the SYNC mode, otherwise - ASYNC mode.
Memtag_heap defaults to set (with diag) on cc_test targets, unset
otherwise. Ignored on non MTE-compatible hardware.
Bug: b/135772972
Test: soong tests
Change-Id: I88fd0f159e609e17bd13487749980a1ba02cb91c
diff --git a/cc/testing.go b/cc/testing.go
index 8d92ea2..903f76c 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -445,6 +445,14 @@
stl: "none",
system_shared_libs: [],
}
+
+ cc_library_static {
+ name: "note_memtag_heap_async",
+ }
+
+ cc_library_static {
+ name: "note_memtag_heap_sync",
+ }
`
supportLinuxBionic := false