diff options
| author | Dan Albert <danalbert@google.com> | 2015-04-17 19:08:59 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-17 19:08:59 +0000 |
| commit | 757417f9438a3a83d9fa1f7b10d74436fd6f61e4 (patch) | |
| tree | 3acd5e5ad70aa4f66628fd4096f19b8d7b59bd35 /core | |
| parent | fad709772e766ce83b4667e89a25a7f0d90ca5f8 (diff) | |
| parent | f1b7c073a4d1b3f47811b6b9e85c6589d293c373 (diff) | |
| download | build-757417f9438a3a83d9fa1f7b10d74436fd6f61e4.zip build-757417f9438a3a83d9fa1f7b10d74436fd6f61e4.tar.gz build-757417f9438a3a83d9fa1f7b10d74436fd6f61e4.tar.bz2 | |
am f1b7c073: am 6ed5bea4: Merge "Make use of sanitizers without clang an error."
* commit 'f1b7c073a4d1b3f47811b6b9e85c6589d293c373':
Make use of sanitizers without clang an error.
Diffstat (limited to 'core')
| -rw-r--r-- | core/config_sanitizers.mk | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index e7a516e..99dc55e 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -12,8 +12,10 @@ ifeq ($(my_sanitize_host),true) my_sanitize_host := address endif -# `LOCAL_CLANG := false` disables SANITIZE_HOST. -ifeq ($(my_clang),false) +# SANITIZE_HOST is only in effect if the module is already using clang (host +# modules that haven't set `LOCAL_CLANG := false` and device modules that have +# set `LOCAL_CLANG := true`. +ifneq ($(my_clang),true) my_sanitize_host := endif @@ -43,6 +45,13 @@ ifeq ($(my_sanitize),never) my_sanitize := endif +# Sanitizers can only be used with clang. +ifneq ($(my_clang),true) + ifneq ($(my_sanitize),) + $(error $(LOCAL_PATH): $(LOCAL_MODULE): Use of sanitizers requires LOCAL_CLANG := true) + endif +endif + unknown_sanitizers := $(filter-out address, \ $(filter-out undefined,$(my_sanitize))) @@ -51,8 +60,6 @@ ifneq ($(unknown_sanitizers),) endif ifneq ($(my_sanitize),) - my_clang := true - fsanitize_arg := $(subst $(space),$(comma),$(my_sanitize)), my_cflags += -fsanitize=$(fsanitize_arg) |
