Commit graph

56532 commits

Author SHA1 Message Date
Sam Delmerico
24c5603815 refactor bp2build module allowlists into struct
To make testing easier, refactor existing module-global variables into a
struct that can be mocked.

Test: build/bazel/bp2build.go
Change-Id: I9d177677644ea743641a745b1839a3a8b29f902a
2022-04-14 13:31:05 +00:00
Yurii Zubrytskyi
98f9a3120a Merge "Hacky workaround for half-finalized builds." into tm-dev 2022-04-14 06:21:09 +00:00
Yurii Zubrytskyi
ac190b9bd9 Merge "platform/build/soong - Tiramisu is now 33" into tm-dev 2022-04-14 06:21:09 +00:00
Kelvin Zhang
4697725e81 Install .rc files for ramdisk variants
Previously, we removed .rc files from ramdisk variants because init
isn't reading them. But after generic_ramdisk is introduced, we might
re-use ramdisk variant of snapuserd in recovery, and recovery will need
those .rc fiels. So install .rc files again.

Test: th
Bug: 219841787
Bug: 228893064
Change-Id: I9e6e761f4f2b3a03693567c077c3225669398b86
2022-04-13 19:19:25 -07:00
Vinh Tran
4ae8d4ac46 Fix documentation for android_app_import
Test: N/A
Fix: 226586426
Change-Id: I588a249a85d152f37f5d1bd7157cfab120185648
2022-04-13 21:40:23 +00:00
Cole Faust
6c41b8a729 Add handle to enforce_product_packages_exist
Bug: 229132189
Test: go test
Change-Id: I76804354051f0866c8cad48c1189b36de4f73e23
2022-04-13 14:04:27 -07:00
Bob Badour
470fd6d946 Export listshare and checkshare to Soong and Make
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I1a2f2f69df22ec28e3fc016b61341717c6f2b1d2
2022-04-13 11:05:12 -07:00
Ivan Lozano
32598e01e9 Merge "rust: set ANDROID_RUST_VERSION based on prebuilts" am: 5e7455996e am: c07e7e9f3c am: eca7fc2fbc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062367

Change-Id: I8438e0502763d0b3bf5d4e6f4565e9811ad735f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 14:31:46 +00:00
Ivan Lozano
a6c6629935 Merge "rust: Don't append '.vendor' to vendor modules." am: dc46c6dcbb am: f6cd4e10dc am: 37aa3f6f50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062447

Change-Id: Idbc7c92adbff2b458d5655347b7a5155ee2de4f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 14:31:28 +00:00
Ivan Lozano
eca7fc2fbc Merge "rust: set ANDROID_RUST_VERSION based on prebuilts" am: 5e7455996e am: c07e7e9f3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062367

Change-Id: I1dd54c26549e02bcf0b5d84c613f8efd955fbd57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 14:11:18 +00:00
Ivan Lozano
37aa3f6f50 Merge "rust: Don't append '.vendor' to vendor modules." am: dc46c6dcbb am: f6cd4e10dc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062447

Change-Id: Ibbc3c6d8531f5f45d2efa6ce8b6e249deaf04dcc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 14:11:09 +00:00
Ivan Lozano
c07e7e9f3c Merge "rust: set ANDROID_RUST_VERSION based on prebuilts" am: 5e7455996e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062367

Change-Id: I3604eafdf52480cb6c4ccaea3a5d547d8e4136d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 13:46:38 +00:00
Ivan Lozano
f6cd4e10dc Merge "rust: Don't append '.vendor' to vendor modules." am: dc46c6dcbb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062447

Change-Id: Ibd9bf52d6d76f06fbb14213a083d7e31880772eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 13:46:28 +00:00
Ivan Lozano
5e7455996e Merge "rust: set ANDROID_RUST_VERSION based on prebuilts" 2022-04-13 12:56:27 +00:00
Ivan Lozano
dc46c6dcbb Merge "rust: Don't append '.vendor' to vendor modules." 2022-04-13 12:53:52 +00:00
Jeff Sharkey
50493f0797 Hacky workaround for half-finalized builds.
Metalava increments the SDK level by one when it's not "REL", so we
temporarily force the build to be "REL" while we're still in the
process of finalizing it.

This CL must be reverted as part of actually declaring "REL".

Bug: 171506470
Test: Build
(cherry picked from commit 05597c0cc4)

Change-Id: I18405cdd27769598f5e7a6a968f0dd473f936f6c
2022-04-13 12:36:52 +00:00
Colin Cross
8823526801 sbox: fix typo when comparing files am: fa8e9cc3a1 am: 898ed6d7f0 am: 146bba0781
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063167

Change-Id: Ic615a394a184840cc0563eca3d68f7728839cf2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 07:29:00 +00:00
Colin Cross
146bba0781 sbox: fix typo when comparing files am: fa8e9cc3a1 am: 898ed6d7f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063167

Change-Id: Ib03bc81b4748c53e9322c3cd499dc53e54049a5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 07:06:07 +00:00
Colin Cross
898ed6d7f0 sbox: fix typo when comparing files am: fa8e9cc3a1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063167

