Commit graph

50567 commits

Author SHA1 Message Date
Vinh Tran
fc5b47e5d4 Merge "Fix documentation for android_app_import" 2022-04-14 16:27:18 +00:00
Sam Delmerico
cc51843e52 add unit test for bp2build allowlist
Test: go test ./android
Change-Id: I0ea1d97444cbedfd285f1fc4bd7ff246ce699dc9
2022-04-14 13:31:09 +00:00
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
Martin Stjernholm
104f041281 Skip linux_bionic by default in the build tests.
It doesn't work in the build test - it's for use in Soong-only builds.
Specifically Soong fails for dependencies on libLLVM_android, which is
disabled in those builds. To work it needs either
FORCE_BUILD_LLVM_COMPONENTS=true or
SOONG_ALLOW_MISSING_DEPENDENCIES=true to be passed to the build.

Test: build_test presubmits
Bug: 31559095
Bug: 229123823
Change-Id: I7a2b231816012de01472b478e7a98e2b0e929363
2022-04-14 13:22:54 +01: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
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
Vinh Tran
ce0781f8f5 Document AARImportProperties fields
Test: no testing necessary

Change-Id: Idff223f5c9a0b89cd5e0e2c8782c700d8fe9e9b3
2022-04-13 02:12:37 +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
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
Treehugger Robot
03f951d026 Merge "Remove implementation details from stub flags in sdk snapshot" 2022-04-12 20:21:05 +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
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
c21015a0de Merge "Add metrics to expconfigfetcher call" 2022-04-12 13:12:08 +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
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
Chris Parsons
155d768e5f Improve bazel action status mnemonics
Example output line:

```
CppCompile: [bazel-out/android_arm-fastbuild-ST-dd3fdd7bf572/bin/bionic/libc/_objs/libc_bionic_asm/
0/strcpy.o]
```

Instead of just `CppCompile`.

Fixes: 220234318
Test: `m libc` in mixed builds
Change-Id: I3e079006b1f1bb9e8db5b4f022ea993d7693aeb5
2022-04-11 19:17:52 +00:00
Alix Espino
8c81305c80 Merge "moved comment to describe Afdo bool" 2022-04-11 19:16:28 +00:00
Colin Cross
412436f7fe Don't panic if no certificates found
Getting the first certificate will panic if there are no certificates,
which can happen when AllowMissingDependencies is set and the
certificate property is a module reference to a missing module.
Only get the first certificate if the list is not nil.

Bug: 228379411
Test: TestAppMissingCertificateAllowMissingDependencies
Change-Id: I046d75dbbd4f21f4a2b6851f558e430e9879fcff
2022-04-11 11:50:34 -07:00
Colin Cross
abc0dab477 Move proguard test files to java package
The proguard test files are duplicated in apex and sysprop and will
be needed by app tests, move them to the java package.

Test: run all soong tests
Change-Id: Ie13817dcda8d98801d16a97ffceef1100c7d5380
2022-04-11 11:44:32 -07:00
Albert Martin
26ef058655 Merge "Flag to globally override apexes' min_sdk_version" 2022-04-11 12:29:09 +00:00
Treehugger Robot
b6e1614272 Merge "convert logtags in java srcs" 2022-04-08 22:37:22 +00:00
Liz Kammer
2394224da3 Remove version_selector mutator
This mutator simply set a mutated property immediately before a separate
mutator used the value in the property. Instead of a separate mutator,
condense the two into a single mutator pass.

Test: CI
Change-Id: I26c392cdb96f6182a19fbcf0cf3f88a8fc72f81c
2022-04-08 16:17:12 -04:00
Alix
40216ae88b moved comment to describe Afdo bool
Test: just added a comment, no tests performed.

