summaryrefslogtreecommitdiff
path: root/simpleperf/Android.mk
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-02-23 23:50:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-02-23 23:50:33 +0000
commitd9d23181768df567d166b79a89cfc0408e086509 (patch)
treed46ce900882e33843a1dfd9bed44c4f1701052a6 /simpleperf/Android.mk
parent7e5199f5dd8c3b74c4e7c5f22b2a24f4f6924bcf (diff)
parentb92bae84b27889b548214bee8d0730ef10da0c6d (diff)
downloadextras-d9d23181768df567d166b79a89cfc0408e086509.tar.gz
Merge "simpleperf: build libsimpleperf_inplace_sampler library."
Diffstat (limited to 'simpleperf/Android.mk')
-rw-r--r--simpleperf/Android.mk40
1 files changed, 39 insertions, 1 deletions
diff --git a/simpleperf/Android.mk b/simpleperf/Android.mk
index 2a39b599..f47e08be 100644
--- a/simpleperf/Android.mk
+++ b/simpleperf/Android.mk
@@ -226,7 +226,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libsimpleperf_report
LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
-LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
LOCAL_CPPFLAGS_darwin := $(simpleperf_cppflags_host_darwin)
LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
LOCAL_CPPFLAGS_windows := $(simpleperf_cppflags_host_windows)
@@ -248,6 +247,45 @@ ifdef HOST_CROSS_2ND_ARCH
$(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_libsimpleperf_report$(HOST_CROSS_2ND_ARCH_MODULE_SUFFIX).BUILT))
endif
+
+# libsimpleperf_inplace_sampler.so
+# It is the shared library linked with user's app and get samples from
+# signal handlers in each thread.
+# =========================================================
+
+libsimpleperf_inplace_sampler_static_libraries_target := \
+ $(filter-out libc,$(simpleperf_static_libraries_target)) \
+
+# libsimpleperf_inplace_sampler.so on target
+include $(CLEAR_VARS)
+LOCAL_CLANG := true
+LOCAL_MODULE := libsimpleperf_inplace_sampler
+LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
+LOCAL_SRC_FILES := inplace_sampler_lib.cpp
+LOCAL_STATIC_LIBRARIES := libsimpleperf $(libsimpleperf_inplace_sampler_static_libraries_target)
+LOCAL_MULTILIB := both
+LOCAL_CXX_STL := libc++_static
+LOCAL_LDLIBS := -Wl,--exclude-libs,ALL
+include $(LLVM_DEVICE_BUILD_MK)
+include $(BUILD_SHARED_LIBRARY)
+
+# libsimpleperf_inplace_sampler.so on host
+include $(CLEAR_VARS)
+LOCAL_CLANG := true
+LOCAL_MODULE := libsimpleperf_inplace_sampler
+LOCAL_MODULE_HOST_OS := linux
+LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
+LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
+LOCAL_SRC_FILES := inplace_sampler_lib.cpp
+LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
+LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
+LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux) -Wl,--exclude-libs,ALL
+LOCAL_MULTILIB := both
+LOCAL_CXX_STL := libc++_static
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_SHARED_LIBRARY)
+
+
# simpleperf_unit_test
# =========================================================
simpleperf_unit_test_src_files := \