OSDN Git Service

Control building shared libs, static libs and executables with SDLLVM LTO
authorMandeep Singh Grang <mgrang@codeaurora.org>
Fri, 20 May 2016 22:12:11 +0000 (15:12 -0700)
committerLinux Build Service Account <lnxbuild@localhost>
Wed, 24 Aug 2016 14:16:25 +0000 (08:16 -0600)
Change-Id: Ie71d09b0853954c44a37f708894eef68c2f6aafd

core/binary.mk
core/clear_vars.mk
core/executable.mk
core/shared_library.mk
core/static_library.mk

index e61c230..bdb6fe4 100644 (file)
@@ -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
index de28c43..1e74fbe 100644 (file)
@@ -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:=
index e22ea0e..5a33db7 100644 (file)
@@ -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
index 2f48341..26c455d 100644 (file)
@@ -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 :=
 
 ###########################################################
index a8ae399..61a63d0 100644 (file)
@@ -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 :=
 
 ###########################################################