Switch host builds to use Clang by default.
If LOCAL_CLANG is not set to false for a host module, clang will be used instead of gcc. This also enables the integrated assembler by default for Darwin host builds. bug 16172793 Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
This commit is contained in:
parent
1bb9adb880
commit
92d79cbb41
6 changed files with 26 additions and 2 deletions
|
@ -244,6 +244,9 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)
|
|||
# dalvik.vm.image-dex2oat-Xms, and dalvik.vm.image-dex2oat-Xmx
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
|
||||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)
|
||||
|
||||
# Switch host builds to Clang by default
|
||||
$(call add-clean-step, rm -rf $(OUT_DIR)/host)
|
||||
# ************************************************
|
||||
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||
# ************************************************
|
||||
|
|
|
@ -130,6 +130,14 @@ ifdef LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
|||
my_clang := $(LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
|
||||
endif
|
||||
|
||||
# clang is enabled by default for host builds
|
||||
# enable it unless we've specifically disabled clang above
|
||||
ifdef LOCAL_IS_HOST_MODULE
|
||||
ifeq ($(my_clang),)
|
||||
my_clang := true
|
||||
endif
|
||||
endif
|
||||
|
||||
# arch-specific static libraries go first so that generic ones can depend on them
|
||||
my_static_libraries := $(LOCAL_STATIC_LIBRARIES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_STATIC_LIBRARIES_$(my_32_64_bit_suffix)) $(my_static_libraries)
|
||||
my_whole_static_libraries := $(LOCAL_WHOLE_STATIC_LIBRARIES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_WHOLE_STATIC_LIBRARIES_$(my_32_64_bit_suffix)) $(my_whole_static_libraries)
|
||||
|
|
|
@ -11,6 +11,10 @@ CLANG_CONFIG_x86_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA
|
|||
endif
|
||||
ifeq ($(HOST_OS),darwin)
|
||||
CLANG_CONFIG_x86_HOST_TRIPLE := i686-apple-darwin
|
||||
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_ASFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_ASFLAGS)
|
||||
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS)
|
||||
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CPPFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CPPFLAGS)
|
||||
CLANG_CONFIG_x86_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_LDFLAGS)
|
||||
endif
|
||||
ifeq ($(HOST_OS),windows)
|
||||
CLANG_CONFIG_x86_HOST_TRIPLE := i686-pc-mingw32
|
||||
|
|
|
@ -11,6 +11,10 @@ CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EX
|
|||
endif
|
||||
ifeq ($(HOST_OS),darwin)
|
||||
CLANG_CONFIG_x86_64_HOST_TRIPLE := x86_64-apple-darwin
|
||||
CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_ASFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_ASFLAGS)
|
||||
CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS)
|
||||
CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CPPFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CPPFLAGS)
|
||||
CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_LDFLAGS)
|
||||
endif
|
||||
ifeq ($(HOST_OS),windows)
|
||||
CLANG_CONFIG_x86_64_HOST_TRIPLE := x86_64-pc-mingw64
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# Shared by HOST_x86.mk and HOST_x86_64.mk.
|
||||
|
||||
ifeq ($(HOST_OS),darwin)
|
||||
# nothing required here yet
|
||||
CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_ASFLAGS := \
|
||||
-integrated-as
|
||||
|
||||
CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS := \
|
||||
-integrated-as
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),linux)
|
||||
|
|
|
@ -41,7 +41,8 @@ CLANG_CONFIG_UNKNOWN_CFLAGS := \
|
|||
-Wmaybe-uninitialized \
|
||||
-Wno-maybe-uninitialized \
|
||||
-Wno-error=maybe-uninitialized \
|
||||
-fno-canonical-system-headers
|
||||
-fno-canonical-system-headers \
|
||||
-Wno-unused-local-typedefs
|
||||
|
||||
# Clang flags for all host rules
|
||||
CLANG_CONFIG_HOST_EXTRA_ASFLAGS :=
|
||||
|
|
Loading…
Reference in a new issue