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

Commit 428246d5 authored by Mandeep Singh Grang's avatar Mandeep Singh Grang Committed by Linux Build Service Account
Browse files

Control building shared libs, static libs and executables with SDLLVM LTO

Change-Id: Ie71d09b0853954c44a37f708894eef68c2f6aafd
parent 7746de91
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ ifdef LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
my_clang := $(strip $(LOCAL_CLANG_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)))
endif

my_qcclang := $(strip $(LOCAL_QCCLANG))
my_sdclang := $(strip $(LOCAL_SDCLANG))

# clang is enabled by default for host builds
# enable it unless we've specifically disabled clang above
@@ -253,9 +253,9 @@ endif
my_cppflags := $(my_cpp_std_version) $(my_cppflags)


ifeq ($(QCCLANG),true)
    ifeq ($(my_qcclang),)
        my_qcclang := true
ifeq ($(SDCLANG),true)
    ifeq ($(my_sdclang),)
        my_sdclang := true
    endif
endif

@@ -334,12 +334,12 @@ my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CFL
my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CONLYFLAGS)
my_target_global_cppflags += $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CPPFLAGS)
my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_LDFLAGS)
    ifeq ($(my_qcclang),true)
    ifeq ($(my_sdclang),true)
        ifeq ($(strip $(my_cc)),)
            my_cc := $(QCCLANG_PATH)/clang $(SDLLVM_AE_FLAG) -Wno-vectorizer-no-neon
            my_cc := $(SDCLANG_PATH)/clang $(SDLLVM_AE_FLAG) -Wno-vectorizer-no-neon
        endif
        ifeq ($(strip $(my_cxx)),)
            my_cxx := $(QCCLANG_PATH)/clang++ $(SDLLVM_AE_FLAG) -Wno-vectorizer-no-neon
            my_cxx := $(SDCLANG_PATH)/clang++ $(SDLLVM_AE_FLAG) -Wno-vectorizer-no-neon
        endif
    endif
else
+3 −1
Original line number Diff line number Diff line
@@ -156,7 +156,9 @@ LOCAL_COMPATIBILITY_SUPPORT_FILES:=
LOCAL_CTS_TEST_PACKAGE:=
LOCAL_CTS_TEST_RUNNER:=
LOCAL_CLANG:=
LOCAL_QCCLANG:=
LOCAL_SDCLANG:=
LOCAL_SDCLANG_LTO:=
LOCAL_SDCLANG_EXTRA_FLAGS_32:=
LOCAL_JAR_EXCLUDE_FILES:=
LOCAL_JAR_PACKAGES:=
LOCAL_JAR_EXCLUDE_PACKAGES:=
+10 −0
Original line number Diff line number Diff line
@@ -42,6 +42,10 @@ endif

my_skip_non_preferred_arch :=

ifeq ($(LOCAL_SDCLANG), true)
include $(SDCLANG_FLAG_DEFS)
endif

# check if preferred arch is supported
include $(BUILD_SYSTEM)/module_arch_supported.mk
ifeq ($(my_module_arch_supported),true)
@@ -80,4 +84,10 @@ LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=

my_module_arch_supported :=

ifeq ($(LOCAL_SDCLANG), true)
ifeq ($(LOCAL_SDCLANG_LTO), true)
include $(SDCLANG_LTO_DEFS)
endif
endif

endif
+10 −0
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ endif
endif # my_module_multilib == both


ifeq ($(LOCAL_SDCLANG), true)
include $(SDCLANG_FLAG_DEFS)
endif

LOCAL_2ND_ARCH_VAR_PREFIX :=
include $(BUILD_SYSTEM)/module_arch_supported.mk

@@ -48,6 +52,12 @@ LOCAL_2ND_ARCH_VAR_PREFIX :=

endif # TARGET_2ND_ARCH

ifeq ($(LOCAL_SDCLANG), true)
ifeq ($(LOCAL_SDCLANG_LTO), true)
include $(SDCLANG_LTO_DEFS)
endif
endif

my_module_arch_supported :=

###########################################################
+10 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ ifndef my_module_multilib
my_module_multilib := both
endif

ifeq ($(LOCAL_SDCLANG), true)
include $(SDCLANG_FLAG_DEFS)
endif

LOCAL_2ND_ARCH_VAR_PREFIX :=
include $(BUILD_SYSTEM)/module_arch_supported.mk

@@ -33,6 +37,12 @@ LOCAL_2ND_ARCH_VAR_PREFIX :=

endif # TARGET_2ND_ARCH

ifeq ($(LOCAL_SDCLANG), true)
ifeq ($(LOCAL_SDCLANG_LTO), true)
include $(SDCLANG_LTO_DEFS)
endif
endif

my_module_arch_supported :=

###########################################################