Commit Graph

20259 Commits

Author SHA1 Message Date
Kousik Kumar
309b1c0da3 Add support for remote-execution / caching of signapk actions
Test: "RBE_SIGNAPK=true RBE_SIGNAPK_EXEC_STRATEGY=remote ... use_rbe m" on crosshatch-userdebug and
signapk targets worked
Bug: b/156765091

Change-Id: I4b8c21320c2f38914ef39d3d8f036d885fab4e72
2020-05-28 06:14:56 -07:00
Martin Stjernholm
009a9dc4ac Fall back to the source module for variants that the corresponding
prebuilt doesn't define.

Test: m
Test: "m" on a platform tree with prebuilts/runtime in the manifest
Bug: 151303681
Change-Id: I8e10579c5daa79e82009a0c3060cde76cdf520e9
2020-05-28 13:17:21 +01:00
Treehugger Robot
03d606be88 Merge "Add default_to_stubs option to java_sdk_library" am: f455d1fb0a
Change-Id: Ie143f088fef37d3a29e230fde1de56f2e847b0f0
2020-05-28 11:29:14 +00:00
Treehugger Robot
f455d1fb0a Merge "Add default_to_stubs option to java_sdk_library" 2020-05-28 11:09:31 +00:00
Jooyung Han
92e904f5e7 Merge "pom2bp: add apex_available/min_sdk_version" am: 9a37d4a602
Change-Id: I7813865c7bfa067dbdcaecaa7bb3ba4e6ca4dbc2
2020-05-28 09:23:26 +00:00
Jooyung Han
9a37d4a602 Merge "pom2bp: add apex_available/min_sdk_version" 2020-05-28 09:09:59 +00:00
Jiyong Park
932cdfeb06 Add default_to_stubs option to java_sdk_library
Previously, when a lib that doesn't have sdk_version property set
depends on a java_sdk_library, the impl library was used for linking.
This might be too permissive because the client lib might be using empty
sdk_version because it needed some private APIs from the platform, but
not from the java_sdk_library. This actually happend for some of the CTS
tests. They don't set sdk_version, but were directly depending on
android.test.[base|runner|mock].stubs libraries. If we switch the
references to the stub libraries into the corresponding java_sdk_library
modules (e.g. aandroid.test.[base|runner|mock]), then we would be
allowing private APIs to the CTS tests, which is not good.

To solve this problem, default_to_stub property is introduced. It when set
to true prevents the impl lib from being used for linking. When a module
that doesn't have sdk_version depends on it, the widest API surface that
the java_sdk_library provides is linked instead.

Bug: 157007292
Test: m
Change-Id: Id2acc3cafb71d1e90d4fdc9c0c70a73983355e0f
2020-05-28 18:07:06 +09:00
Jiyong Park
afac912800 Remove apex_available whitelist for the ART APEX am: b51e7ea3b8
Change-Id: I705d3d8e036f008ab0d74c776299b96f7a90ba9e
2020-05-28 06:26:55 +00:00
Jiyong Park
b51e7ea3b8 Remove apex_available whitelist for the ART APEX
The marked library(ies) were available to the APEX via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 150999716
Test: m
Merged-In: I2b792657b444f0c963e1e92b7c91f6a0cfe1688c
(cherry picked from commit be6e2b6a18)
Change-Id: I2b792657b444f0c963e1e92b7c91f6a0cfe1688c
2020-05-28 04:06:41 +00:00
Inseob Kim
b6a586241e Fix missing headers of vendor snapshot
Changing of installable function has broken vendor snapshot's header
libraries. Fixing it and adding tests to prevent further breakage.

