Commit Graph

370 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
Alex Klyubin
47d6f225e8 Merge "aapt no longer needed for signing APKs" am: 3cfff7386f am: 2c70770e93 am: bf78cdd81e
am: 259b97da70

Change-Id: I0d6c2b4a2b6a6c56142947037f5f9755f6d8db80
2016-12-16 17:55:26 +00:00
Alex Klyubin
1b391c002d aapt no longer needed for signing APKs
signapk now auto-detects the APK's minSdkVersion, removing the need to
run aapt dump badging during APK signing.

Test: make clean && make
Change-Id: Ifc74292a9900443d053e437b50b540c8d0b33dbd
2016-12-15 16:37:21 -08:00
Colin Cross
426b132bae Merge "Revert "Revert "Check prebuilt sources during checkbuild""" am: 515f43bb6e am: e402dd8bb8 am: b90bd1c6f9
am: 4f9a361811

Change-Id: I0c24e84a5c336dd6fc2c1cd2612c70a706a897b0
2016-10-30 22:34:25 +00:00
Colin Cross
e402dd8bb8 Merge "Revert "Revert "Check prebuilt sources during checkbuild"""
am: 515f43bb6e

Change-Id: Ia749b34011e02df8ceb9d0fe0e4aba34da743cb1
2016-10-30 22:14:23 +00:00
Colin Cross
515f43bb6e Merge "Revert "Revert "Check prebuilt sources during checkbuild""" 2016-10-30 22:05:17 +00:00
Colin Cross
01e1b8ff4b Revert "Revert "Check prebuilt sources during checkbuild""
This reverts commit 409ea88c47.

Bug: 32332829
Change-Id: Ifc8a511762cb44b455cc821f5ac712c294c321c6
2016-10-27 22:10:55 +00:00
Colin Cross
2e8a2b937c Merge "Revert "Check prebuilt sources during checkbuild"" am: 526ddfb172 am: 96fdb76947 am: 8a1ccefa2b
am: c7e16765f8

Change-Id: I40843e877063b162f0b5d26014f03e1a05af346f
2016-10-26 23:47:18 +00:00
Colin Cross
96fdb76947 Merge "Revert "Check prebuilt sources during checkbuild""
am: 526ddfb172

Change-Id: I2bd28f5b35b27e2339eb2952b9e3acdd6a470773
2016-10-26 23:32:47 +00:00
Colin Cross
526ddfb172 Merge "Revert "Check prebuilt sources during checkbuild"" 2016-10-26 23:26:43 +00:00
Colin Cross
409ea88c47 Revert "Check prebuilt sources during checkbuild"
This reverts commit ec8fae6f2e.

Revert this until a few oddball branches can be fixed.

Bug: 32332829
Change-Id: Ic95fa50e36cb32a4d29bf765b1f3d8384140fb0b
2016-10-26 23:25:57 +00:00
Colin Cross
7a20f7db20 Merge "Check prebuilt sources during checkbuild" am: 0f26c64ef5 am: 84ba353fd1 am: d260bf7c03
am: 5a30f6050d

Change-Id: I2b0287ad9be39872025277cc217da58b18b9c74d
2016-10-26 19:59:19 +00:00
Colin Cross
84ba353fd1 Merge "Check prebuilt sources during checkbuild"
am: 0f26c64ef5

Change-Id: I961221a3e7cdcd00ea4dcbb1c88a36f138962113
2016-10-26 19:47:57 +00:00
Colin Cross
0f26c64ef5 Merge "Check prebuilt sources during checkbuild" 2016-10-26 19:35:32 +00:00
Dan Willemsen
eeb7ed6d9d Merge "Cleanup NATIVE_COVERAGE, PRIVATE_ARFLAGS" am: fce41130cc am: 79feb28724
am: 083a6303c0

