Merge "More Clang tweaks to the build system."

This commit is contained in:
Stephen Hines
2012-04-11 23:35:03 -07:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 1 deletions

View File

@@ -239,8 +239,14 @@ normal_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),thumb)
# Read the values from something like TARGET_arm_CFLAGS or
# TARGET_thumb_CFLAGS. HOST_(arm|thumb)_CFLAGS values aren't
# actually used (although they are usually empty).
ifeq ($(strip $(LOCAL_CLANG)),true)
arm_objects_cflags := $($(my_prefix)$(arm_objects_mode)_CLANG_CFLAGS)
normal_objects_cflags := $($(my_prefix)$(normal_objects_mode)_CLANG_CFLAGS)
else
arm_objects_cflags := $($(my_prefix)$(arm_objects_mode)_CFLAGS)
normal_objects_cflags := $($(my_prefix)$(normal_objects_mode)_CFLAGS)
endif
else
arm_objects_mode :=
normal_objects_mode :=

View File

@@ -33,6 +33,9 @@ ifeq ($(TARGET_ARCH),arm)
-fgcse-after-reload \
-frerun-cse-after-loop \
-frename-registers \
-fno-builtin-sin \
-fno-strict-volatile-bitfields \
-fno-align-jumps \
-Wa,--noexecstack
endif
ifeq ($(TARGET_ARCH),x86)
@@ -50,12 +53,15 @@ ifeq ($(TARGET_ARCH),x86)
-mbionic
endif
CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES := external/clang/lib/include
CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES := external/clang/lib/include $(TARGET_OUT_HEADERS)/clang
# remove unknown flags to define CLANG_FLAGS
TARGET_GLOBAL_CLANG_FLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(TARGET_GLOBAL_CFLAGS))
HOST_GLOBAL_CLANG_FLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(HOST_GLOBAL_CFLAGS))
TARGET_arm_CLANG_CFLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(TARGET_arm_CFLAGS))
TARGET_thumb_CLANG_CFLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(TARGET_thumb_CFLAGS))
# llvm does not yet support -march=armv5e nor -march=armv5te, fall back to armv5 or armv5t
$(call clang-flags-subst,-march=armv5te,-march=armv5t)
$(call clang-flags-subst,-march=armv5e,-march=armv5)