Commit graph

34938 commits

Author SHA1 Message Date
Paul Duffin
62d8c3b110 Allow platform_bootclasspath to specify contributing fragments
Adds the fragments property to the platform_bootclasspath to allow the
fragments that contribute to it to be specified.

Bug: 177892522
Test: m nothing
Change-Id: I14f83d9336f6984442c7315cc86dfdd0a0fd2d20
2021-04-08 18:53:04 +01:00
Paul Duffin
b432df9cda Add dependencies from platform_bootclasspath to contents
Adds a FinalDeps mutator to add dependencies from the
platform_bootclasspath to the configured boot jars which can be from
either the platform or any apex. It adds dependencies for every
configured boot jar, whether in ArtApexJars, BootJars or
UpdatableBootJars.

At the moment the dependencies are only used for testing purposes
but following changes will make more use of them.

Bug: 177892522
Test: m nothing
Change-Id: I981305bf45bc20539a3d36987252f490e2b885cc
2021-04-08 18:53:04 +01:00
Rupert Shuttleworth
a18b3b66cd Merge "Be more explicit about headers in cc_library_static targets." 2021-04-08 16:30:40 +00:00
Thiébaud Weksteen
a8ccbaf1e8 Merge "rust: collect file dependencies for clippy" 2021-04-08 13:31:34 +00:00
Lukács T. Berki
c0060dcfa3 Merge "Organize Soong's integration tests:" 2021-04-08 13:07:14 +00:00
Paul Duffin
b14f2f067c Merge "Separate apex extraction from the ApexSet" 2021-04-08 13:00:23 +00:00
Paul Duffin
1cec110476 Merge "Move deapexer related functionality to prebuiltCommon" 2021-04-08 11:58:55 +00:00
Lukacs T. Berki
3b730c4bc8 Organize Soong's integration tests:
- Move them into a new directory
- Split tests by theme and add a library file
- Add a shell script that runs them all

Test: Manually ran build/soong/run_integration_tests.sh .
Change-Id: I758b91d679f41aee47d15472cc02547ce89f6386
2021-04-08 13:21:13 +02:00
Rupert Shuttleworth
c58d3d214e Be more explicit about headers in cc_library_static targets.
Test: bp2build-sync.py write; bazel build //bionic/...
Change-Id: I253b55f4d3cbe76805691b32e761016950871601
2021-04-08 09:43:04 +00:00
Anton Hansson
f247ff73ae Merge "Fix bug in sdk_library string matching" 2021-04-08 09:28:41 +00:00
Thiébaud Weksteen
e54504e19c Merge "rust: Add cfgs property" 2021-04-08 08:57:22 +00:00
Bram Bonné
2b9ee14ce0 Merge "Allow Rust code in system/logging/rust" 2021-04-08 07:47:45 +00:00
Rupert Shuttleworth
64a90286c4 Merge "Support arch variations for export_system_include_dirs in cc_library_headers bp2build converter." 2021-04-08 00:54:47 +00:00
Jose "Pepe" Galmes
37ab310920 Merge changes from topic "vendor_snapshot_remove_suffix"
* changes:
  Fix arch in snapshot DepsMutator.
  Automatically set Androidmk suffix of snapshot
2021-04-07 22:29:50 +00:00
Paul Duffin
2470467d42 Separate apex extraction from the ApexSet
This follows the same pattern as is used by the prebuilt_apex in order
to make files encapsulated with a prebuilt .apex file available for use
by the rest of the build. It separates the extraction of the
appropriate apex from the zip supplied to apex_set into a separate
module type whose output is used by the apex_set and will (in a follow
up change) be used by the deapexer module too.

Bug: 181267622
Test: m droid
Change-Id: Icd13ce1f21845494e875d3e092abd4a9d2efca57
2021-04-07 20:36:28 +01:00
Paul Duffin
dfd3326b65 Move deapexer related functionality to prebuiltCommon
Refactoring in preparation for adding deapexer support to apex_set.

Bug: 181267622
Test: m droid
Change-Id: I8e7661ff4cfbe68f62e14d3bdf20d9356934e351
2021-04-07 20:35:35 +01:00
Paul Duffin
440b234081 Merge "Separate apex selection from apex.Prebuilt" 2021-04-07 19:32:27 +00:00
Paul Duffin
b60c5d4e1c Merge "Stop deapexer module type from being treated as a prebuilt" 2021-04-07 19:31:35 +00:00
Paul Duffin
846ce57a00 Merge "Make prebuilt_apex report an error if no apex file is found" 2021-04-07 19:31:06 +00:00
Jiyong Park
84894570e5 Merge "Stripped rust bin/libs are included in APEX" 2021-04-07 17:51:32 +00:00
Rupert Shuttleworth
b815168474 Support arch variations for export_system_include_dirs in cc_library_headers bp2build converter.
Test: Added unit test
Test: bp2build-sync.py write; bazel build //bionic/... works for more cc_library_static targets (in a parent CL)
Change-Id: Ib487216a4bcbc52958ff948722dae347b0d8b606
2021-04-07 16:05:44 +00:00
Paul Duffin
5bdc83c20a Merge "Update build to new location of hiddenapi config files" 2021-04-07 15:52:06 +00:00
Anton Hansson
08f476bf83 Fix bug in sdk_library string matching
- The public stubs were being matched against the string ".stubs.public"
  which was never the suffix that these stubs used