Change-Id: Id921b808462600e889ee8fda532a3305821692b2
2022-04-08 18:57:30 +00:00
Albert Martin
eefabcf321 Flag to globally override apexes' min_sdk_version
Override all mainline updateable apexes' min_sdk_version
to same version to get single shared native libs on DCLA.

Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes
Bug: 212609891
Change-Id: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
Merged-In: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
2022-04-08 17:51:07 +00:00
Treehugger Robot
19da477d4d Merge "Add the handle to artifact path requirement functions" 2022-04-08 17:32:25 +00:00
Treehugger Robot
a2a7b57924 Merge changes from topic "export-vars"
* changes:
  export Java variables to Bazel
  refactor Bazel variable export
2022-04-08 17:31:23 +00:00
Sam Delmerico
24da73c032 convert logtags in java srcs
Some java_* modules contain .logtag files in their srcs, but we should
separate these out into their own targets.

Test: enabled QuickSearchBox and build
Change-Id: I595722ca59686d450ff522987a15ce283d3607e0
2022-04-08 14:43:18 +00:00
Sam Delmerico
932c01cf9e export Java variables to Bazel
Test: build/bazel/bp2build.sh
Change-Id: Ia06f9265c9f96e6add6edbd0cee925fe37b430d3
2022-04-08 14:15:43 +00:00
Paul Duffin
510a5e054d Merge "Use named options for verify_overlaps" 2022-04-08 13:50:17 +00:00
Paul Duffin
6f041b56a2 Merge "Cleanup verify_overlaps*.py" 2022-04-08 13:50:12 +00:00
Liz Kammer
bfc3bd712a Merge "Clean up allowlist contents." 2022-04-08 13:11:50 +00:00
Paul Duffin
0c12b78ae8 Use named options for verify_overlaps
Previously, verify_overlaps used positional arguments, the first was
the monolithi flags and the rest were the module flag pairs (filtered
flags file and signature patterns file). This change makes them use
named options to make the purpose of the arguments clearer on the
command line.

Bug: 194063708
Test: atest --host verify_overlaps_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: Ife0af0016eb0f91416e8330d5d98cb53c97d68a4
2022-04-08 10:56:21 +01:00
Paul Duffin
181b56cf4d Cleanup verify_overlaps*.py
Fix issues reported by pylint, Intellij Python checks and also try and
adhere to the Google Python Style Guide.

Bug: 194063708
Test: atest --host verify_overlaps_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/verify_overlaps*.py
      pyformat -s 4 --force_quote_type single -i scripts/hiddenapi/verify_overlaps*.py
Change-Id: I6273456abc3a4da4af780ae1a0473ca63521dff5
2022-04-08 10:49:24 +01:00
Yi Kong
db7e96083f Merge "Move PGO profiles to its own subdir" 2022-04-08 04:10:16 +00:00
Cole Faust
dee36f457c Merge "Revert^3 "Prevent unspecified values in soong_config_string_variable"" 2022-04-08 00:45:24 +00:00
Cole Faust
3aa9dacdde Revert^3 "Prevent unspecified values in soong_config_string_variable"
This reverts commit bd86457796.

Reason for revert: More breakages

Change-Id: I9252b62444870d3d16a84254190cefb64e0a4bf3
2022-04-08 00:42:33 +00:00
Cole Faust
f06326648b Move variable assignment handling to generation context
This allows the parsing code to be cleaner, as it
doesn't have to care about variable assignments.

Bug: 228518745
Test: go test
Change-Id: I33425c2fb51acab4901bfa82a53d337b75210f8e
2022-04-07 15:40:12 -07:00
Treehugger Robot
6747790e06 Merge "[LSC] Add LOCAL_LICENSE_KINDS to build/soong" 2022-04-07 22:25:30 +00:00
Cole Faust
4cbfa0d7d3 Merge changes from topic "colefaust_mksort"
* changes:
  Allow include $(sort $(wildcard */font.mk)) and variants
  Convert $(sort) to Starlark
2022-04-07 21:59:00 +00:00
Yuntao Xu
36a0e33bad Merge "rewrite android_app to android_test in mk2bp" 2022-04-07 17:53:28 +00:00
Bob Badour
618eee39bf [LSC] Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  provenance/tools/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I252266b48b587c4de9578a01faf076f7d9d13f5c
2022-04-07 10:36:08 -07:00