Commit Graph

37912 Commits

Author SHA1 Message Date
Colin Cross
5fc69c34ef Merge "Consistently prepend arch-specific headers" am: 99f5cc002b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1734116

Change-Id: Ib2f7fa22ffc33ccf3f5acd6c86aad22e963cb518
2021-06-28 23:13:06 +00:00
Colin Cross
99f5cc002b Merge "Consistently prepend arch-specific headers" 2021-06-28 22:55:35 +00:00
Treehugger Robot
46d7b4d06f Merge changes I5823fdb5,I3e44c137 am: 26999937e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1749115

Change-Id: I835125d7cbdbbce78e67ce9929a3b392e7be45f4
2021-06-28 19:53:34 +00:00
Treehugger Robot
26999937e2 Merge changes I5823fdb5,I3e44c137
* changes:
  Tag android_app_import's apk as `android:"path"`
  genrule supports OutputFileProducer
2021-06-28 19:31:59 +00:00
Ivan Lozano
d3fe989fb5 Merge "rust: Add missing Rust allow path modules." am: 6eb16f8f87
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1749781

Change-Id: I1ba3008f771954183d50f98d6138e79e3de3c196
2021-06-28 19:24:33 +00:00
Ivan Lozano
6eb16f8f87 Merge "rust: Add missing Rust allow path modules." 2021-06-28 19:05:51 +00:00
Colin Cross
f801962f0e Merge changes I7fdc1f53,I422315f0,Ia34b80d9 am: 7061f79228
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743042

Change-Id: If88029a7dab238d560fa549efa3993acc71bb659
2021-06-28 17:24:10 +00:00
Colin Cross
7061f79228 Merge changes I7fdc1f53,I422315f0,Ia34b80d9
* changes:
  Move default crt objects into Toolchain
  Add DefaultSharedLibraries to Toolchain
  Create toolchainBionic for the various bionic-based toolchains to inherit from
2021-06-28 17:08:10 +00:00
Jooyung Han
f05ca9c0ea Tag android_app_import's apk as android:"path"
Now, android_app_import can use apk from other modules like genrule.

Bug: 192200378
Test: m com.android.compos
Change-Id: I5823fdb53b6aa20bfd9ec4dd16aafe63e65b6b68
2021-06-29 02:07:24 +09:00
Jooyung Han
8c7e3ed786 genrule supports OutputFileProducer
And when genrule generates multiple output files, tag can be used to
choose a single output file.

Bug: 192200378
Test: soong test
Change-Id: I3e44c137ad95468616ab883d3b277593cd82d1e8
2021-06-29 02:07:17 +09:00
Ivan Lozano
03a94c48da rust: Add missing Rust allow path modules.
Adds rust_benchmark and rust_fuzz to the list of Rust module types which
need to be in the allowed paths, and a comment about rust_bindgen and
rust_protobuf.

This also adds a downstream allow path list which helps prevent merge
conflicts if downstream wants to extend the list of allowed paths.

Bug: 191507775
Test: Paths are checked for the newly added module types.
Test: Paths in DownstreamRustAllowedPaths allow Rust modules.
Change-Id: Ida80c33a815d47ffdfb1f648125d71316a2a9d8a
2021-06-28 11:59:07 -04:00
Paul Duffin
f72c380726 Merge "Calculate widest stub dex jars per module" am: 634966767c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748467

Change-Id: I1323d0c33830f3ce19fa32fd4ccf46654f305d61
2021-06-28 12:07:06 +00:00
Paul Duffin
634966767c Merge "Calculate widest stub dex jars per module" 2021-06-28 11:55:07 +00:00
Paul Duffin
dc2947c21f Merge "Add test to show issues with widest stub dex jars" am: f6d3b2aef8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748466

Change-Id: Ie1acf5281abfd5bf31e06d68fa1d79ae8f878d65
2021-06-28 11:17:00 +00:00
Paul Duffin
cac5c585dc Merge "Allow hiddenapi list to ignore missing classes/members" am: 9e4a27840b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1747553

