b8f898ef88
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 |
||
---|---|---|
common | ||
core | ||
packaging | ||
target | ||
tests | ||
tools | ||
.gitignore | ||
buildspec.mk.default | ||
Changes.md | ||
CleanSpec.mk | ||
Deprecation.md | ||
envsetup.sh | ||
help.sh | ||
navbar.md | ||
OWNERS | ||
README.md | ||
tapasHelp.sh | ||
Usage.txt |
Android Make Build System
This is the Makefile-based portion of the Android Build System.
For documentation on how to run a build, see Usage.txt
For a list of behavioral changes useful for Android.mk writers see Changes.md
For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.
This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.