Change-Id: I1487c414e1b2b15cd6ecee37937392f4457c0098
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 06:42:55 +00:00
Vinh Tran
ce0781f8f5 Document AARImportProperties fields
Test: no testing necessary

Change-Id: Idff223f5c9a0b89cd5e0e2c8782c700d8fe9e9b3
2022-04-13 02:12:37 +00:00
Colin Cross
4a43ba755a symbols_map: allow unexpected EOF in ELF files am: 338df53621 am: b9f5de22b8 am: 961216b90f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2061530

Change-Id: Ib395d221098923e6c44941fe2289ac7d3918cef5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 01:28:09 +00:00
Colin Cross
961216b90f symbols_map: allow unexpected EOF in ELF files am: 338df53621 am: b9f5de22b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2061530

Change-Id: I6dd3c5cfddf00cb3539e688a0e9682fb9d3c7e42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 01:08:17 +00:00
Colin Cross
b9f5de22b8 symbols_map: allow unexpected EOF in ELF files am: 338df53621
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2061530

Change-Id: I8bed49eca885c01e8312bf1560033d4f002c45fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 00:43:55 +00:00
Colin Cross
fa8e9cc3a1 sbox: fix typo when comparing files
A typo caused one of the two files to be compared to itself if they
both had the same size.

Bug: 228496289
Test: Test_filesHaveSameContents
Change-Id: Ie44f32e3c9b8ef725f0d9933c7e701340036710a
2022-04-13 00:28:32 +00:00
Treehugger Robot
9bad6061fb Merge "Remove implementation details from stub flags in sdk snapshot" am: 03f951d026 am: bd5971349d am: 54bbc2a41e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2056470

Change-Id: Id015abe20918c741d01e6df7889ca7dc9e82f5f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 21:50:18 +00:00
Treehugger Robot
54bbc2a41e Merge "Remove implementation details from stub flags in sdk snapshot" am: 03f951d026 am: bd5971349d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2056470

Change-Id: Ibed19c2f93ed0c835743b80bc5bc84dc71e59669
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 21:27:17 +00:00
Colin Cross
338df53621 symbols_map: allow unexpected EOF in ELF files
Some of the prebuilt ELF files used for bionic heads cause an
unexpected EOF error, ignore unexpected EOF the same way we do
for EOF.

Test: not yet
Change-Id: I267d11b4d12b83ecebedc72a565e148c5e53af6d
2022-04-12 21:18:09 +00:00
Jiyong Park
bdd748835c Merge "Remove apex10000_private variants" am: 9c58a3628b am: 74810ac14d am: 81de76843f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062048

Change-Id: I35154eb0d2c5071a5ae5fe9e3b93e821dbe7ac64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 21:00:17 +00:00
Treehugger Robot
bd5971349d Merge "Remove implementation details from stub flags in sdk snapshot" am: 03f951d026
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2056470

Change-Id: I719840a326ceffb3f33d131244b32334ca6b8cf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 20:42:17 +00:00
Jiyong Park
81de76843f Merge "Remove apex10000_private variants" am: 9c58a3628b am: 74810ac14d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062048

Change-Id: I67ef6b50faeaae037b1aa697917b1108dc008fa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 20:26:21 +00:00
Treehugger Robot
03f951d026 Merge "Remove implementation details from stub flags in sdk snapshot" 2022-04-12 20:21:05 +00:00
Jiyong Park
74810ac14d Merge "Remove apex10000_private variants" am: 9c58a3628b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062048

Change-Id: I1d14281b9c06996840610724fbe3429bc7489478
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 20:02:20 +00:00
Jiyong Park
9c58a3628b Merge "Remove apex10000_private variants" 2022-04-12 19:37:57 +00:00
Ivan Lozano
f1868af5d5 rust: Don't append '.vendor' to vendor modules.
Rust vendor-only modules would have the '.vendor' subname appended to
them, which meant that 'm <vendor_module>' would not work -- instead
you would need to call 'm <vendor_module>.vendor', which leads to some
confusion.

This CL fixes the behavior by using the same SubName logic as the cc
module.

Bug: 205577906
Test: m <vendor_module> # works without .vendor suffix
Change-Id: I6ba18ce1d7281a1f8342ed6014644b48009d78e0
2022-04-12 13:42:04 -04:00
Paul Duffin
bd88c882f6 Remove implementation details from stub flags in sdk snapshot
Previously, the build applied the same filtering to remove
implementation details from the sdk snapshot's stub-flags.csv file as
it did for its all-flags.csv, i.e. removing the signatures that only
had a "blocked" flag. Unfortunately, that had no effect on the stub
flags as the implementation signatures had no flags, not a single
blocked flag. That meant that the sdk snapshot's
filtered-stub-flags.csv file contained a lot of implementation details.

This change removes signatures from stub-flags.csv that have no flags
which removes all implementation details from the sdk snapshot.

Bug: 194063708
Test: atest --host verify_overlaps_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      m art-module-sdk
      # Check contents of its filtered-stub-flags.csv file