Bug: 157106227
Test: m vendor-snapshot captures header libraries
Change-Id: I8b581c1b2186ca2db85ae408e959c20bbd034db6
2020-05-28 01:10:06 +00:00
Treehugger Robot
21f6c3b54e Merge "Explain checkLinker errors a bit more." am: bd371b6533
Change-Id: I4a91ca0234afc510c84f5da1b871731c1208af92
2020-05-27 23:39:03 +00:00
Ramy Medhat
230dbb7e09 Merge "Add support for Metalava implicit dependencies for remote execution." am: f1665501e8
Change-Id: Icc535e09ca901111deded6680bf715153bd4a827
2020-05-27 23:38:46 +00:00
Treehugger Robot
bd371b6533 Merge "Explain checkLinker errors a bit more." 2020-05-27 23:30:56 +00:00
Ramy Medhat
f1665501e8 Merge "Add support for Metalava implicit dependencies for remote execution." 2020-05-27 23:23:25 +00:00
Liz Kammer
5bd365f1e5 Only include test data in flattened apex 1 time
Previously, if a data source was included in multiple APEX, it would
appear multiple times; however, this caused errors for overriding
commands for targets

Test: apex_test.go
Test: m nothing with change I54d92eca88fc04c949209d490e838d0a92ce8f87
Bug: 155820504
Change-Id: I98f04e0fd9fa3238f2bb0e5da3a86fc0797c38ba
2020-05-27 15:32:30 -07:00
Liz Kammer
c6e90cc10a Add signing lineage for runtime_resource_overlay am: 966b2f02fb
Change-Id: I0fd0be9b3181e7fa7c826a33a1d730ec30bd1b21
2020-05-27 22:30:41 +00:00
Martin Stjernholm
321bbe92b1 Explain checkLinker errors a bit more.
For an end user hitting these errors, the most likely reason is that
they have mixed up linker and crtbegin_dynamic.o from different builds
in their out tree.

Test: Build a linux_bionic executable in a tree exhibiting b/157549171.
Test: m nothing
Bug: 157549171
Change-Id: I64bee0848ed61226da6654caf3bafb51cf46d923
2020-05-27 21:31:42 +01:00
Liz Kammer
966b2f02fb Add signing lineage for runtime_resource_overlay
Add ability to specify a signing lineage file for
runtime_resource_overlay.

Test: app_test.go
Bug: 153366049
Merged-In: I68286bc0caa9daad6ef74db39f7750924f1d93dd
Change-Id: I68286bc0caa9daad6ef74db39f7750924f1d93dd
2020-05-27 12:18:27 -07:00
Treehugger Robot
a880b4bc2d Merge "Better handling of low memory situations" am: 43527e1f31
Change-Id: Ide59cdf8c696e7803b59cc45cd4415bb9401d09d
2020-05-27 18:11:13 +00:00
Treehugger Robot
43527e1f31 Merge "Better handling of low memory situations" 2020-05-27 17:59:06 +00:00
Paul Duffin
dd9bbf981f Merge "java_sdk_library: Create separate impl library" am: b1e61be41d
Change-Id: Ifa278ecb68419eba41a0a5f4a8e7593c2b6d44a7
2020-05-27 17:24:03 +00:00
Paul Duffin
b1e61be41d Merge "java_sdk_library: Create separate impl library" 2020-05-27 17:14:15 +00:00
Liz Kammer
63f3b9a501 Merge "Add test to ensure test data written for flat apex" am: 5903b669ad
Change-Id: I19dad70ba5734678bfe70f0df806ee9a24272f0b
2020-05-27 16:48:13 +00:00
Liz Kammer
21a4ee6b6a Merge "Support preprocessed prebuilt tests in androidmk" am: fd0d56af24
Change-Id: I743f218083b5515bdc7b5789e0ffdd2e6dfcaacd
2020-05-27 16:48:05 +00:00
Jaewoong Jung
13ead1de9f Merge "Make android_app_import multi targets arch module." am: 3f2845d251
Change-Id: I978592ccca49ec6bdc1d99e22333eb06164e549d
2020-05-27 16:28:33 +00:00
Liz Kammer
5903b669ad Merge "Add test to ensure test data written for flat apex" 2020-05-27 16:24:08 +00:00
Liz Kammer
fd0d56af24 Merge "Support preprocessed prebuilt tests in androidmk" 2020-05-27 16:22:54 +00:00
Jaewoong Jung
3f2845d251 Merge "Make android_app_import multi targets arch module." 2020-05-27 16:14:58 +00:00
David Srbecky
541d1002f5 Merge "Allow the user to explicitly set the java Uncompress_dex property." am: 38b2a86091
Change-Id: I6a687915d745dbeacfbf85d44b161ed6c348d34b
2020-05-27 14:10:11 +00:00
David Srbecky
38b2a86091 Merge "Allow the user to explicitly set the java Uncompress_dex property." 2020-05-27 13:45:29 +00:00
Dan Albert
e2054a9f9d Add some app modules to the allowed whitelist.
Test: treehugger
Bug: 152482542
Change-Id: Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4
Merged-In: Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4
(cherry picked from commit 6b6d387a75)
2020-05-27 14:15:57 +01:00
Paul Duffin
5df793011d java_sdk_library: Create separate impl library
Most dependencies on java_sdk_library instances (JSL) simply reference
them by name and rely on the build to pick the correct part, impl,
stubs for a specific scope, headers or implementation jars or dex jars.
Generally, the build gets that decision right. If it does not the for
most of the components of the JSL there is a way to reference them
directly. However, that is not true for the implementation library as
that is created the JSL itself.