- Remove obsolete naming pattern matching

Test: m
Change-Id: I1f7bd54e4629f42e34fb3c09828d8853813ba2a7
2021-04-07 15:39:58 +01:00
Thiébaud Weksteen
94c8325261 rust: collect file dependencies for clippy
Previously, the clippy rule did not keep track of the source files for
which a modification would require the target to be rebuilt. Similarly
to the rustc rule, ensure that we capture all the dependencies via the
dep-info output.

Bug: 181298002
Test: m libkeystore2; inspect generated .clippy.d
Change-Id: Icfc7074e1fca38f7782544e6c436ffbfc6c9b4e0
2021-04-07 16:07:47 +02:00
Jiyong Park
e54f07e38a Stripped rust bin/libs are included in APEX
Previously, when a rust bin or library is selected for an APEX,
OutputFile() was used to get the file to be used. However, OutputFile()
always returns the unstripped output file even when the stripped output
file is available. As a result, APEX having a rust module was very big
due to the debugging information that exists in the unstripped file.

When a rust module is directly installed to the built-in partitions, we
use the stripped one whenever it's available. To make the same happen
when the rust module is placed in an APEX, OutputFile() is modified to
return the unstripped output if it's available.

Bug: 181751814
Test: TARGET_BUILD_APPS=com.android.virt m
The size is reduced from 180MB to 43MB

Change-Id: I6f8479e6a4794aac8bf94a84afdf65d417c75db0
2021-04-07 22:23:31 +09:00
Thiébaud Weksteen
c44e7372ed rust: Add cfgs property
Rust configuration options ("--cfg") are currently defined using the
"flags" property. Adds a specific property to be able to forward these
to the rust-analyzer configuration (rust-project.json).

Bug: 183727250
Test: m libstd
Change-Id: Ida89097814bcd1a45c02a8a79ec5a8e9e59701bd
2021-04-07 15:04:10 +02:00
Paul Duffin
4896da1444 Merge "Remove hidden API special handling of android.test.base" 2021-04-07 12:27:16 +00:00
satayev
1be2290fdd Merge "Add a converter for classpaths.proto between proto and json/text formats." 2021-04-07 12:17:25 +00:00
Jose Galmes
f9523ed579 Fix arch in snapshot DepsMutator.
Suffixes attached to snapshot modules are based on the main architecture
(e.g. "arm64" for aosp_cf_x86_64_phone-userdebug), not the architecture
of arch variants.

Bug: 184588077
Bug: 184695066
Test: Run unit tests using:
Test: source build/envsetup.sh
Test: m -j nothing
Change-Id: Id8d002d45864a6fb12d642b60011e7a9eaf29e07
2021-04-07 11:45:25 +00:00
Anton Hansson
da42a5a209 Merge "Revert^2 "Set min_sdk_version for java imports in pom2bp"" 2021-04-07 10:13:05 +00:00
Pedro Loureiro
9537d594ce Merge "Update soong for new lint version" 2021-04-07 09:30:06 +00:00
Paul Duffin
11216db1d3 Separate apex selection from apex.Prebuilt
This dedups the apex selection (which was previously being done by both
the apex.Prebuilt module type and the Deapexer module type) by
separating it out into its own module.

The apex.Prebuilt module retrieves the selected apex from its
selected_apex property which is simply initialized with
":<selector-module-name>".

The Deapexer module retrieves the selected apex it should use from its
src property which is initialized in the same way. That makes it easy
for the Deapexer module to be reused by the apex_set in a similar way.

Bug: 181267622
Test: m droid
Change-Id: I90cfb55698d35a97dcf28b95afcb1f58584bc90c
2021-04-07 10:11:10 +01:00
Paul Duffin
56dc66e2ea Stop deapexer module type from being treated as a prebuilt
Previously, the private deapexer module type was treated as a prebuilt
as that was the quickest way to implement it. However, there is no
reason why it should be as there is no corresponding source module type
which it might replace.

This change removes the prebuilt support to simplify the module type in
preparation for future work. As part of that it extracts the logic for
retrieving a single path from a PrebuiltSrcsSupplier to ensure
consistent behavior.

