summaryrefslogtreecommitdiff
path: root/tools/extract_kernel.py
diff options
context:
space:
mode:
author Pirama Arumuga Nainar <pirama@google.com> 2019-07-02 23:49:19 -0700
committer Pirama Arumuga Nainar <pirama@google.com> 2019-07-08 15:13:31 -0700
commitb8f898ef88ab34f3a5914cd3806155c8692ff7db (patch)
tree21ce59f78f1d5af019c291c45c480c2ed244c751 /tools/extract_kernel.py
parent28142690baa94cbe91aa19183de6a0666a7498b1 (diff)
Add libprofile-extras to all link steps when NATIVE_COVERAGE is enabled.
libprofile-extras has a wrapper to getenv() that appends the effective userid (euid) of the current process to GCOV_PREFIX. This avoids conflicts and permissions issues when multiple processes try to create/access the same directories and files under /data/misc/trace. This library needs to be added and the -Wl,--wrap,getenv flag needs to be passed to all link steps. Since Android.mk does not propagate flags and libraries across dependencies, this change just adds the library and flag to all non-static-library Android.mk modules. As a consequence, *ALL* binaries created via Android.mk will have the signal handler and property watcher thread in libprofile-extras but they are no-ops in non-coverage-enabled binaries. The dependency is added early enough in core/binary.mk so that the LOCAL_SOONG_LINK_TYPE resolutions occur correctly. Test: Verify that coverage files are written to /data/misc/trace/<euid>/proc/... instead of /data/misc/trace/proc/... Change-Id: I4d5f849c15e9a278253f2148185ddf3ab2878e2f
Diffstat (limited to 'tools/extract_kernel.py')
0 files changed, 0 insertions, 0 deletions