OSDN Git Service

am 6e587f53: Merge "Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE...
authorJean-Baptiste Queru <jbq@google.com>
Fri, 22 Jun 2012 21:31:05 +0000 (14:31 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 22 Jun 2012 21:31:05 +0000 (14:31 -0700)
* commit '6e587f53152127370c6b45204f6529dd7b0ce32a':
  Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI

1  2 
core/binary.mk
core/clear_vars.mk
core/shared_library.mk
core/static_library.mk

diff --cc core/binary.mk
Simple merge
Simple merge
@@@ -16,10 -16,19 +16,22 @@@ endi
  ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
  $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
  endif
 +ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
 +$(error $(LOCAL_PATH): Can not set module stem for a library)
 +endif
  
+ ####################################################
+ ## Add profiling libraries if aprof is turned
+ ####################################################
+ ifeq ($(strip $(LOCAL_ENABLE_APROF_JNI)),true)
+   LOCAL_ENABLE_APROF := true
+   LOCAL_WHOLE_STATIC_LIBRARIES += libaprof_jni
+ endif
+ ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+   LOCAL_SHARED_LIBRARIES += libaprof libaprof_runtime
+ endif
  # Put the built targets of all shared libraries in a common directory
  # to simplify the link line.
  OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
@@@ -14,10 -14,14 +14,17 @@@ ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),
  LOCAL_MODULE_SUFFIX := .a
  endif
  LOCAL_UNINSTALLABLE_MODULE := true
 +ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
 +$(error $(LOCAL_PATH): Can not set module stem for a library)
 +endif
  
+ ####################################################
+ ## Add profiling libraries if aprof is turned
+ ####################################################
+ ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+   LOCAL_WHOLE_STATIC_LIBRARIES += libaprof
+ endif
  include $(BUILD_SYSTEM)/binary.mk
  
  ifeq ($(LOCAL_RAW_STATIC_LIBRARY),true)