Access to the implementation library should be avoided as it opens up
the possibility that use will be made of an API that is not tracked and
maintained which could lead to compatibility issues. However, there is
a case where use of the implementation library is required and safe.
That is when it is being used from other libraries within the same APEX
as the JSL. In that case the JSL and its dependencies will be updated
together so compatibility is not an issue.

This change adds a new <module>.impl java_library that compiles the
implementation library in the same way as the JSL itself does. This will
allow the modules that are blocked from converting to JSL because of
this limitation to progress. Initially the library is only for use
for compiling but follow up changes will switch the rest of the build
from using the implementation library created by JSL to the separate
module.

It also adds the ability to give the separate .impl library a more
restrictive visibility than the JSL further limiting misuse.

Bug: 156618935
Test: m droid, flash, atest CtsProviderTestCases - sniff test
      tested that it fixes compilation issues with mainline module
Change-Id: Ifc4799feb4ada9dec8021efc13fe6a953bf2edd3
2020-05-27 12:53:26 +01:00
Ramy Medhat
c7965cda05 Add support for Metalava implicit dependencies for remote execution.
Test: built aosp crosshatch userdebug with RBE_METALAVA=1
Change-Id: Ic64d98785e34717ef9bdad62b4885085f84f132a
2020-05-27 06:52:46 -04:00
Anton Hansson
e64809ff83 Merge "Remove conditional running of checklast during checkapi" am: 54d925e88d
Change-Id: I4fb609add51356d0efd3e36a0cf47912f56fdf77
2020-05-27 10:46:24 +00:00
Anton Hansson
54d925e88d Merge "Remove conditional running of checklast during checkapi" 2020-05-27 10:28:41 +00:00
Yo Chiang
3d64d494d2 Add symlinks support for prebuilt_etc modules
Filenames specified in the "symlinks" property are passed to
LOCAL_MODULE_SYMLINKS, and kati would install these symlinks.

For example:
```
prebuilt_etc {
  name: "foo",
  symlinks: [
    "bar",
    "baz",
  ],
}
```

Installs these files on device:
- system/etc/foo
- system/etc/bar -> foo
- system/etc/baz -> foo

Bug: 157537895
Test: Add some symlinks to a prebuilt_etc module and check artifact
Change-Id: If50844e8a212a966be931117cfdff5bf73aadf25
2020-05-27 17:56:39 +08:00
Lukács T. Berki
bb751686ae Merge "Call Delve using exec() instead of "dlv attach"." am: ad37304762
Change-Id: I453fa205399d208591e30e6e665c2d4be1220349
2020-05-27 08:49:43 +00:00
Lukács T. Berki
ad37304762 Merge "Call Delve using exec() instead of "dlv attach"." 2020-05-27 08:33:32 +00:00
Treehugger Robot
d3205312ed Merge "AIDEGen: Add path attribute to okhttp module." am: c7c7e466ac
Change-Id: I1792658947da52e6181b39cc952f1ff11be1163b
2020-05-27 07:30:01 +00:00
Treehugger Robot
c7c7e466ac Merge "AIDEGen: Add path attribute to okhttp module." 2020-05-27 07:18:19 +00:00
Dan Willemsen
570a292bab Better handling of low memory situations
Drop down to a single high-mem task when we've got <=16GB, as the system
probably isn't completely free RAM, ninja will be using a couple gigs,
along with whatever "normal" actions will be running concurrently. So
it's unlikely that we can handle two 6-8GB actions along with everything
else.