Change-Id: Ib82f58dc8846f080157a3f54bbccfdb6833c5dc3
2016-10-22 03:11:32 +00:00
Dan Willemsen
79feb28724 Merge "Cleanup NATIVE_COVERAGE, PRIVATE_ARFLAGS"
am: fce41130cc

Change-Id: Id6a7fe68355d1e672cd00b5657b10db00445be39
2016-10-22 03:06:32 +00:00
Colin Cross
ec8fae6f2e Check prebuilt sources during checkbuild
Add prebuilt files as dependencies during checkbuild.  This will flag
prebuilt modules that have files that don't exist as errors, and also
fix building soong modules with make native, etc.

Bug: 32332829
Test: m -j checkbuild
Test: m -j host
Change-Id: Ia4e22cb640978c181de039202baf02f4fb5a94d5
2016-10-22 00:00:40 +00: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
Dan Willemsen
a5fa6ca7fa Merge "Add LOCAL_EXPORT_C_INCLUDE_DEPS" am: 1c0b5eaf83 am: b1fdb9745f am: b42e166273
am: a7d2992ba3

Change-Id: I4011f484aa2295a7cd42d161370bb4374ed91c58
2016-09-30 01:52:46 +00:00
Dan Willemsen
a7d2992ba3 Merge "Add LOCAL_EXPORT_C_INCLUDE_DEPS" am: 1c0b5eaf83 am: b1fdb9745f
am: b42e166273

Change-Id: Ib2cb95dcbb64a31f3e33e4fe90d5091914362b03
2016-09-30 01:48:29 +00:00
Dan Willemsen
ba6a164da7 Add LOCAL_EXPORT_C_INCLUDE_DEPS
This shouldn't be necessary for most makefiles, since we add
$(LOCAL_GENERATED_SOURCES) to this already included, but for prebuilts
that aren't actually prebuilts (Soong modules), we need to pass
dependencies so that the generated headers are built before being used.

Bug: 31742855
Test: Use, inspect build-*.ninja
Change-Id: I8d9f675af639d3f40780d48a016fc079a82531c2
2016-09-29 12:08:29 -07:00
Yohann Roussel
05485ef265 Fix bad JACK_PLUGIN variable am: 16243bdbec am: fa887390aa am: cbe1913c78
am: d52aacb821

Change-Id: I79d8299d4a4b81567a3f4d3b564bbb8813571bbd
2016-09-23 00:09:17 +00:00
Yohann Roussel
646f2121be Add support for Jack plugin am: 53b7fbbe78 am: be50693fc1 am: 62e67d1bff
am: cf65679d9e

Change-Id: I341b3b1708589999bba3bb3d5c49a37f5747dcd0
2016-09-23 00:09:08 +00:00
Yohann Roussel
d52aacb821 Fix bad JACK_PLUGIN variable am: 16243bdbec am: fa887390aa
am: cbe1913c78

Change-Id: I38a75ae28b9994832b5cfcfb053c67cd49ed834c
2016-09-22 22:14:47 +00:00
Yohann Roussel
cf65679d9e Add support for Jack plugin am: 53b7fbbe78 am: be50693fc1
am: 62e67d1bff

Change-Id: I7cf2db9ccd9bfe03ec1394340b2683b014e7dde5
2016-09-22 22:14:39 +00:00
Yohann Roussel
16243bdbec Fix bad JACK_PLUGIN variable
Changed to LOCAL_JACK_PLUGIN.

(cherry picked from commit 17924b136cb5bfc60d138e8c7e5c18a90b5965c3)

Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I1be4aaa502103fc308d35a5672dc4fe5900c4ebe
2016-09-21 10:54:42 +02:00
Yohann Roussel
53b7fbbe78 Add support for Jack plugin
And ensure compatibility with coverage plugin.

(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)

Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
2016-09-21 10:53:45 +02:00
Colin Cross
b6e788ff89 Merge "Replace usages of my_register_name with my_all_targets" am: 077d9d5fe7 am: e373117cac am: 1f351ad75c
am: fba6042e11

