Commit graph

6 commits

Author SHA1 Message Date
Dan Willemsen
0f90908026 Support Soong native coverage
Soong (or any other prebuilt) can provide a .gcnodir file using
LOCAL_PREBUILT_COVERAGE_ARCHIVE. Just like today, if one isn't provided
for static libraries, an empty one will be created for Make modules to
use.

Also fixes a problem I noticed including whole static libs having
coverage into static libs. It was trying to write to /WHOLE since
PRIVATE_INTERMEDIATES_DIR was not set.

Bug: 32749731
Test: See build/soong change for soong-side tests
Test: Enabled coverage of a soong static lib, then include it in a make
static lib with LOCAL_WHOLE_STATIC_LIBRARIES and ensure that the any
shared libraries using the make static lib get the embedded coverage
information.
Change-Id: I32762f099c9757074fec922ee4822f819c9ceaf5
2017-02-10 09:27:35 -08:00
Dan Willemsen
9f95665022 Cleanup NATIVE_COVERAGE, PRIVATE_ARFLAGS
Disable the NATIVE_COVERAGE code when not in use. Provide the proper
PRIVATE_ variables so that the $DISPLAY environment variable isn't
encoded into the ninja file.

Remove PRIVATE_ARFLAGS, which is never set.

Test: compare build-aosp_flounder.ninja
Test: NATIVE_COVERAGE=true build-aosp_flounder.ninja, inspect
Change-Id: I2a52de440fd991cdc5761ff8bd58a474892d2dfc
2016-10-21 16:40:19 -07:00
Ryan Campbell
81c9d29dad Implement path-based enabling of code coverage.
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.

Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
2016-09-13 10:27:25 -07:00
Ying Wang
2fdafd2596 Delete relics left behind by commit 86e6b7ed51 .
Change-Id: I81febc28f471727fc37335b11e47749753a57997
(cherry-pick from commit 0f59fdf30d)
2016-03-04 16:28:01 -08:00
Ying Wang
6feb6d5607 Support host multilib build
This change basically ported our target multilib to the host side.
It supports 2 host build modes: x86 and x86_64 multilib build.
For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64
multilib build. Later we'll default to x86_64 build and have a flag
to force 32-bit only build, which may be needed by SDK build.

In host module definition, like in target ones, you can use the
following
LOCAL variables to set up multilib configuration:
LOCAL_MULTILIB: can be "both", "first", "32" or "64".
It also supports the same set of arch or 32-vs-64 specific LOCAL
variables.
By default, it builds only for the first arch.

To keep path compatibility, in x86_64 build files are still output to
out/host/linux-x86; Both 32-bit and 64-bit executables are in
out/host/linux-86/bin;
In x86_64 build 32-bit shared libraries are installed to
out/host/linux-x86/lib32
and 64-bit shared libraries are installed to out/host/linux-x86/lib;
32-bit object files are output to out/host/linux-x86/obj32 and 64-bit
object files
are output to out/host/linux-x86/obj.

Bug: 13751317
Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
2014-05-14 16:55:04 -07:00
Ying Wang
6ef6519170 Set up rules to build static libraries for TARGET_2ND_ARCH
The rules for the 2nd arch are set up in the second inclusion
of static_library_internal.mk.
libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/libfoo_intermediates/libfoo.a.

Bug: 11654773
Change-Id: I1d92733968fc442e9225b4df5bd1b551a81d89f7
2014-01-24 13:35:09 -08:00