Change-Id: I139cd63e4ec08ccf6ee6e6067c1768ce67a408b4
2021-06-28 11:16:12 +00:00
Paul Duffin
f6d3b2aef8 Merge "Add test to show issues with widest stub dex jars" 2021-06-28 10:58:55 +00:00
Paul Duffin
9e4a27840b Merge "Allow hiddenapi list to ignore missing classes/members" 2021-06-28 10:58:46 +00:00
Paul Duffin
280a31aac3 Calculate widest stub dex jars per module
Previously, the stub dex jars for each HiddenAPIScope was created by
merging the stub dex jars provided by each module for that scope. Then
the widest stub dex jars were chosen. So, if module A provided public,
system and test stub dex jars and module B provided only public then
the stub dex jars for each scope would be:
* public -> A,B
* system -> A
* test -> A

So, the widest API scope for which there are stub dex jars is "test"
and so the widest stub dex jars would just come from module A and not
module B. So, when "hiddenapi list" is run for module C which depends
on modules A and B it only gets given stub dex jars for module A which
means that it cannot resolve all the types that C may use which can
lead to incorrect flags being generated.

This change does not merge the stub dex jars from each module together
and instead keeps them separate by module. The widest stub dex jars
list is constructed by asking each module in turn for their widest stub
dex jars. e.g. Given the above example we would have:

Module A:
* public
* system
* test <- widest

Module B:
* public <- widest

So, the widest stub dex jars will be A's test and B's public stub dex
jars.

Bug: 179354495
Test: m out/soong/hiddenapi-flags.csv
      - make sure that this does not change the file.
Change-Id: Ib137825ebffe94b2bf220732bae6077f7b7ac6db
2021-06-28 10:56:43 +01:00
Anton Hansson
2e764b82b8 Merge "Use trimmed lint database for mainline modules" am: 8aa7beb58d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1731410

Change-Id: I2e40d83814c3333ad5b38f9f833ee277c8b55650
2021-06-28 09:49:35 +00:00
Anton Hansson
8aa7beb58d Merge "Use trimmed lint database for mainline modules" 2021-06-28 09:36:46 +00:00
Paul Duffin
e49ae4af3f Merge "Add sdk_library_test.go to Android.bp file" am: aed46487b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748465

Change-Id: Id856fd94b237295096c3fa83574b664416104401
2021-06-28 07:37:04 +00:00
Paul Duffin
aed46487b0 Merge "Add sdk_library_test.go to Android.bp file" 2021-06-28 07:19:35 +00:00
Paul Duffin
d2b1e0ca92 Add test to show issues with widest stub dex jars
The widest stub dex jars should include the widest stub dex jars
provided by each module. So, if module A has public, system and test
and module B has only public then the widest stub dex jars should
include module A's test and module B's public stub dex jars. Instead,
they just include module A's test.

That behaviour is needed so that when the "hiddenapi list" tool is run
against a module C that it is passed stub dex jars from both module A
and module B so that any references to the types provided by those APIs
can be resolved.

A follow up change will fix this issue.

Bug: 179354495
Test: m nothing
Change-Id: Ibd31964e8d2a33fa92fbd0b800c9fe054ee359c7
2021-06-27 22:46:14 +01:00
Paul Duffin
156b5d3b61 Allow hiddenapi list to ignore missing classes/members
When generating the stub-flags.csv for a bootclasspath_fragment the
hiddenapi list tool is not given a complete set of all classes and
members. This change causes it to ignore them by passing the new
--fragment option to it.

This does not risk changing the flags as the stub-flags.csv files
created with the --fragment option are compared with the monolithic
out/soong/hiddenapi/hiddenapi-stub-flags.txt file which is not run
with this option to ensure that they match.

Bug: 179354495
Test: m out/soong/hiddenapi-stub-flags.csv
      - make sure that this does not change the file.
Change-Id: I890c7374c445759cade4d685f51e81261b7ccea2
2021-06-27 22:46:14 +01:00
Paul Duffin
9fc208ee54 Add sdk_library_test.go to Android.bp file
When this file was initially created by extracting the test from the
java_test.go file it was not added to Android.bp file so was not being
built and tested as it should. That lead to a recent change that left
it unable to compile. This change corrects both those issues.

