Commit graph

19338 commits

Author SHA1 Message Date
Jaewoong Jung
4b79e98a6e Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.

Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
2020-06-01 13:44:48 -07:00
Treehugger Robot
a91b64d3ee Merge "Improved formatting of a module list in a panic message." 2020-06-01 16:20:50 +00:00
Ulyana Trafimovich
ad02d401ab Merge "Add android.test.base to class loader context for API version < 30." 2020-06-01 15:05:25 +00:00
Ulya Trafimovich
c9af538c90 Add android.test.base to class loader context for API version < 30.
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id2ece4b2a6317998e1dd177e853848cc3956f39f
2020-06-01 12:51:38 +01:00
Martin Stjernholm
a6a224586b Merge "Propagate flags necessary for a prebuilt of the Bionic linker." 2020-06-01 09:55:10 +00:00
Inseob Kim
16fdea928b Merge "Capture libeigen's header correctly" 2020-06-01 01:21:41 +00:00
Inseob Kim
04f2d6a675 Capture libeigen's header correctly
libeigen exports entire directory, but only two directories contain
actual exported headers. And some of headers have no extension. This
adds a special behaviour for external/eigen when capturing snapshot.

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

Bug: 157106227
Test: m vendor-snapshot captures libeigen's headers
Change-Id: I82f27d4c6c4d472f47d54c545328150697b8cda3
Merged-In: I82f27d4c6c4d472f47d54c545328150697b8cda3
(cherry picked from commit 67f3dbca2f)
2020-06-01 01:07:48 +00:00
Jiyong Park
0e666433cd Merge "Use Stem where output file name is expected in APEX" 2020-06-01 00:35:48 +00:00
Treehugger Robot
9980c6e111 Merge "Notice file embededd in APEX is deterministic" 2020-05-30 07:54:31 +00:00
Jiyong Park
f1493cc0f2 Use Stem where output file name is expected in APEX
Bug: 157638999
Test: m
Change-Id: I4a4892bc2941cf1301d210fc3107c02f0e7b13b7
2020-05-30 13:26:55 +09:00
Ulyana Trafimovich
7c9db5d13f Merge "Don't use obsolete "org.apache.http.legacy.impl" in class loader context." 2020-05-29 17:14:46 +00:00
Anton Hansson
ae9170cdd0 Merge "Revert "Fix missing headers of vendor snapshot"" 2020-05-29 16:18:08 +00:00
Anton Hansson
0fcdd53e10 Revert "Fix missing headers of vendor snapshot"
This reverts commit b6a586241e.

Reason for revert: b/157737963

Change-Id: Ic72e14ba2d8c3bfbc61906bf668a3e56619f04a4
2020-05-29 16:11:19 +00:00
Ulya Trafimovich
df00ddecb6 Don't use obsolete "org.apache.http.legacy.impl" in class loader context.
This library no longer exists on device and "org.apache.http.legacy"
should be used instead. The error lingered in the code for a while
because the code was not exercised at all. (The only app that sets
EnforceUsesLibraries is GoogleDialer (not in AOSP), and it specifies
"org.apache.http.legacy" explicitly as an optional used library.)

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I05fa115476315d35a8877fc42bd1c2042f72f2de
2020-05-29 15:00:30 +01:00
Ivan Lozano
a8450fd2be Merge "Fix darwin shared library and proc macro suffixes." 2020-05-29 13:44:13 +00:00
Ivan Lozano
c0ccb6b443 Fix darwin shared library and proc macro suffixes.
Darwin builds aren't using the correct suffix for shared libraries or
proc macros (.dylib). This fixes that.

Bug: 155302034
Test: "cd external/rust; mma" no longer indicates wrong extension.
Change-Id: I5093e0bcc78dbb2dd9fcf39069f326101bb8f411
2020-05-29 13:08:27 +00:00
Jiyong Park
33c7736936 Notice file embededd in APEX is deterministic
Bug: 157724521
Test: m
Change-Id: I25f6cd9dd0679af6acfc2594314d11fa53ae2151
2020-05-29 22:00:16 +09:00
Paul Duffin
e739f1ed9f Collect permitted packages from java_sdk_library instances
Switching an updatable boot jar from java_library to java_sdk_library
changed the contents of the updatable-bcp-packages.txt due to the code
requiring the module to be *Library. This change updates that to allow
it to be any module that implements the
PermittedPackagesForUpdatableBootJars interface which is *Library and
anything that embeds that like *SdkLibrary.

