diff options
author | Andreas Gampe <agampe@google.com> | 2015-01-07 14:35:44 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-01-07 15:30:20 -0800 |
commit | bced67d061049b607ce02a9813ef9dd0c87f8081 (patch) | |
tree | 4c553e615fb4bd6bfd22c6418197acca1dfc78e5 /build | |
parent | 4ea18c02148cffe72e025990e9b2727bfec563da (diff) | |
download | art-bced67d061049b607ce02a9813ef9dd0c87f8081.zip art-bced67d061049b607ce02a9813ef9dd0c87f8081.tar.gz art-bced67d061049b607ce02a9813ef9dd0c87f8081.tar.bz2 |
ART: Fix Clang CFLAGS inclusion
Only include the CFLAGS if Clang is not explicitly disabled for the
architecture.
Change-Id: Ic63d7c8018f633a9b20a4ff9285d6380426017a5
Diffstat (limited to 'build')
-rw-r--r-- | build/Android.common_build.mk | 18 | ||||
-rw-r--r-- | build/Android.gtest.mk | 4 |
2 files changed, 12 insertions, 10 deletions
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk index 68f5ed7..0d3b4c9 100644 --- a/build/Android.common_build.mk +++ b/build/Android.common_build.mk @@ -138,7 +138,7 @@ art_gcc_cflags := -Wunused-but-set-parameter # Suggest final: Have to move to a more recent GCC. # -Wsuggest-final-types - +ART_TARGET_CLANG_CFLAGS := $(art_clang_cflags) ifeq ($(ART_HOST_CLANG),true) # Bug: 15446488. We don't omit the frame pointer to work around # clang/libunwind bugs that cause SEGVs in run-test-004-ThreadStress. @@ -146,10 +146,14 @@ ifeq ($(ART_HOST_CLANG),true) else ART_HOST_CFLAGS += $(art_gcc_cflags) endif -ifeq ($(ART_TARGET_CLANG),true) - ART_TARGET_CFLAGS += $(art_clang_cflags) -else +ifneq ($(ART_TARGET_CLANG),true) ART_TARGET_CFLAGS += $(art_gcc_cflags) +else + # TODO: if we ever want to support GCC/Clang mix for multi-target products, this needs to be + # split up. + ifeq ($(ART_TARGET_CLANG_$(TARGET_ARCH)),false) + ART_TARGET_CFLAGS += $(art_gcc_cflags) + endif endif # Clear local variables now their use has ended. @@ -294,11 +298,9 @@ define set-target-local-cflags-vars LOCAL_CFLAGS += $(ART_TARGET_NON_DEBUG_CFLAGS) endif - # TODO: Also set when ART_TARGET_CLANG_$(arch)!=false and ART_TARGET_CLANG==true + LOCAL_CLANG_CFLAGS := $(ART_TARGET_CLANG_CFLAGS) $(foreach arch,$(ART_SUPPORTED_ARCH), - ifeq ($$(ART_TARGET_CLANG_$(arch)),true) - LOCAL_CFLAGS_$(arch) += $$(ART_TARGET_CLANG_CFLAGS_$(arch)) - endif) + LOCAL_CLANG_CFLAGS_$(arch) += $$(ART_TARGET_CLANG_CFLAGS_$(arch))) # Clear locally used variables. art_target_cflags_ndebug_or_debug := diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk index 5aa264c..8180ce8 100644 --- a/build/Android.gtest.mk +++ b/build/Android.gtest.mk @@ -210,14 +210,14 @@ include $(CLEAR_VARS) LOCAL_MODULE := libart-gtest LOCAL_MODULE_TAGS := optional LOCAL_CPP_EXTENSION := cc -LOCAL_CFLAGS := $(ART_TARGET_CFLAGS) LOCAL_SRC_FILES := runtime/common_runtime_test.cc compiler/common_compiler_test.cc LOCAL_C_INCLUDES := $(ART_C_INCLUDES) art/runtime art/compiler LOCAL_SHARED_LIBRARIES := libartd libartd-compiler libdl LOCAL_STATIC_LIBRARIES += libgtest -LOCAL_CLANG := $(ART_TARGET_CLANG) LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.gtest.mk +$(eval $(call set-target-local-clang-vars)) +$(eval $(call set-target-local-cflags-vars,debug)) include external/libcxx/libcxx.mk include $(BUILD_SHARED_LIBRARY) |