Change-Id: Id807306cce8447e7170e9c344ce07eb6e03fda52
2016-09-21 02:56:39 +00:00
Colin Cross
fba6042e11 Merge "Replace usages of my_register_name with my_all_targets" am: 077d9d5fe7 am: e373117cac
am: 1f351ad75c

Change-Id: Ie0b935e6209a941cfe992276270b5b5b3e5c4f95
2016-09-21 02:28:59 +00:00
Colin Cross
3388670e78 Replace usages of my_register_name with my_all_targets
A few module types add extra dependencies on $(my_register_name), move
them to $(my_all_targets) so that they are built for mm and mma too.

Bug: 31526036
Test: mmm framework
Change-Id: I2e594ce771451a99691739b963f4ce517e9dd595
2016-09-20 16:03:50 -07:00
Dan Willemsen
98b277b930 Merge "Fix link_type checking" am: 665cda08f0 am: 1347d959de am: 8459bbca6f
am: 83aba3a7ab

Change-Id: I0cca5c1e262c8a8d92858ed5c927e4775c2e3a6e
2016-09-20 03:29:59 +00:00
Dan Willemsen
83aba3a7ab Merge "Fix link_type checking" am: 665cda08f0 am: 1347d959de
am: 8459bbca6f

Change-Id: I22da0f1703995c4734a72901abe2dbcee62c1406
2016-09-20 01:01:38 +00:00
Dan Willemsen
121e284b46 Fix link_type checking
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.

Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.

Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.

Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
2016-09-15 14:40:39 -07:00
Ryan Campbell
af2091b217 Merge "Implement path-based enabling of code coverage." am: 1e1ecd5d07 am: 6b92bb4ebb am: 577eab3323
am: 5a63fe6856

Change-Id: I264e7ee9d8139c79fb882f40f1cb6854d2e24a8b
2016-09-14 03:05:55 +00:00
Ryan Campbell
5a63fe6856 Merge "Implement path-based enabling of code coverage." am: 1e1ecd5d07 am: 6b92bb4ebb
am: 577eab3323

Change-Id: I36a4fc67e87e8561486111263b0d6b6ed1bdefcc
2016-09-13 20:01:23 +00: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
Dan Willemsen
cfa84e90bd Merge "Identify modules ready to be converted to Soong" am: c6bada8acd am: 6596082d00 am: 52438f9fcf
am: b2bf9125f2

Change-Id: Ib249a1cdd546cf3bafed7002ac9e05080f55715d
2016-08-26 23:28:07 +00:00
Dan Willemsen
b2bf9125f2 Merge "Identify modules ready to be converted to Soong" am: c6bada8acd am: 6596082d00
am: 52438f9fcf

Change-Id: I3d2aec41ae42b05006cea2837968174edd97817a
2016-08-26 22:54:34 +00:00
Dan Willemsen
fc92fb2b9b Identify modules ready to be converted to Soong
The output will be in the `m dist` results as soong_to_convert.txt, or
can be built using:

  $ m $OUT/soong_to_convert.txt

The output is a list of modules that are probably ready to convert to
Soong:

  # Blocked on Module (potential problems)
           283 libEGL (srcs_dotarm)
           246 libicuuc (dotdot_incs dotdot_srcs)
           221 libspeexresampler
           215 libcamera_metadata
               ...
             0 zram-perf (dotdot_incs)

The number at the beginning of the line shows how many native modules
depend on that module.

All of their dependencies have been satisfied, and any potential
problems that Make can detect are listed in parenthesis after the
module:

  dotdot_srcs: LOCAL_SRC_FILES contains paths outside $(LOCAL_PATH)
  dotdot_incs: LOCAL_C_INCLUDES contains paths include '..'
  srcs_dotarm: LOCAL_SRC_FILES contains source files like <...>.c.arm
  aidl: LOCAL_SRC_FILES contains .aidl sources
  dbus: LOCAL_SRC_FILES contains .dbus-xml sources
  objc: LOCAL_SRC_FILES contains Objective-C sources
  proto: LOCAL_SRC_FILES contains .proto sources
  rs: LOCAL_SRC_FILES contains renderscript sources
  vts: LOCAL_SRC_FILES contains .vts sources