Bug: 186723288
Bug: 179354495
Test: m nothing
Change-Id: I06f32bb572f57b6df3c772f1d9d21fe323fbf353
2021-06-27 20:42:48 +01:00
Treehugger Robot
f808be6879 Merge "Move notememtag tests to sanitize_test.go" am: 7c32e223e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743034

Change-Id: I66062269236b8b7346029a388f464fed7c44fadd
2021-06-27 13:07:08 +00:00
Treehugger Robot
7c32e223e8 Merge "Move notememtag tests to sanitize_test.go" 2021-06-27 12:53:58 +00:00
Treehugger Robot
28bbdf23f7 Merge "Fix inconsistencies in the apex names used for the apex variations." am: f46e95899b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748294

Change-Id: Ibb93b4eef47e12cbcec4b1ba3d578edf492e242a
2021-06-25 23:12:59 +00:00
Treehugger Robot
f46e95899b Merge "Fix inconsistencies in the apex names used for the apex variations." 2021-06-25 22:50:00 +00:00
Paul Duffin
9d67121fff Merge "Support hidden API processing for modules that use platform APIs" am: 99926a2a77
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744417

Change-Id: I279942b0772b17b3d6766d859e7c8ac7d2793817
2021-06-25 18:45:33 +00:00
Paul Duffin
6b923bc2c0 Merge "Verify the modular stub flags are subsets of the monolithic stub flags" am: 921d33d447
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1745334

Change-Id: I388c9697a5011a9283fc9584449fbd61c1ccfe8d
2021-06-25 18:44:29 +00:00
Paul Duffin
3a5056f429 Merge "Make ruleToGenerateHiddenAPIStubFlagsFile build rule" am: 49c91f32b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1745333

Change-Id: Ibff815e9c6575d75dfeb21054428047fac8eb1ae
2021-06-25 18:40:29 +00:00
Paul Duffin
99926a2a77 Merge "Support hidden API processing for modules that use platform APIs" 2021-06-25 18:25:39 +00:00
Paul Duffin
921d33d447 Merge "Verify the modular stub flags are subsets of the monolithic stub flags" 2021-06-25 18:23:50 +00:00
Paul Duffin
49c91f32b2 Merge "Make ruleToGenerateHiddenAPIStubFlagsFile build rule" 2021-06-25 18:23:37 +00:00
Jiyong Park
7df09fd472 Merge changes from topic "stub_from_rust" am: 56a39ad6d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1745454

Change-Id: If1825e7f91e9501485160be7488d7f163ea9e39b
2021-06-25 18:14:09 +00:00
Jiyong Park
8d63b539d0 Rust module in APEX uses stub libraries across APEX boundaries am: 7d55b61783
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1733745

Change-Id: I1cbb4b8493a136b08fad997be2209dde2005722d
2021-06-25 18:13:18 +00:00
Jiyong Park
56a39ad6d9 Merge changes from topic "stub_from_rust"
* changes:
  Add platform_apis property to APEX module type
  Rust module in APEX uses stub libraries across APEX boundaries
2021-06-25 17:52:43 +00:00
Liz Kammer
bb8d84f01b Move notememtag tests to sanitize_test.go
Test: go test soong tests
Change-Id: I177fcfd787c3aa8185f94dfcc971d9a0c56f9438
2021-06-25 13:37:18 -04:00
Yuntao Xu
6a820ff8f1 Merge "convert BUILD_CTS_SUPPORT_PACKAGE in mk files" am: a33242a061
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1745453

Change-Id: I02d262bc31638254235fd341e99f41bf2996d215
2021-06-25 16:03:28 +00:00
Yuntao Xu
a33242a061 Merge "convert BUILD_CTS_SUPPORT_PACKAGE in mk files" 2021-06-25 15:48:41 +00:00
Martin Stjernholm
bfffae7bec Fix inconsistencies in the apex names used for the apex variations.
Add an apex_name property to prebuilt APEX modules to allow specifying
the "runtime" name of the APEX, i.e. the one it gets mounted as in /apex/,
which is also the one used for the apex variations.

Introduce a callback to retrieve that name consistently for all APEX
modules (apex, override_apex, prebuilt_apex, and apex_set), and update
some apex mutator code paths to use it.

