Commit Graph

40694 Commits

Author SHA1 Message Date
Paul Duffin 2f71f4eee9 Merge "Update build to new location of hiddenapi config files" am: 5bdc83c20a am: 327f943a36
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664025

Change-Id: I2549952a328411d0a1c70c80a5e3d3419d3ff2b5
2021-04-07 16:37:31 +00:00
Paul Duffin 327f943a36 Merge "Update build to new location of hiddenapi config files" am: 5bdc83c20a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664025

Change-Id: I8607a6b17021d6960ba9f32a87ab081f4a1428ac
2021-04-07 16:15:01 +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
Liz Kammer f29df7cc52 Move cquery RequestType interface to bazel_handler
go idiom is to define the interface where it is used rather than where
it is defined. This makes it obvious that ParseResult is not a used part
of the interface, removing the need to return an interface{} and cast
results.

Test: go test soong tests
Test: generate & sync bp2build; mixed build libc
Change-Id: I0d8d99c1d8d0125588522cc86502286b83c91bf7
2021-04-07 10:56:22 -04: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
Paul Duffin c81171aeda Merge "Remove hidden API special handling of android.test.base" am: 4896da1444 am: bd8ceee02b am: d9749fc553
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665745

Change-Id: Ie56660598421ddee8cdf93742b52b7b861a7029a
2021-04-07 14:13:48 +00:00
satayev 58d9b45ed1 Merge "Add a converter for classpaths.proto between proto and json/text formats." am: 1be2290fdd am: 1f3260fff3 am: 384f0969fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1650410

Change-Id: I551c98ae9e15e9e6b218b553237ff46d5db208e5
2021-04-07 14:13:05 +00: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
Paul Duffin d9749fc553 Merge "Remove hidden API special handling of android.test.base" am: 4896da1444 am: bd8ceee02b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665745

Change-Id: Ica9417c42d2c597872e133410de007f7f1f33478
2021-04-07 13:25:48 +00:00
satayev 384f0969fe Merge "Add a converter for classpaths.proto between proto and json/text formats." am: 1be2290fdd am: 1f3260fff3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1650410

Change-Id: Ifc71e83411a635eed70ce20cc7379dc2bc138d84
2021-04-07 13:25:20 +00: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 bd8ceee02b Merge "Remove hidden API special handling of android.test.base" am: 4896da1444
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665745

Change-Id: Ib69ec3fbd234aa4f7663d40656277bfe9864c631
2021-04-07 12:47:52 +00:00
satayev 1f3260fff3 Merge "Add a converter for classpaths.proto between proto and json/text formats." am: 1be2290fdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1650410

Change-Id: I73ca7673223f6d8a9f81c5f1b1b1e19852dd9e9d
2021-04-07 12:43:49 +00:00
Anton Hansson 5a4da029a1 Merge "Revert^2 "Set min_sdk_version for java imports in pom2bp"" am: da42a5a209 am: ddc1eb8a6a am: ece1249dbb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666020

Change-Id: I7431b83fbbd239d0779fc30780b105d478364fb0
2021-04-07 12:27:35 +00: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 ece1249dbb Merge "Revert^2 "Set min_sdk_version for java imports in pom2bp"" am: da42a5a209 am: ddc1eb8a6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666020

Change-Id: I7ad8d56b7f11d6ec0dc2a47199e74c84d1661985
2021-04-07 11:26:13 +00:00
Pedro Loureiro d5178c7604 Merge "Update soong for new lint version" am: 9537d594ce am: 50023a5a40 am: 522dab8b8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664033

Change-Id: I6eb7937e02dc33d774d426e4ff8f0ee809dd9d08
2021-04-07 11:04:59 +00:00
Paul Duffin 79a8744fd1 Merge changes I45274836,I47268b81 am: de21202bd2 am: 6c9d9bd3b1 am: 73057c5172
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665746

Change-Id: Ia624d9bc94179df6c7c9d27901901d7764d9f7c5
2021-04-07 11:04:50 +00:00
Anton Hansson ddc1eb8a6a Merge "Revert^2 "Set min_sdk_version for java imports in pom2bp"" am: da42a5a209
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666020

Change-Id: Ia975c8efdc300e8e9129345a58c2959ba8a46a58
2021-04-07 10:39:40 +00:00
Pedro Loureiro 522dab8b8f Merge "Update soong for new lint version" am: 9537d594ce am: 50023a5a40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664033