Not all problems can be discovered, but this is a starting point.

Change-Id: I45674fe93fd267d4d1fb0bc3bc9aa025e20c5ac6
2016-08-26 13:33:31 -07:00
Yohann Roussel
4253f35dbb Merge "Allow selection of prebuilts min sdk" am: 624619d4d0 am: 1d7e0f2c74 am: 51403950b3
am: 760ece009b

Change-Id: I74a694593cc3937a919346c4dc0923883c85beea
2016-08-24 10:04:44 +00:00
Yohann Roussel
760ece009b Merge "Allow selection of prebuilts min sdk" am: 624619d4d0 am: 1d7e0f2c74
am: 51403950b3

Change-Id: I59906380334fd96d70044b7d5253ea703ab08690
2016-08-24 09:54:54 +00:00
Yohann Roussel
1d7e0f2c74 Merge "Allow selection of prebuilts min sdk"
am: 624619d4d0

Change-Id: I54df2acb3003c0222b3f3d909d3f9c80dfda493d
2016-08-24 09:50:29 +00:00
Yohann Roussel
5960c54664 Allow selection of prebuilts min sdk
Bug: 30966099

Change-Id: I55128d5a321bd65b4e12b90afbf7efe8ccb35829
2016-08-22 09:54:32 +02:00
Dan Willemsen
533fb4d03c Allow prebuilt APKs to specify LOCAL_INSTALLED_MODULE_STEM am: dc1ddfcf3c am: 38fc8ea734
am: fcdfbfe030

Change-Id: Ide5f24faf4773e0700acfe209bcde7de3547d94d
2016-08-06 20:56:02 +00:00
Dan Willemsen
fcdfbfe030 Allow prebuilt APKs to specify LOCAL_INSTALLED_MODULE_STEM am: dc1ddfcf3c
am: 38fc8ea734

Change-Id: I9f97af6b8036392e1737c084b5cb5c8dfbbe2d8e
2016-08-06 20:53:01 +00:00
Dan Willemsen
dc1ddfcf3c Allow prebuilt APKs to specify LOCAL_INSTALLED_MODULE_STEM
We've got a case where two different prebuilt APKs need to have the same
apk name (but using a different LOCAL_MODULE_PATH).

Bug: 30470308
Change-Id: I5551e720d173623daa757c4c0aabc8e1a423ac38
2016-08-05 17:26:28 -07:00
Dan Albert
ea03e2cd85 Merge changes from topic \\\\'soong-sysroots\\\\' am: 65de8e446c am: 01efd46bca am: cce7b4f00a
am: dee194df54

Change-Id: I836ba1c1734f09df3645345ff7a8e9b7fdcac3a5
2016-07-28 16:20:11 +00:00
Dan Albert
dee194df54 Merge changes from topic \\\'soong-sysroots\\\' am: 65de8e446c am: 01efd46bca
am: cce7b4f00a

Change-Id: Ia5f4f59a5d53c852905a50f1a54d1ec3b9e6e2a7
2016-07-28 16:12:25 +00:00
Dan Albert
01efd46bca Merge changes from topic \'soong-sysroots\'
am: 65de8e446c

Change-Id: I8c8951364c5ddd6f99a27111acdb72097ab5db42
2016-07-28 16:06:24 +00:00
Dan Albert
4ac4231ca1 Add LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES.
This allows a module to avoid being installed to the common library
directory.

Test: Prevents copying of NDK libraries with the NDK sysroot patches.
Bug: http://b/27533932
Change-Id: I24f11d5a70595bcd524ac5bd85034c226d2de211
2016-07-28 00:06:19 -07:00