Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8db47a0 authored by Dan Willemsen's avatar Dan Willemsen Committed by Gerrit Code Review
Browse files

Merge "Don't build windows modules with clang, fix flags"

parents c5fe3f11 7728817a
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -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)
+3 −3
Original line number Diff line number Diff line
@@ -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)),)