Change-Id: I30edc77348fad118ea732e787ae8e206c8841f84
2022-04-12 17:44:15 +01:00
Ivan Lozano
2d407633ae rust: Allow rustlibs to fallback to rlibs.
Allow adding rlib-only libraries to rustlibs by having it fallback to
selecting the rlib variant if a dylib variant is requested but not
available.

Bug: 224771894
Test: m nothing
Test: New Soong test
Change-Id: I47b19ec9dbf3da90a2b090aeda04556a0400c7d1
2022-04-12 11:30:40 -04:00
Yurii Zubrytskyi
6114bd54eb platform/build/soong - Tiramisu is now 33
Bug: 225745567
Test: Build
Change-Id: I647b3e979ea9df622d86784f84f1155759e9ac0e
2022-04-12 08:23:14 -07:00
Liz Kammer
32a9d746f1 Remove former roboleaf team members, add new
Change-Id: Iaeedcbdcdd5c62645a5b621f52000a553310c249
Test: N/A
2022-04-12 14:30:01 +00:00
Ivan Lozano
6d14ed157e rust: set ANDROID_RUST_VERSION based on prebuilts
ANDROID_RUST_VERSION is always set to the default Rust version, rather
than than respecting the RUST_PREBUILTS_VERSION setting. This is not the
correct behavior, this CL resolves the issue.

Test: m nothing
Change-Id: I3f8a2fc3590b7313286278b77534bb669cc693d6
2022-04-12 10:29:43 -04:00
David Goldsmith
4248d7bc8b Merge "Add metrics to expconfigfetcher call" am: c21015a0de am: 5ade358eff am: 41e31a3bdf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2059887

Change-Id: I2d69aba508fefd7dbd0d8c97107bcd65ec556073
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 14:13:30 +00:00
David Goldsmith
41e31a3bdf Merge "Add metrics to expconfigfetcher call" am: c21015a0de am: 5ade358eff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2059887

Change-Id: I7d0f7092c46cd8851f0da5ddb540600b23aca197
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 13:58:06 +00:00
David Goldsmith
5ade358eff Merge "Add metrics to expconfigfetcher call" am: c21015a0de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2059887

Change-Id: Ifd621c6c31fb9e6aabc2b282e3c08daf68bba264
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 13:35:01 +00:00
David Goldsmith
c21015a0de Merge "Add metrics to expconfigfetcher call" 2022-04-12 13:12:08 +00:00
Alex Hong
a0012d1386 Merge "Add android.hardware.dumpstate-V1-ndk to vndkMustUseVendorVariantList" into tm-dev 2022-04-12 04:43:27 +00:00
Jiyong Park
d4a0063d3e Remove apex10000_private variants
When a library is included in two APEXes whose platform_apis settings
are different, two apex variants of the library is created: apex1000 and
apex1000_private.

This change was introduced with ag/15061306, especially by the commit
[1].

However, that part should be reverted because it actually creates
unnecessary variants. It's unnecessary because the two variants of the
library are compiled (excluding the linking) exactly the same. If a
private symbol of its dependency was actually used when compiling the
apex1000_private variant, then the other apex1000 variant wouldn't have
been built because that private symbol must have caused a linkage error.

[1] https://googleplex-android-review.git.corp.google.com/c/platform/build/soong/+/15061306/2..4/android/apex.go#b527).

Bug: 228785792
Test: m
Change-Id: Id58d3e98a51de5e628ca72ef86e9cd11b0ee8971
2022-04-12 12:23:20 +09:00
Colin Cross
6bfe9bc4fa Merge changes I046d75db,Ie13817dc am: d2aa190bdc am: f2c86c8c76 am: 1a3ea67458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2058908

Change-Id: I9ab91976903abbb4e3ec17b3d26db15447f074d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 00:58:51 +00:00
Colin Cross
1a3ea67458 Merge changes I046d75db,Ie13817dc am: d2aa190bdc am: f2c86c8c76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2058908

Change-Id: Id2e528bb65a943ea59e9b74d936d961aee6e125f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 00:08:09 +00:00
Colin Cross
f2c86c8c76 Merge changes I046d75db,Ie13817dc am: d2aa190bdc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2058908

Change-Id: Ia6f464f84187a7519c2123a7d0e01dae4544efa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 23:43:26 +00:00
Colin Cross
d2aa190bdc Merge changes I046d75db,Ie13817dc
* changes:
  Don't panic if no certificates found
  Move proguard test files to java package
2022-04-11 23:24:06 +00:00
David Goldsmith
62243a3691 Add metrics to expconfigfetcher call
Tracks the time to call the expconfigfetcher and whether it updated the
config file or not.

Test:
Ran a build with a "regular" user and verified the metrics indicated
NO_CONFIG and no config file was created.
Ran a build with an "experiment" user and verified the metrics indicated
CONFIG and a googler.json config file was created.

Bug: http://b/227186589
Change-Id: I030e9497c369459ae98c0c4f7765aef6de4c601f
2022-04-11 21:24:03 +00:00