forked from openkylin/platform_build
Use libgcov OR libclang_rt.profile, not both.
Using both can cause duplicate symbol errors. Change-Id: Id8ee13a81d32e3248ff1cdc468f49a26ecde6b57
This commit is contained in:
parent
6a8146f2a2
commit
7fbbc5d205
|
@ -346,6 +346,14 @@ else
|
||||||
my_native_coverage := false
|
my_native_coverage := false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(my_clang),true)
|
||||||
|
my_coverage_lib := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBPROFILE_RT)
|
||||||
|
else
|
||||||
|
my_coverage_lib := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBGCOV)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_COVERAGE_LIB := $(my_coverage_lib)
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## Define PRIVATE_ variables used by multiple module types
|
## Define PRIVATE_ variables used by multiple module types
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
|
@ -1475,8 +1475,7 @@ $(hide) $(PRIVATE_CXX) \
|
||||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
|
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
|
||||||
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||||
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBGCOV)) \
|
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_COVERAGE_LIB)) \
|
||||||
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBPROFILE_RT)) \
|
|
||||||
$(PRIVATE_TARGET_LIBATOMIC) \
|
$(PRIVATE_TARGET_LIBATOMIC) \
|
||||||
$(PRIVATE_TARGET_LIBGCC) \
|
$(PRIVATE_TARGET_LIBGCC) \
|
||||||
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||||
|
@ -1548,8 +1547,7 @@ $(hide) $(PRIVATE_CXX) -pie \
|
||||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
|
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
|
||||||
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||||
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBGCOV)) \
|
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_COVERAGE_LIB)) \
|
||||||
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBPROFILE_RT)) \
|
|
||||||
$(PRIVATE_TARGET_LIBATOMIC) \
|
$(PRIVATE_TARGET_LIBATOMIC) \
|
||||||
$(PRIVATE_TARGET_LIBGCC) \
|
$(PRIVATE_TARGET_LIBGCC) \
|
||||||
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||||
|
@ -1595,8 +1593,7 @@ $(hide) $(PRIVATE_CXX) \
|
||||||
-Wl,--start-group \
|
-Wl,--start-group \
|
||||||
$(call normalize-target-libraries,$(filter %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
$(call normalize-target-libraries,$(filter %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
||||||
$(call normalize-target-libraries,$(filter %libc_nomalloc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
$(call normalize-target-libraries,$(filter %libc_nomalloc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
||||||
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBGCOV)) \
|
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_COVERAGE_LIB)) \
|
||||||
$(if $(filter true,$(NATIVE_COVERAGE)),$(PRIVATE_TARGET_LIBPROFILE_RT)) \
|
|
||||||
$(PRIVATE_TARGET_LIBATOMIC) \
|
$(PRIVATE_TARGET_LIBATOMIC) \
|
||||||
$(call normalize-target-libraries,$(filter %libcompiler_rt.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
$(call normalize-target-libraries,$(filter %libcompiler_rt.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
||||||
$(PRIVATE_TARGET_LIBGCC) \
|
$(PRIVATE_TARGET_LIBGCC) \
|
||||||
|
|
|
@ -35,8 +35,6 @@ endif
|
||||||
|
|
||||||
# Define PRIVATE_ variables from global vars
|
# Define PRIVATE_ variables from global vars
|
||||||
my_target_global_ld_dirs := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LD_DIRS)
|
my_target_global_ld_dirs := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LD_DIRS)
|
||||||
my_target_libprofile_rt := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBPROFILE_RT)
|
|
||||||
my_target_libgcov := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBGCOV)
|
|
||||||
ifeq ($(LOCAL_NO_LIBGCC),true)
|
ifeq ($(LOCAL_NO_LIBGCC),true)
|
||||||
my_target_libgcc :=
|
my_target_libgcc :=
|
||||||
else
|
else
|
||||||
|
@ -66,8 +64,6 @@ my_target_crtend_o := $(wildcard $(my_ndk_sysroot_lib)/crtend_android.o)
|
||||||
endif
|
endif
|
||||||
$(linked_module): PRIVATE_TARGET_GLOBAL_LD_DIRS := $(my_target_global_ld_dirs)
|
$(linked_module): PRIVATE_TARGET_GLOBAL_LD_DIRS := $(my_target_global_ld_dirs)
|
||||||
$(linked_module): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
|
$(linked_module): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
|
||||||
$(linked_module): PRIVATE_TARGET_LIBPROFILE_RT := $(my_target_libprofile_rt)
|
|
||||||
$(linked_module): PRIVATE_TARGET_LIBGCOV := $(my_target_libgcov)
|
|
||||||
$(linked_module): PRIVATE_TARGET_LIBGCC := $(my_target_libgcc)
|
$(linked_module): PRIVATE_TARGET_LIBGCC := $(my_target_libgcc)
|
||||||
$(linked_module): PRIVATE_TARGET_LIBATOMIC := $(my_target_libatomic)
|
$(linked_module): PRIVATE_TARGET_LIBATOMIC := $(my_target_libatomic)
|
||||||
$(linked_module): PRIVATE_TARGET_CRTBEGIN_DYNAMIC_O := $(my_target_crtbegin_dynamic_o)
|
$(linked_module): PRIVATE_TARGET_CRTBEGIN_DYNAMIC_O := $(my_target_crtbegin_dynamic_o)
|
||||||
|
|
|
@ -40,8 +40,6 @@ include $(BUILD_SYSTEM)/dynamic_binary.mk
|
||||||
|
|
||||||
# Define PRIVATE_ variables from global vars
|
# Define PRIVATE_ variables from global vars
|
||||||
my_target_global_ld_dirs := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LD_DIRS)
|
my_target_global_ld_dirs := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LD_DIRS)
|
||||||
my_target_libprofile_rt := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBPROFILE_RT)
|
|
||||||
my_target_libgcov := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBGCOV)
|
|
||||||
ifeq ($(LOCAL_NO_LIBGCC),true)
|
ifeq ($(LOCAL_NO_LIBGCC),true)
|
||||||
my_target_libgcc :=
|
my_target_libgcc :=
|
||||||
else
|
else
|
||||||
|
@ -68,8 +66,6 @@ my_target_crtend_so_o := $(wildcard $(my_ndk_sysroot_lib)/crtend_so.o)
|
||||||
endif
|
endif
|
||||||
$(linked_module): PRIVATE_TARGET_GLOBAL_LD_DIRS := $(my_target_global_ld_dirs)
|
$(linked_module): PRIVATE_TARGET_GLOBAL_LD_DIRS := $(my_target_global_ld_dirs)
|
||||||
$(linked_module): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
|
$(linked_module): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
|
||||||
$(linked_module): PRIVATE_TARGET_LIBPROFILE_RT := $(my_target_libprofile_rt)
|
|
||||||
$(linked_module): PRIVATE_TARGET_LIBGCOV := $(my_target_libgcov)
|
|
||||||
$(linked_module): PRIVATE_TARGET_LIBGCC := $(my_target_libgcc)
|
$(linked_module): PRIVATE_TARGET_LIBGCC := $(my_target_libgcc)
|
||||||
$(linked_module): PRIVATE_TARGET_LIBATOMIC := $(my_target_libatomic)
|
$(linked_module): PRIVATE_TARGET_LIBATOMIC := $(my_target_libatomic)
|
||||||
$(linked_module): PRIVATE_TARGET_CRTBEGIN_SO_O := $(my_target_crtbegin_so_o)
|
$(linked_module): PRIVATE_TARGET_CRTBEGIN_SO_O := $(my_target_crtbegin_so_o)
|
||||||
|
|
Loading…
Reference in New Issue