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
This commit is contained in:
parent
c5fe3f117d
commit
7728817ab9
2 changed files with 12 additions and 13 deletions
|
@ -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)
|
||||
|
|
|
@ -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)),)
|
||||
|
|
Loading…
Reference in a new issue