OSDN Git Service

Enable LOCAL_POST_LINK_CMD for non-static executables.
authorYabin Cui <yabinc@google.com>
Wed, 2 Mar 2016 22:03:41 +0000 (14:03 -0800)
committerYabin Cui <yabinc@google.com>
Thu, 3 Mar 2016 01:04:11 +0000 (17:04 -0800)
It is needed to insert testdata section into simpleperf cts test.

Bug: 27387280
Change-Id: I58cea106d135f535626d8624a016bd2aaceeb8ea

core/executable_internal.mk

index 2105f58..febea98 100644 (file)
@@ -70,15 +70,16 @@ $(linked_module): PRIVATE_TARGET_CRTBEGIN_DYNAMIC_O := $(my_target_crtbegin_dyna
 $(linked_module): PRIVATE_TARGET_CRTBEGIN_STATIC_O := $(my_target_crtbegin_static_o)
 $(linked_module): PRIVATE_TARGET_CRTEND_O := $(my_target_crtend_o)
 $(linked_module): PRIVATE_TARGET_OUT_INTERMEDIATE_LIBRARIES := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)
+$(linked_module): PRIVATE_POST_LINK_CMD := $(LOCAL_POST_LINK_CMD)
 
 ifeq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
-$(linked_module): PRIVATE_POST_LINK_CMD := $(LOCAL_POST_LINK_CMD)
 $(linked_module): $(my_target_crtbegin_static_o) $(all_objects) $(all_libraries) $(my_target_crtend_o)
        $(transform-o-to-static-executable)
        $(PRIVATE_POST_LINK_CMD)
 else
 $(linked_module): $(my_target_crtbegin_dynamic_o) $(all_objects) $(all_libraries) $(my_target_crtend_o)
        $(transform-o-to-executable)
+       $(PRIVATE_POST_LINK_CMD)
 endif
 
 endif  # skip_build_from_source