aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2015-09-09 15:45:21 -0700
committerDan Willemsen <dwillemsen@google.com>2015-09-09 16:10:50 -0700
commit7728817ab9cf9ba97ab8a8d6df27324ea7ccb0c2 (patch)
tree6013a23a07bcb0ac7180aee2dbdb6c0a9adf7f26
parentc5fe3f117d79ed9ddb6e77fbf211a87dc5dffed4 (diff)
downloadbuild-7728817ab9cf9ba97ab8a8d6df27324ea7ccb0c2.tar.gz
Don't build windows modules with clang, fix flags
shamu checkbuilds set USE_CLANG_PLATFORM_BUILD, which shouldn't apply to modules built for windows. Also fix some flags that were being set improperly. Bug: 23566667 Change-Id: Id4c5b7cc59966328483d90f2b7be3f35e439ecee
-rw-r--r--core/binary.mk19
-rw-r--r--core/combo/HOST_CROSS_windows-x86.mk6
2 files changed, 12 insertions, 13 deletions
diff --git a/core/binary.mk b/core/binary.mk
index e18cceadec..4bf31ad50c 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -191,6 +191,15 @@ ifdef LOCAL_IS_HOST_MODULE
my_clang := true
endif
endif
+# Add option to make clang the default for device build
+else ifeq ($(USE_CLANG_PLATFORM_BUILD),true)
+ ifeq ($(my_clang),)
+ my_clang := true
+ endif
+endif
+
+ifeq ($(strip $($(LOCAL_2ND_ARCH_VAR_PREFIX)WITHOUT_$(my_prefix)CLANG)),true)
+ my_clang :=
endif
my_cpp_std_version := -std=gnu++14
@@ -209,12 +218,6 @@ endif
my_cppflags := $(my_cpp_std_version) $(my_cppflags)
-# Add option to make clang the default for device build
-ifeq ($(USE_CLANG_PLATFORM_BUILD),true)
- 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)
@@ -235,10 +238,6 @@ my_linker := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LINKER)
include $(BUILD_SYSTEM)/config_sanitizers.mk
-ifeq ($(strip $($(LOCAL_2ND_ARCH_VAR_PREFIX)WITHOUT_$(my_prefix)CLANG)),true)
- my_clang :=
-endif
-
# Add in libcompiler_rt for all regular device builds
ifeq (,$(LOCAL_SDK_VERSION)$(WITHOUT_LIBCOMPILER_RT))
my_static_libraries += $(COMPILER_RT_CONFIG_EXTRA_STATIC_LIBRARIES)
diff --git a/core/combo/HOST_CROSS_windows-x86.mk b/core/combo/HOST_CROSS_windows-x86.mk
index e4d8593955..f5095949d8 100644
--- a/core/combo/HOST_CROSS_windows-x86.mk
+++ b/core/combo/HOST_CROSS_windows-x86.mk
@@ -33,15 +33,15 @@ $(combo_var_prefix)GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MAC
# Use C99-compliant printf functions (%zd).
$(combo_var_prefix)GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
# Admit to using >= Win2K.
-$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D_WIN32_WINNT=0x0500
+$(combo_var_prefix)GLOBAL_CFLAGS += -D_WIN32_WINNT=0x0500
# Get 64-bit off_t and related functions.
-$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64
+$(combo_var_prefix)GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64
$(combo_var_prefix)CC := $(TOOLS_PREFIX)gcc
$(combo_var_prefix)CXX := $(TOOLS_PREFIX)g++
$(combo_var_prefix)AR := $(TOOLS_PREFIX)ar
-$(combo_var_prefix)HOST_GLOBAL_LDFLAGS += \
+$(combo_var_prefix)GLOBAL_LDFLAGS += \
--enable-stdcall-fixup
ifneq ($(strip $(BUILD_HOST_static)),)