From 43d5e1bbc494e62d0d31097fe400f4aaed4f56f1 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Thu, 3 Apr 2014 16:06:59 -0700 Subject: [PATCH] Build changes necessary for LLVM 3.5 switch. Change-Id: Icb6065daada7cb1d7425206830a4ef9e23454c03 Conflicts: core/clang/arm.mk --- core/binary.mk | 3 --- core/clang/TARGET_arm.mk | 2 ++ core/clang/arm.mk | 11 ++++++++--- core/clang/arm64.mk | 1 - core/clang/config.mk | 4 ++-- core/clang/x86_common.mk | 13 +++++++++---- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 13659f598d..45782612a1 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -149,9 +149,6 @@ ifeq (,$(LOCAL_SDK_VERSION)$(LOCAL_IS_HOST_MODULE)$(WITHOUT_LIBCOMPILER_RT)) endif my_compiler_dependencies := -ifeq ($(strip $(LOCAL_CLANG)),true) - my_compiler_dependencies := $(CLANG) $(CLANG_CXX) -endif #################################################### ## Add FDO flags if FDO is turned on and supported diff --git a/core/clang/TARGET_arm.mk b/core/clang/TARGET_arm.mk index f32bbfb9fb..595fb562b3 100644 --- a/core/clang/TARGET_arm.mk +++ b/core/clang/TARGET_arm.mk @@ -16,12 +16,14 @@ CLANG_CONFIG_arm_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_EXTRA_CFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ $(CLANG_CONFIG_arm_EXTRA_CFLAGS) \ + -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) \ $(CLANG_CONFIG_arm_TARGET_EXTRA_ASFLAGS) CLANG_CONFIG_arm_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_arm_EXTRA_CPPFLAGS) \ + -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) CLANG_CONFIG_arm_TARGET_EXTRA_LDFLAGS := \ $(CLANG_CONFIG_EXTRA_LDFLAGS) \ diff --git a/core/clang/arm.mk b/core/clang/arm.mk index 28d87bb79f..22c73977a6 100644 --- a/core/clang/arm.mk +++ b/core/clang/arm.mk @@ -1,11 +1,16 @@ # Clang flags for arm arch, target or host. -CLANG_CONFIG_arm_EXTRA_ASFLAGS := +CLANG_CONFIG_arm_EXTRA_ASFLAGS := \ + -no-integrated-as CLANG_CONFIG_arm_EXTRA_CFLAGS := \ - -mllvm -arm-enable-ehabi + -no-integrated-as -CLANG_CONFIG_arm_EXTRA_LDFLAGS := +CLANG_CONFIG_arm_EXTRA_CPPFLAGS := \ + -no-integrated-as + +CLANG_CONFIG_arm_EXTRA_LDFLAGS := \ + -no-integrated-as # Include common unknown flags CLANG_CONFIG_arm_UNKNOWN_CFLAGS := \ diff --git a/core/clang/arm64.mk b/core/clang/arm64.mk index c9fef389c5..e8342bd060 100644 --- a/core/clang/arm64.mk +++ b/core/clang/arm64.mk @@ -3,7 +3,6 @@ CLANG_CONFIG_arm64_EXTRA_ASFLAGS := CLANG_CONFIG_arm64_EXTRA_CFLAGS := \ - -mllvm -arm-enable-ehabi CLANG_CONFIG_arm64_EXTRA_LDFLAGS := diff --git a/core/clang/config.mk b/core/clang/config.mk index 6bc5f28a1f..a79a558e34 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -6,8 +6,8 @@ WITHOUT_TARGET_CLANG := true WITHOUT_HOST_CLANG := true endif -LLVM_PREBUILTS_PATH := prebuilts/clang/$(BUILD_OS)-x86/host/3.4/bin -LLVM_PREBUILTS_HEADER_PATH := prebuilts/clang/$(BUILD_OS)-x86/host/3.4/lib/clang/3.4/include/ +LLVM_PREBUILTS_PATH := prebuilts/clang/$(BUILD_OS)-x86/host/3.5/bin +LLVM_PREBUILTS_HEADER_PATH := prebuilts/clang/$(BUILD_OS)-x86/host/3.5/lib/clang/3.5/include/ CLANG := $(LLVM_PREBUILTS_PATH)/clang$(BUILD_EXECUTABLE_SUFFIX) CLANG_CXX := $(LLVM_PREBUILTS_PATH)/clang++$(BUILD_EXECUTABLE_SUFFIX) diff --git a/core/clang/x86_common.mk b/core/clang/x86_common.mk index aaee62eb06..0bb565f52c 100644 --- a/core/clang/x86_common.mk +++ b/core/clang/x86_common.mk @@ -3,13 +3,14 @@ ifeq ($(HOST_OS),darwin) endif ifeq ($(HOST_OS),linux) - CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \ --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \ - --sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot + --sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot \ + -no-integrated-as CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \ --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \ + -no-integrated-as ifneq ($(strip $(BUILD_HOST_64bit)),) CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \ @@ -18,6 +19,7 @@ CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \ -isystem $(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6 \ -isystem $(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/x86_64-linux \ -isystem $(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/backward \ + -no-integrated-as CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \ --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \ @@ -25,7 +27,8 @@ CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \ -B$(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \ -B$(HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6 \ -L$(HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6 \ - -L$(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib64/ + -L$(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib64/ \ + -no-integrated-as else CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \ --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \ @@ -33,6 +36,7 @@ CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \ -isystem $(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6 \ -isystem $(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/x86_64-linux/32 \ -isystem $(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/include/c++/4.6/backward \ + -no-integrated-as CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \ --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \ @@ -40,7 +44,8 @@ CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \ -B$(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin \ -B$(HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6/32 \ -L$(HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/x86_64-linux/4.6/32 \ - -L$(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib32/ + -L$(HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/lib32/ \ + -no-integrated-as endif endif