Enable HWASan for multiple modules in one place(Soong)

Environment variables HWASAN_INCLUDE_PATHS and
PRODUCT_HWASAN_INCLUDE_PATHS can be used to enable HWASan for multiple
modules, by just adding the module directory to the env variable.

Bug: b/271948407
Test: Set specific module directory to above env variable and check the
assembly codes of output elf files after building, finding hwasan
related symbols inside.

Change-Id: Ic49b515830c4469ca5fa94f547b26c0fb602fc54
This commit is contained in:
Hang Lu
2023-03-17 13:17:22 +08:00
parent dc0a4021cd
commit a98aab98c4
3 changed files with 15 additions and 0 deletions

View File

@@ -306,6 +306,8 @@ type productVariables struct {
MemtagHeapAsyncIncludePaths []string `json:",omitempty"`
MemtagHeapSyncIncludePaths []string `json:",omitempty"`
HWASanIncludePaths []string `json:",omitempty"`
VendorPath *string `json:",omitempty"`
OdmPath *string `json:",omitempty"`
ProductPath *string `json:",omitempty"`