summaryrefslogtreecommitdiffstats
path: root/core/clang
diff options
context:
space:
mode:
Diffstat (limited to 'core/clang')
-rw-r--r--core/clang/HOST_x86.mk4
-rw-r--r--core/clang/HOST_x86_64.mk4
-rw-r--r--core/clang/HOST_x86_common.mk6
-rw-r--r--core/clang/TARGET_mips.mk2
-rw-r--r--core/clang/config.mk14
5 files changed, 21 insertions, 9 deletions
diff --git a/core/clang/HOST_x86.mk b/core/clang/HOST_x86.mk
index 510a74d..fb5cbf4 100644
--- a/core/clang/HOST_x86.mk
+++ b/core/clang/HOST_x86.mk
@@ -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
diff --git a/core/clang/HOST_x86_64.mk b/core/clang/HOST_x86_64.mk
index 6b94525..5f70678 100644
--- a/core/clang/HOST_x86_64.mk
+++ b/core/clang/HOST_x86_64.mk
@@ -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
diff --git a/core/clang/HOST_x86_common.mk b/core/clang/HOST_x86_common.mk
index 0241cb6..8820854 100644
--- a/core/clang/HOST_x86_common.mk
+++ b/core/clang/HOST_x86_common.mk
@@ -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)
diff --git a/core/clang/TARGET_mips.mk b/core/clang/TARGET_mips.mk
index e70e254..de615b0 100644
--- a/core/clang/TARGET_mips.mk
+++ b/core/clang/TARGET_mips.mk
@@ -43,7 +43,7 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \
$(CLANG_CONFIG_mips_TARGET_EXTRA_CFLAGS)
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \
- $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$(clang_2nd_arch_prefix)$(TARGET_GLOBAL_CPPFLAGS)) \
+ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \
$(CLANG_CONFIG_mips_TARGET_EXTRA_CPPFLAGS)
$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \
diff --git a/core/clang/config.mk b/core/clang/config.mk
index 10b4d72..59cb38e 100644
--- a/core/clang/config.mk
+++ b/core/clang/config.mk
@@ -6,11 +6,6 @@ WITHOUT_TARGET_CLANG := true
WITHOUT_HOST_CLANG := true
endif
-# We don't have 64-bit host prebuilts yet.
-ifeq (true,$(HOST_IS_64_BIT))
-FORCE_BUILD_LLVM_COMPONENTS := true
-endif
-
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/
@@ -29,9 +24,13 @@ CLANG_CONFIG_EXTRA_CFLAGS :=
CLANG_CONFIG_EXTRA_CPPFLAGS :=
CLANG_CONFIG_EXTRA_LDFLAGS :=
-CLANG_CONFIG_EXTRA_CFLAGS := \
+CLANG_CONFIG_EXTRA_CFLAGS += \
-D__compiler_offsetof=__builtin_offsetof
+# Help catch common 32/64-bit errors.
+CLANG_CONFIG_EXTRA_CFLAGS += \
+ -Werror=int-conversion
+
CLANG_CONFIG_UNKNOWN_CFLAGS := \
-funswitch-loops \
-fno-tree-sra \
@@ -42,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 :=