Commit graph

47364 commits

Author SHA1 Message Date
Treehugger Robot
210957500c Merge "Allow installing boot images outside of APEX for prebuilt." 2022-02-07 15:58:36 +00:00
Liz Kammer
2d29982265 Merge "Disable targets broken on host due to missing deps" 2022-02-07 15:16:10 +00:00
Ramji Jiyani
47cb940902 Merge "system_dlkm: Add in list of partitions to clean" 2022-02-05 02:33:11 +00:00
Treehugger Robot
56fc48c482 Merge "Remove unnecessary --warn-shared-textrel flags." 2022-02-04 23:58:41 +00:00
Ramji Jiyani
f0afc9539c system_dlkm: Add in list of partitions to clean
CI builds are doing m installclean between them;
which is not causing the system_dlkm to clean
it's build.prop and it is stuck to the first CI
build when feature landed causing ota signing
test to fail.

Local reproduction using:
m installclean && m -j96 && m dist
validate_target_files out/dist/*target_files-*.zip

Bug: 217507332
Test: Local verification, TH & Forrest
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I97f2011a61252d3cb798af0fab99221b754328ca
2022-02-04 23:12:00 +00:00
Sam Delmerico
75664acd70 Merge "add target_compatible_with stanza for host targets" 2022-02-04 19:15:04 +00:00
Stephen Hines
a66590a98d Remove unnecessary --warn-shared-textrel flags.
This flag has never done anything for ld.lld, since it has this behavior
by default (and actually can't turn it off either). It's now being
removed as a valid flag from ld.lld, so it's time for Android to drop
the unnecessary flags. See https://reviews.llvm.org/D118942.

Test: builds
Change-Id: I22c344b7a55e275c1fbd5fef25f85e97a39de5c4
2022-02-04 11:02:17 -08:00
Liz Kammer
a20b7a72ab Disable targets broken on host due to missing deps
Test: bp2build.sh
Change-Id: I8617c97954deaa985a1ff67cf4ca4d97207f6913
2022-02-04 13:08:03 -05:00
Liz Kammer
cc1a2062f0 Merge "Allowlist additional com.android.runtime blockers" 2022-02-04 14:17:32 +00:00
Chih-Hung Hsieh
9df9dd4d13 Disable gnu-designator warnings.
Bug: 217613071
Test: make
Change-Id: I51a6afdf6d4b1549d2e3b65168c3cce52d8e197d
2022-02-04 00:30:20 -08:00
Romain Jobredeaux
99a81c8dfd Merge "Use common java library attributes for android_app bp2build converter." 2022-02-03 21:09:26 +00:00
Sam Delmerico
75539d62ae add target_compatible_with stanza for host targets
Soong modules that are specific for the host platform (e.g.
java_library_host, cc_binary_host, java_genrule_host, etc.) should
not be built on the target platform (Android), so we add a
target_compatible_with attribute to skip this type of module on an
Android target build.

Bug: 215229742
Test: go test ./bp2build
Change-Id: Ifb76ef4e0dc4cb3adb6a64b5c375ce36f7973e48
2022-02-03 19:25:12 +00:00
Cole Faust
5a95bcac4a Merge "Return starlarkNodes from the functions that parse them" 2022-02-03 19:02:08 +00:00
Liz Kammer
35ca77edb6 Allowlist additional com.android.runtime blockers
To unblock mixed builds, uses a common mechanism to determine cc module
type across bp2build and mixed builds.

Test: mixed_droid.sh
Change-Id: I1f69ad0858cda549b7c95dbadd596e46df0f23b2
2022-02-03 11:17:05 -05:00
Sam Gilbert
a6c0ac6529 Merge "Disable a few metalava checks that platform fails after improvements." 2022-02-03 14:28:42 +00:00
Treehugger Robot
56d7ecd9ea Merge "Show all descriptions when failing to find one." 2022-02-03 04:26:01 +00:00
Martin Stjernholm
827ba622e4 Show all descriptions when failing to find one.
Test: m nothing
Change-Id: Idfac00a94e8e3e90112028f5c2f6949f50d45f31
2022-02-03 00:21:02 +00:00
Cole Faust
bde9ace392 Merge "Remove RBC hints from generated starlark" 2022-02-02 23:35:16 +00:00
Cole Faust
dd569aea07 Return starlarkNodes from the functions that parse them
Currently, mk2rbc is structured around having a global
"receiver" object that accepts all starlarkNodes. As soon
as they are parsed they are added to the receiver.

Returning the parsed nodes to the calling function is more
flexible, as it allows the calling function to restructure
them as necessary. This is the first step to supporting
complicated statements involving $(eval), such as
`$(foreach v,$(MY_LIST),$(eval MY_LIST_2 += $(v)))`

Test: go test
Change-Id: Ia194123cf090d2b9559a25b975ccbc5749357cc0
2022-02-02 14:59:59 -08:00
Cole Faust
7940c6a5b5 Remove RBC hints from generated starlark
The hints no longer need to be there in the generated code.

Fixes: 217269465
Test: go test
Change-Id: If2049780a874b42eb9df9351dda4f29c85482470
2022-02-02 11:53:19 -08:00
Sam Gilbert
1a0fa38342 Disable a few metalava checks that platform fails after improvements.
Change-Id: Iead8d6a26ba3c75d3612dccc5bebd82c39b5aad8
Tests: none
Bug: 217545629
Bug: 217552813
Bug: 217553717
2022-02-02 17:56:57 +00:00
Treehugger Robot
d519b331f2 Merge changes Ie5939628,Id103f70f
* changes:
  Only output annotations properties in snapshots for T+
  Allow pruning of unsupported fields in structs in maps
2022-02-02 17:43:57 +00:00
Romain Jobredeaux
e8acade177 Use common java library attributes for android_app bp2build converter.
Change-Id: I4dc7600fbe80eddc54a7fadd6418d6911af0b7f2
Test: go test ./bp2build
2022-02-02 12:18:37 -05:00
Paul Duffin
8af15e0297 Merge "Refactor build_release and test code" 2022-02-02 15:36:18 +00:00
Sam Delmerico
ca1701f518 Merge changes I09902215,I4f86780c
* changes:
  convert java_plugin with bp2build
  convert java static dependencies
2022-02-02 14:27:32 +00:00
Sam Delmerico
c06ea03c9e convert java_plugin with bp2build
Also, because java_plugin is only intended to be built for the host
platform to make additions to the javac compiler, a compatibility
requirement is added to java_plugin that ensure that it is not built
for android targets.

Bug: 215229742
Test: go test ./bp2build
Change-Id: I09902215a9f1e8b14d4de5a51328d08a7a0a4450
2022-02-01 22:59:19 +00:00
Sam Delmerico
fde9fb5c9c convert java static dependencies
This commit enables conversions of java_library_static and adds the
static_deps Soong attribute to Bazel deps for all Java libraries.
Currently, Soong handles static dependencies for Java differently, and
Bp2build may need to address that later (see b/217236083).

Bug: 215229742
Test: go test ./bp2build
Change-Id: I4f86780c634dca0a2cfb9294084b14e139cc2375
2022-02-01 22:59:04 +00:00
Cole Faust
f8a4bb6d7f Merge "Allow variable-prefixed include statements in mk2rbc" 2022-02-01 18:44:28 +00:00
Gurpreet Singh
ac0a9b00a4 Merge "Add testOnly attribute to AndroidManifest file of apex_test" 2022-02-01 14:25:16 +00:00
Gurpreet Singh
75d65f360c Add testOnly attribute to AndroidManifest file of apex_test
If the build file contains the apex_test module, add the
testOnly attribute to the application element of the
corresponding AndroidManifest file and set its value to true.
If the testOnly attribute is already present and has value
false, then do nothing.

Tests added in manifest_fixer_test.py to check if the updated
AndroidManifest file has the testOnly attribute set to true or not.

Bug: 213310150
Test: atest --host manifest_fixer_test
Test: m nothing
Test: manually checked the AndroidManifest file generated
Change-Id: I36247dbe0261c342d451a4422c314fd8fe0c2369
2022-02-01 12:03:48 +00:00
Treehugger Robot
6a21d959e5 Merge "Remove variableDefinedExpr" 2022-02-01 04:16:02 +00:00
Usta Shrestha
aab5e87431 Merge "redundant statement" 2022-02-01 02:17:46 +00:00
Yuntao Xu
844d8f52d6 Merge "Add LOCAL_GENERATED_SOURCES to androidmk" 2022-02-01 00:12:26 +00:00
Cole Faust
069aba64f6 Allow variable-prefixed include statements in mk2rbc
mk2rbc was already searching the whole android tree
for Makefiles, so allowing variable-prefixed include
statements doesn't affect performance on the file searching
front. On the generated code front, there's already a cap
of 150 potentially-included makefiles that prevents the
performance from getting too bad, and it can be lowered
if necessary.

Bug: 213508006
Test: go test
Change-Id: I3a4e81acb3d97bee08ac3dbe63052a274acf5793
2022-01-31 15:35:28 -08:00
Treehugger Robot
97cffec54e Merge changes from topic "sdk_repo_license"
* changes:
  Generate sdk_repo notice files from license metadata
  Annotate more java dependencies for licensing
  Track transitive packaged license deps of containers
2022-01-31 23:34:59 +00:00
Rob Seymour
4012047331 Merge "Fix host snapshot dependency cycle" 2022-01-31 23:26:39 +00:00
Rob Seymour
0800ef7007 Fix host snapshot dependency cycle
Test: m host-snapshot
Bug: 216351382
Change-Id: Iaa8b7e8373fab0db931cbe7a6328c2adca27d95b
2022-01-31 20:38:00 +00:00
Usta Shrestha
36a0a138ab Merge "cosmetic: 1)typos 2)parameters named for clarity" 2022-01-31 20:19:47 +00:00
Yuntao Xu
680478266b Add LOCAL_GENERATED_SOURCES to androidmk
Added the LOCAL_GENERATED_SOURCES support to the androidmk tool.

Bug: 216527541
Test: TreeHugger
Change-Id: I05b7aa4be6b50e405ec8ec15765d375a4626cc48
2022-01-31 11:54:43 -08:00
Kousik Kumar
dedd43c7b9 Merge "Support fetching config files from experiments fetcher binary" 2022-01-31 18:34:33 +00:00
Treehugger Robot
b8df4b890c Merge "Adding metalava team to OWNERS to be able to disable metalava checks that will break platform build." 2022-01-31 17:49:47 +00:00
Paul Duffin
a54016c3ba Only output annotations properties in snapshots for T+
Marks the `scopeProperties.AnnotationsZip` property as only being
supported on T builds and above.

Bug: 204763318
Test: m nothing
Change-Id: Ie59396287c08da77a6a1f15d4be202429e011e17
2022-01-31 12:28:04 +00:00
Paul Duffin
545c59273d Refactor build_release and test code
Minor restructuring of the build_release pruning code to make it easier
to add logic for handling fields of maps of structs. That includes:
1. Moving some code that is specific to clearing a selected field
   inside the associated if block.
2. Replacing an if with a switch.
3. Improving the error handling by separating the reporting of the
   container that broke from information about which field could not be
   set. That allows follow up code to provide information about the map
   key instead.

The tests were restructed by:
1. Switching from using AssertDeepEquals to compare the structs to
   comparing the output of marshalling the structs to JSON. That was
   for a couple of reasons. Firstly, because JSON will marshal (and so
   allow comparison of) the contents of pointers to structs whereas
   AssertDeepEquals will just compare the pointers themselves.
   Secondly, because JSON can pretty print the output and make it
   easier to read.
2. Using a func to create a new instance of the input structure for
   each test. That is to allow the test to modify the input structure,
   e.g. by clearing a field in a struct that is pointed to by a map.
   The test previously relied on the input structure being immutable
   and passed by value but a follow up change will change that by
   adding a map field that contains pointers to structs.

Bug: 204763318
Test: m nothing
Change-Id: I84dc99621497b7263e30466895b823eb02cb2b56
2022-01-31 12:28:04 +00:00
Paul Duffin
106a3a4bec Allow pruning of unsupported fields in structs in maps
Adds support for traversing into a field that is of type:
   map[...]*struct{...}

This is needed to allow java_sdk_library to mark scope specific
properties, e.g. public.annotations as being target build release
specific.

It was necessary to change the Scope field from:
   Scope map[*apiScope]scopeProperties
to:
   Scope map[*apiScope]*scopeProperties

That is because there is no way in go to change the field of a struct
value of a map. i.e. you cannot do the following, not even using
reflection:
   Scope[apiScopePublic].AnnotationsZip = nil

Bug: 204763318
Test: m nothing
Change-Id: Id103f70f55d4202971321ef4925cbec4b55f8136
2022-01-31 12:28:04 +00:00
Kousik Kumar
5ddefa3df4 Merge "Move env var config loading to be within the config package." 2022-01-31 04:40:50 +00:00
Kousik Kumar
84bd5bf85c Support fetching config files from experiments fetcher binary
The expfetcher binary (added in
https://critique.corp.google.com/cl/424076941), can fetch experiments
configuration from CDPush and load them into Soong as part of its
startup. If the binary exists, then we use it to fetch experiments
config and put them in the out directory so that those env variables can
be loaded by Soong during startup and inturn control whether RBE should
be enabled or not.
Design doc: go/rbe-android-dev-gradual-rollout

Test:
1. time lunch aosp_bramble-userdebug (first lunch when "out" dir doesn't
   exist) - https://paste.googleplex.com/5824218777255936 - took ~9s and
   ran with RBE enabled.
2. time lunch aosp_bramble-userdebug (when "out" dir already exists) - https://paste.googleplex.com/6485045129773056 -
   took ~3.5s and ran with RBE enabled.
3. time lunch aosp_bramble-userdebug (when
   "vendor/google/tools/soong/expfetcher" doesn't exist) - https://paste.googleplex.com/6103083353374720 - took 6.5s
   and not RBE enabled.

Bug: b/215181607
Change-Id: Ie3c085498c59929119534aa98863566eecb8e4eb
2022-01-29 16:59:04 -05:00
Romain Jobredeaux
ea64e62dab Merge "Basic bp2build converter for java_import." 2022-01-29 20:05:08 +00:00
Romain Jobredeaux
428a366703 Basic bp2build converter for java_import.
This only supports the `jars` property/attribute.

Test: b build external/error_prone:error_prone_core_jars
Bug: 215229744
Change-Id: If0d9c8c4e9c1c560d35a501c20bef9361ef45e15
2022-01-29 09:44:37 -05:00
Usta Shrestha
e6b43abd62 redundant statement
Test: m nothing
Bug: n/a
Change-Id: Ida33234b5cf6d915a2d136d8bc0aa6684bfd33c0
2022-01-29 06:37:10 +00:00
Usta Shrestha
c725f47f5d cosmetic: 1)typos 2)parameters named for clarity
Test: n/a
Bug: n/a
Change-Id: I49faa1d8dec4b729409a45e87212b271ecf9e9d1
2022-01-29 06:34:53 +00:00