Bug: 181267622
Test: m droid
Change-Id: I1b2bb49601c13a3fff99a0026c235eaa70d2e612
2021-04-07 10:09:58 +01:00
Paul Duffin
c0609c603c Make prebuilt_apex report an error if no apex file is found
Previously, if an appropriate src property was not specified it would
return "" which resolves to the top level directory. This change causes
it to report an error.

Bug: 181267622
Test: m droid
Change-Id: Ia5be324a0eff18e43b352d71c6768c8767986053
2021-04-07 10:07:37 +01:00
Paul Duffin
b5933f64e4 Remove hidden API special handling of android.test.base
The android.test.base module should never be on the bootclasspath.

Bug: 184331423
Test: m droid
Change-Id: Ibb963b4ce2d915d0205fb1b5a7ca9159a5c99b3f
2021-04-07 10:06:31 +01:00
Paul Duffin
de21202bd2 Merge changes I45274836,I47268b81
* changes:
  Add PrebuiltNameFromSource
  Add IsModulePreferred
2021-04-07 09:04:18 +00:00
Inseob Kim
1b6fb87654 Automatically set Androidmk suffix of snapshot
Androidmk_suffix has been captured with "m vendor-snapshot". But the
suffix is to avoid collision with core variants, so the suffix should be
based on the existence of core variants. This change sets the suffix by
using OtherModuleDependencyVariantExists. This way we can also avoid
mutators and global states.

Bug: 179665538
Test: m nothing (soong test)
Change-Id: I35343aa2c4c07782057b82e6dd0e705a786e55fc
2021-04-07 17:24:08 +09:00
Jingwen Chen
d7d72398d5 Merge "Export OsTypeList through a function." 2021-04-07 05:38:05 +00:00
Treehugger Robot
27d220662f Merge "Make lint HTML output deterministic" 2021-04-06 23:14:10 +00:00
Ryan Prichard
3f3bb83f81 Merge "Remove libgcc toolchain libs for Android" 2021-04-06 21:43:33 +00:00
Paul Duffin
864116ce3f Add PrebuiltNameFromSource
Bug: 177892522
Test: m nothing
Change-Id: I45274836d59adbd6b2a2a848705b189398f1e766
2021-04-06 21:20:58 +01:00
Rupert Shuttleworth
b809bcf331 Merge "Fix syntax error in bazel_handler.go." 2021-04-06 20:19:11 +00:00
Paul Duffin
e1d3837645 Add IsModulePreferred
Bug: 177892522
Test: m nothing
Change-Id: I47268b81359d6fceb60e899a730b3b6034e09814
2021-04-06 21:18:34 +01:00
Anton Hansson
ebfbad2969 Revert^2 "Set min_sdk_version for java imports in pom2bp"
f99ba27101

Change-Id: Ic88670182029ace2e6dcdcae2713cb48bb0f59cd
2021-04-06 19:21:34 +00:00
Jack He
4ff6cc91c8 Merge "Revert "Set min_sdk_version for java imports in pom2bp"" 2021-04-06 18:57:57 +00:00
Jack He
f99ba27101 Revert "Set min_sdk_version for java imports in pom2bp"
Revert "Give pom2bp -default-min-sdk-version 24 param"

Revert submission 1662079-axd

Bug: 184656328
Reason for revert: Break build
Reverted Changes:
I2f4dc7585:Update androidx min_sdk_version in allowed_deps
I5cb8c736d:Give pom2bp -default-min-sdk-version 24 param
I3b029315a:Set min_sdk_version for java imports in pom2bp

Change-Id: Ic97cbd1714f6113188ad4647ce71105f9641fad7
2021-04-06 18:52:50 +00:00
Treehugger Robot
4238c5fe07 Merge "Set the usesNonSdk manifest attribute whan targeting module SDKs." 2021-04-06 18:25:12 +00:00
Christopher Parsons
b7c6a7ef36 Merge "Fix note_memtag bionic libraries in mixed builds" 2021-04-06 17:57:59 +00:00
Pedro Loureiro
70acc3dc0c Update soong for new lint version
Test: m nothing
Change-Id: Iaa9d37ef73f1fef5f2dbb8a840e774bb86c65bf7
2021-04-06 17:49:19 +00:00
Artur Satayev
ca6fe3453a Add a converter for classpaths.proto between proto and json/text formats.
The proto is used at build time to define classpath fragments to be read
and parsed at runtime by `derive_classpath` service; in order to define
and set BOOTCLASSPATH, DEX2OATCLASSPATH, and SYSTEMSERVERCLASSPATH
environ variables.

The tool is used for debugging and generation of binary protos.

Bug: 180105615
Test: m && launch_cvd with a follow up changes
Change-Id: I7e8b084e5f63e9aaad11da3221b909818e69e235
2021-04-06 18:37:13 +01:00