Bug: 155164730
Test: m droid and check the contents of system/etc/updatable-bcp-packages.txt
Change-Id: I464af74628da311734f102f77ec8158daec5b32d
2020-05-29 12:31:41 +01:00
Paul Duffin
75ab309e33 Merge "Fix prebuilt test on mac" 2020-05-29 07:31:28 +00:00
Inseob Kim
705e6e8ce9 Merge "Fix missing headers of vendor snapshot" 2020-05-29 07:24:02 +00:00
Paul Duffin
69304cf655 Fix prebuilt test on mac
Bug: 157707511
Test: m nothing
Change-Id: I350fe00040e0c8be8e4fa625798c3c7653d72037
2020-05-29 08:01:00 +01:00
Treehugger Robot
b719d60d20 Merge "Ensure package check is run for java_library in APEX" 2020-05-29 06:53:46 +00:00
Yo Chiang
cb240bc9c1 Merge "Add symlinks support for prebuilt_etc modules" 2020-05-29 06:36:19 +00:00
Kousik Kumar
c4cdba07d3 Merge "Add support for remote-execution / caching of jar/zip actions" 2020-05-29 03:31:20 +00:00
Treehugger Robot
ad43500655 Merge "java_sdk_library: Propagate shared_library to snapshot" 2020-05-29 02:06:54 +00:00
Treehugger Robot
00f5701ade Merge "apex respects stem of java_library modules" 2020-05-29 00:45:03 +00:00
Martin Stjernholm
7130fabd20 Propagate flags necessary for a prebuilt of the Bionic linker.
The flags are necessary to avoid implicit dependencies on crt libs,
libc, and the linker (recursively). The reason cc_prebuilt_binary react
to these flags is that they can affect the install rules.

Test: m nothing
Test: art/test/testrunner/run_build_test_target.py art-linux-bionic-x64
  on a master-art branch using snapshot built from runtime-module-sdk
  and runtime-module-host-exports
Bug: 152255951
Change-Id: I6b2fe92d105d1f446fffd00bd3267a416f75efb7
2020-05-28 22:58:01 +01:00
Martin Stjernholm
1b2bae1ba5 Merge "Fall back to the source module for variants that the corresponding prebuilt doesn't define." 2020-05-28 20:09:44 +00:00
Kousik Kumar
366afc5011 Add support for remote-execution / caching of jar/zip actions
Test: Ran a build with `RBE_JAR="true" RBE_JAR_EXEC_STRATEGY="remote"
RBE_ZIP="true" RBE_ZIP_EXEC_STRATEGY="remote" ... use_rbe m` and that
succeeded.

Bug: b/156765207
Change-Id: Ia17b532fbb282be414adf879914870082dd0841b
2020-05-28 11:56:48 -07:00
Kousik Kumar
8f37ec82d9 Merge "Add support for remote-execution / caching of signapk actions" 2020-05-28 18:31:31 +00:00
Liz Kammer
25aeb7d19b Merge "Only include test data in flattened apex 1 time" 2020-05-28 16:57:39 +00:00
Paul Duffin
d7eb1c2a76 java_sdk_library: Propagate shared_library to snapshot
Passes the shared_library property through to the snapshot. It does not
optimize away the default value in order to make it easier to invert
the default value in future. The current default value was only chosen
for convenience because most existing usages were already treated as
shared libraries. It would be safer if modules had to opt in to be used
as shared libraries.

Bug: 155164730
Test: m nothing
Change-Id: I33c7323f2389b44ed49cebe517ae2cce349117f1
2020-05-28 17:39:25 +01:00
Jiyong Park
a62aa23990 apex respects stem of java_library modules
apex now respects stem of java_library modules.

As a follow-up we need to suppor the same for other types of modules.

Bug: 157638999
Test: m
Change-Id: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
2020-05-28 23:48:16 +09:00
Paul Duffin
63d8febd35 Ensure package check is run for java_library in APEX
Package checks were not being run for java libraries that were in an
APEX and not on the platform. This change fixes that and updates the
script to report all failing classes to make it easier to update the
list of packages.

Test: m java
Bug: 157633658
Change-Id: I28044e08d3a40e9f3464bb2158ef6a28d57264d1
2020-05-28 15:06:35 +01:00
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
f455d1fb0a Merge "Add default_to_stubs option to java_sdk_library" 2020-05-28 11:09:31 +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
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
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
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
43527e1f31 Merge "Better handling of low memory situations" 2020-05-27 17:59:06 +00:00
Paul Duffin
b1e61be41d Merge "java_sdk_library: Create separate impl library" 2020-05-27 17:14:15 +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