For APEX source modules (apex and override_apex), it's necessary to add
a new field in apexBundle, since the name property gets overridden for
the override variant that override_apex creates.

Test: m nothing
Bug: 191269918
Change-Id: If8612639bffdf91cbcab3387b0603bf5dffef1f5
2021-06-25 16:41:05 +01:00
Paul Duffin
5cca7c44e5 Support hidden API processing for modules that use platform APIs
Previously, hidden API processing could only be done by those
bootclasspath_fragment modules that either did not depend on any other
fragments (e.g. art-bootclasspath-fragment) or only depended on APIs
provided by other fragments (e.g. i18n-bootclasspath-fragment). That
meant that modules like com.android.os.statsd-bootclasspath-fragment
that depended on APIs provided by parts of the platform which are not
yet part of another bootclasspath_fragment could not perform hidden
API processing.

This change adds support for a bootclasspath_fragment to specify the
additional stubs needed to perform hidden API processing. It adds a new
additional_stubs property that can be used to specify the additional
stub libraries.

Most bootclasspath_fragments that need to use the property will need
access to the APIs provided by the android-non-updatable.* libraries.
Rather than have each fragment explicitly specify the correct module
for each scope it treats "android-non-updatable" as if it was a
java_sdk_library that can provide different jars for each scope.
Soong will handle mapping that to the correct android-non-updatable.*
module.

Bug: 179354495
Test: m out/soong/hiddenapi/hiddenapi-flags.csv \
        out/soong/hiddenapi/hiddenapi-index.csv \
        out/soong/hiddenapi/hiddenapi-stub-flags.txt \
        out/soong/hiddenapi/hiddenapi-unsupported.csv
      - make sure that this change does not change the contents.
      m TARGET_BUILD_APPS=Calendar nothing
Change-Id: Ia8b79830ed0e6d42100de03d76b0c51b7f6c8ade
2021-06-25 16:20:19 +01:00
Paul Duffin
2e88097152 Verify the modular stub flags are subsets of the monolithic stub flags
Bug: 179354495
Test: m out/soong/hiddenapi/hiddenapi-stub-flags.txt
      - check that an error is reported if a modular stub-flags.csv file,
        i.e. one created by a fragment is not a subset of the monolithic
        file, e.g. because a signature in the modular file has different
        flags than it does in the monolithic or is not present there.
Change-Id: I46ebb495cb093a5e3abe7571c49933c845318549
2021-06-25 14:49:10 +01:00
Paul Duffin
4539a37a61 Make ruleToGenerateHiddenAPIStubFlagsFile build rule
Previously, the func created a rule and returned it for the caller to
create with the appropriate name and description. This change passes
the name and description into the func and causes it to create the rule
itself. The func is also renamed to make it more consistent with the
other similar rules.

Bug: 179354495
Test: m nothing
Change-Id: I2a4455daa8a6090ed5568994b255848d063e1ab2
2021-06-25 14:49:07 +01:00
Paul Duffin
9579e5e4ac Merge "Add ModuleLibHiddenAPIScope for hidden API processing" am: 136fd5554d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744416

Change-Id: I7283b985a0698524d4be1fc09931b7c4b3d9bb1f
2021-06-25 11:15:07 +00:00
Paul Duffin
f4610affbc Merge "Add test for modular hiddenapi list rule" am: b8410ec07c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744415

Change-Id: I3f8839bba3e9ac72eb0a62bce496036edf5b5660
2021-06-25 11:14:57 +00:00
Paul Duffin
7f5954a225 Merge "Add HiddenAPIScope to replace use of SdkKind" am: e09a6692de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744414

Change-Id: Ief229f426fccd1d5abd5a5d2b8a4676593d46559
2021-06-25 11:14:48 +00:00
Lukács T. Berki
3f5770c5a7 Merge "Dump extra JSON data for C++ modules and ApexInfo." am: 141fbad0e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748053

Change-Id: Ic3107e1b9cbe71e9e77528827624e21dee0b5526
2021-06-25 11:13:59 +00:00
Paul Duffin
136fd5554d Merge "Add ModuleLibHiddenAPIScope for hidden API processing" 2021-06-25 11:08:31 +00:00