diff options
author | Evgenii Stepanov <eugenis@google.com> | 2018-08-02 16:19:13 -0700 |
---|---|---|
committer | Evgenii Stepanov <eugenis@google.com> | 2018-08-16 13:18:47 -0700 |
commit | d97a6e94838641cfd08b2e212d1feab2a818cdd6 (patch) | |
tree | 1ec49f6fc8ad9d4f02ae2eeaf61c2953f5476fac /cc/makevars.go | |
parent | bd1cef56181f3d5a7f60144fe770b11fed6114ed (diff) | |
download | soong-d97a6e94838641cfd08b2e212d1feab2a818cdd6.tar.gz |
Add "hwaddress" sanitizer.
This is a new sanitizer similar to ASan, but with a few differences
from the build system perspective:
* Only runs on AArch64.
* Supports static binaries.
* Bionic itself will be built with HWASan.
* Does not have any "if a library is sanitized than the binary must
be, too" requirements unlike ASan. Even better, individual static
libraries can be freely sanitized or not. We propagate "nosanitize"
from binaries to static libraries anyway, because otherwise there
is no good way to disable hwasan on a binary as a whole.
Same a CFI, we export a list of sanitized static libraries to make.
In fact, we export separate lists for vendor and regular libraries,
because it is possible for one to be sanitized without the other
(i.e. there can be mylib.hwasan.vendor w/o mylib.hwasan or vice
versa).
Bug: 112438058, 112709969
Test: manual, part of a bigger patch set
Change-Id: Ie4fdeb522ac03cf9684526882e84dfee3807b6a7
Diffstat (limited to 'cc/makevars.go')
-rw-r--r-- | cc/makevars.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/makevars.go b/cc/makevars.go index 88d4639b5..072821c60 100644 --- a/cc/makevars.go +++ b/cc/makevars.go @@ -300,6 +300,8 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string, if target.Os.Class == android.Device { ctx.Strict(secondPrefix+"ADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.AddressSanitizerRuntimeLibrary(toolchain), ".so")) + ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.HWAddressSanitizerRuntimeLibrary(toolchain), ".so")) + ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_STATIC_LIBRARY", strings.TrimSuffix(config.HWAddressSanitizerStaticLibrary(toolchain), ".a")) ctx.Strict(secondPrefix+"UBSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerRuntimeLibrary(toolchain), ".so")) ctx.Strict(secondPrefix+"UBSAN_MINIMAL_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSanitizerMinimalRuntimeLibrary(toolchain), ".a")) ctx.Strict(secondPrefix+"TSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.ThreadSanitizerRuntimeLibrary(toolchain), ".so")) |