From 7d6b3f1595768579e0ebe666ced26f968947dc6f Mon Sep 17 00:00:00 2001 From: Alexey Polyudov Date: Fri, 24 Jun 2016 11:22:51 -0700 Subject: [PATCH] Do not assume CLANG is used when custom toolchain is provided When overriding toolchain with LOCAL_CC, LOCAL_CXX build system shall not assume that this custom toolchain is CLANG. Bug: 29635686 Change-Id: I9712d098216740c4ff20bd2a4749f489af85b50e Signed-off-by: Alexey Polyudov --- core/binary.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/binary.mk b/core/binary.mk index 77362e31e8..439235bc06 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -268,6 +268,13 @@ ifdef LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) my_clang := $(strip $(LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))) endif +# if custom toolchain is in use, default is not to use clang, if not explicitly required +ifneq ($(my_cc)$(my_cxx),) + ifeq ($(my_clang),) + my_clang := false + endif +endif + # clang is enabled by default for host builds # enable it unless we've specifically disabled clang above ifdef LOCAL_IS_HOST_MODULE