Link PRIVATE_TARGET_FDO_LIB before shared libraries
For global declaration of FDO profile generation and usage, we need to link PRIVATE_TARGET_FDO_LIB (libgcov.a by default) prior to linking shared libraries. TARGET_FDO_LIB is set if feedback directed optimizations are in use, so we do not need to worry about consistent size increases from this change. Change-Id: I543903f58893816f037c9466f31b19dfe822fdf4
This commit is contained in:
parent
840f9d0a27
commit
cfdb24f1cb
|
@ -245,11 +245,11 @@ $(hide) $(PRIVATE_CXX) \
|
|||
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||
$(if $(TARGET_BUILD_APPS),$(PRIVATE_TARGET_LIBGCC)) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O))
|
||||
endef
|
||||
|
@ -270,11 +270,11 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
|
|||
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||
$(if $(TARGET_BUILD_APPS),$(PRIVATE_TARGET_LIBGCC)) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O))
|
||||
endef
|
||||
|
|
|
@ -236,11 +236,11 @@ $(hide) $(PRIVATE_CXX) \
|
|||
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O))
|
||||
endef
|
||||
|
@ -261,11 +261,11 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
|
|||
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(PRIVATE_TARGET_FDO_LIB) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O))
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue