summaryrefslogtreecommitdiffstats
path: root/core/config_sanitizers.mk
Commit message (Collapse)AuthorAgeFilesLines
* --no-as-needed needs -Wl.Dan Albert2015-05-121-1/+1
| | | | | | Not sure why my checkbuild passed. Change-Id: Idd0f477faebf0b7d79998c8a86610728c2c8cc5d
* Fix AddressSanitizer link order and multilib setup.Evgenii Stepanov2015-05-121-1/+5
| | | | | | | | | | | | | | | ASan runtime library (when using dynamic linking) must be the first dependency of the main executable to achieve correct symbol interposition. This matches how the clang driver works. In multilib setup, ASan-RT name depends on the target arch: /system/lib/libclang_rt.asan-arm-android.so /system/lib64/libclang_rt.asan-arm64-android.so We also set RPATH to /system/lib/asan or /system/lib64/asan to have a place for ASan-only versions of system libraries. Change-Id: I937d202077b6e433ba476c075d31be818b662d53
* Make asan more closely match clang behavior.Dan Albert2015-05-121-1/+2
| | | | | | | | | | | | Always link libm with asan. Hasn't been a problem before because ASAN was only ever used when libc++ was as well, which already links libm. Pass --no-as-needed for host modules. These aren't needed for the target builds because the target uses the shared RTL. Change-Id: I3b95c8682c0f63bac6b726f8cd15c638aaa98311
* Add support for a partial ubsan build.Dan Albert2015-04-171-4/+8
| | | | | | | | | | Some of the ubsan checks expose a few pathological performance cases in clang, and thus aren't suited to be used in SANITIZE_HOST. This mode is also supported on the target despite not having the target runtime libraries for ubsan by generating traps. Change-Id: I0b0f0a08ca84d72e44e2174a66726b1c5e5cad7e
* Fix misuse of my_sanitize_host.Dan Albert2015-04-171-19/+17
| | | | | | | | Ying pointed out in https://android-review.googlesource.com/#/c/147290 that my_sanitize_host would be read as some garbage value for target builds. Move the configuration later and don't use the local at all. Change-Id: Id8a095821d000a184e72f950b9481597073a7044
* Make use of sanitizers without clang an error.Dan Albert2015-04-171-4/+11
| | | | | | | Previously using a sanitizer would imply clang. It should be an error instead so it's more obvious. Change-Id: I67c949bfda3718a0d19da7e358b5fde447fce334
* Clean up sanitizer configuration.Dan Albert2015-04-171-6/+23
| | | | | | | * Refactor a few pieces to avoid deeply nested conditionals. * LOCAL_SANITIZE := never replaces LOCAL_ADDRESS_SANITIZER := false. Change-Id: I68bb8c5edda6ecd40179c5ba9f18d06e96aaa260
* Add support for ubsan.Dan Albert2015-04-081-8/+44
| | | | | | | | | | | | | | | Rather than adding LOCAL_UB_SANITIZER, LOCAL_THREAD_SANITIZER, etc for each new sanitizer, deprecate LOCAL_ADDRESS_SANITIZER in favor of LOCAL_SANITZE that mirrors the behavior of -fsanitize=<sanitizers>. For example, the following will use both asan and ubsan: LOCAL_SANITIZE := address undefined We'll leave LOCAL_ADDRESS_SANITIZER around for compatibility until we can clean up the tree. Change-Id: I8a62315129d4753f8e992584ca6db1e5dfdd4d2a
* Add a SANITIZE_HOST flag.Dan Albert2014-12-051-0/+32
We had discussed the idea of making all host tools default to using ASAN. Even if we don't make it the default, this makes it easy for the user to switch all host binaries over. Change-Id: I64a5c741b1b4e9aefed3a6be8dcd4f386e06b29c