Also print warnings when we detect <=16GB total RAM, or when we're
running more parallel jobs than than we have GB RAM. These both notify
the user and suggest lowering the `-j` value if they run into problems.

Test: fake totalRAM to [0.5,8,16]GB, checking warning
Test: fake totalRAM to 17GB, `m -j4 nothing` has no warning
Test: `m -j187 nothing` on a 188GB system
Test: `m -j188 nothing` on a 188GB system
Change-Id: Ieb008e9f462d5f40fb65781d94cf116b1caf8446
2020-05-26 23:29:18 -07:00
Kousik Kumar
a858736c86 Merge "Add support for remote-execution / caching of turbine actions" am: 97d095516e
Change-Id: Ic5b941bc743ca9471393f1f8467daa9591d674d5
2020-05-27 04:01:27 +00:00
Kousik Kumar
97d095516e Merge "Add support for remote-execution / caching of turbine actions" 2020-05-27 03:41:50 +00:00
Jaewoong Jung
6abfbf7f9c Make android_app_import multi targets arch module.
I made a mistake and only fixed android_test_import in my previous
change, I5bbb2d2b733bbd6b868898285683ba5ff45be10b.

Bug: 154281342
Test: TreeHugger
Test: chromium-webview
Change-Id: I1575d9ef3f8596f1eb8db0867db09de08945d711
2020-05-26 20:10:08 -07:00
Paul Duffin
033f903c76 Switch droiddoc to use SdkHeaderJars() am: 649dadfb87
Change-Id: I759808445fe9fa92fa52181fb0098e6c6136a7c4
2020-05-26 21:49:27 +00:00
Paul Duffin
af853b758f java_sdk_library: Expose implementation within APEX am: 9b879594ed
Change-Id: Id2517fa4b099a75663b2f8599f280223aafa25f8
2020-05-26 21:49:24 +00:00
Paul Duffin
d3320c8787 java_sdk_library: Only expose impl jars when they are built am: daaa332827
Change-Id: I18f5be5e66fca6c1185b5c3f92d790a2fee8b3c2
2020-05-26 21:49:02 +00:00
Paul Duffin
649dadfb87 Switch droiddoc to use SdkHeaderJars()
Previously, droiddoc was using SdkImplementationJars() to get a JAR to
add to the classpath in order to resolve unknown references in the
source.

Given that SdkHeaderJars() returns jars created by Turbine which are
(for compilation at least) functionally identical to the implementation
jars there is no point in using the implementation jars.

Bug: 148080325
Test: m nothing
Change-Id: I2b718cc1445c04e849dcb0b1f53bba2b0bd90c95
2020-05-26 18:32:44 +01:00
Paul Duffin
9b879594ed java_sdk_library: Expose implementation within APEX
Access to the implementation JARs is restricted to avoid code from
depending on implementation details that could change from one release
to the next which could cause compatibility issues. That is not a
problem when referenced from within the APEX that contains the
java_sdk_library.

As references from within the same APEX often need to access
implementation specific details of the java_sdk_library and doing that
from within the same APEX is safe this change all references to a
java_sdk_library made within the same APEX to use the implementation
jars instead of stub jars.

Bug: 155164730
Test: m droid
Change-Id: If239059690de61683c2ad2d8a0ce2e47286a3637
2020-05-26 18:32:44 +01:00
Paul Duffin
daaa332827 java_sdk_library: Only expose impl jars when they are built
The implementation jars are not built if api_only: true. In that case
the jar paths must not be exposed implicitly as they will be nil and
they will just be ignored.

This change ensures that stubs are returned when the implementation
jars are not built.

Bug: 155164730
Test: m droid
Change-Id: Ic495982a5dcb2754916260e7d91d921a5da288ae
2020-05-26 18:32:44 +01:00