Change-Id: I6136fe27fb141dc2816809c43a6b122c49f024ba
2021-04-07 10:18:30 +00:00
Paul Duffin 73057c5172 Merge changes I45274836,I47268b81 am: de21202bd2 am: 6c9d9bd3b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665746

Change-Id: I54195a9d8abc4fc7b835ea89f20e7e9e643ddb2c
2021-04-07 10:18:19 +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 50023a5a40 Merge "Update soong for new lint version" am: 9537d594ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664033

Change-Id: I5b23c397a18a3f5135088e484455bc47dce74b35
2021-04-07 09:37:37 +00:00
Paul Duffin 6c9d9bd3b1 Merge changes I45274836,I47268b81 am: de21202bd2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665746

Change-Id: Ibe3784edddea640cbe361222b7ae30d9b7373eb7
2021-04-07 09:35:31 +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 0e198c0638 Merge "Export OsTypeList through a function." am: d7d72398d5 am: 6ce372d743 am: e9393958ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664302

Change-Id: I8fe3bcd370446d29f7fb50a070945382e7522a67
2021-04-07 07:13:38 +00:00
Jingwen Chen e9393958ac Merge "Export OsTypeList through a function." am: d7d72398d5 am: 6ce372d743
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664302

Change-Id: Id6d5f7b638382a990139e5c58d496cb5d733a09b
2021-04-07 06:46:18 +00:00
Jingwen Chen 6ce372d743 Merge "Export OsTypeList through a function." am: d7d72398d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664302

Change-Id: I503c635420dfcfe61301d85151615e59d6020011
2021-04-07 06:00:35 +00:00
Jingwen Chen d7d72398d5 Merge "Export OsTypeList through a function." 2021-04-07 05:38:05 +00:00
Treehugger Robot 47ded52960 Merge "Make lint HTML output deterministic" am: 27d220662f am: 49f37cda8a am: a93181a2a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665060

Change-Id: I35657730102d84c178a7f1792a2070ddd3023fcb
2021-04-07 01:19:43 +00:00
Treehugger Robot a93181a2a6 Merge "Make lint HTML output deterministic" am: 27d220662f am: 49f37cda8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665060

Change-Id: I654594507b7d26e8ef357c78b149fbe3bd606233
2021-04-07 00:32:15 +00:00
Ryan Prichard a467ea4870 Merge "Remove libgcc toolchain libs for Android" am: 3f3bb83f81 am: f72c6f2e44 am: a5934e3408
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663859

Change-Id: Ia4b0f7de3bac88ab90a3ca0a6dd647117275aa7c
2021-04-07 00:15:50 +00:00
Treehugger Robot 49f37cda8a Merge "Make lint HTML output deterministic" am: 27d220662f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665060

Change-Id: I1fb8c6e93d633e57a264479f80f983d5a3dd89ce
2021-04-06 23:47:40 +00:00
Ryan Prichard a5934e3408 Merge "Remove libgcc toolchain libs for Android" am: 3f3bb83f81 am: f72c6f2e44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663859

Change-Id: I174c007d38348c30c3e55fe5bc586c953631a0df
2021-04-06 23:27:37 +00:00
Treehugger Robot 27d220662f Merge "Make lint HTML output deterministic" 2021-04-06 23:14:10 +00:00
Ryan Prichard f72c6f2e44 Merge "Remove libgcc toolchain libs for Android" am: 3f3bb83f81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663859

Change-Id: Ib146374bc8523756348c83a608266f06ec247cd2
2021-04-06 22:37:33 +00:00
Rupert Shuttleworth f710202fd2 Merge "Fix syntax error in bazel_handler.go." am: b809bcf331 am: e551169c0b am: 59d482afdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664502

Change-Id: I9419462375297cb07be444b12e0bf11058a656c5
2021-04-06 22:28:05 +00:00
Rupert Shuttleworth 59d482afdd Merge "Fix syntax error in bazel_handler.go." am: b809bcf331 am: e551169c0b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664502

Change-Id: I960b1c86f8baf518b77fe464a2263ad6e24764da
2021-04-06 21:49:09 +00:00
Ryan Prichard 3f3bb83f81 Merge "Remove libgcc toolchain libs for Android" 2021-04-06 21:43:33 +00:00
Rupert Shuttleworth e551169c0b Merge "Fix syntax error in bazel_handler.go." am: b809bcf331
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664502

Change-Id: Ia11a35537eadb021f9f00d0112e3c7f9a75c55fd
2021-04-06 21:07:34 +00:00