Commit graph

64846 commits

Author SHA1 Message Date
Sorin Basca
5498faf505 Merge "Revert^2 "Add exports needed for Doclava"" 2023-06-12 14:53:14 +00:00
Yu Liu
86c7300bf3 Merge "bp2build data property -> data attr in gensrcs" 2023-06-10 03:54:11 +00:00
Yu Liu
268926aaaa Merge "Add property data to gensrcs for additional inputs" 2023-06-10 03:53:52 +00:00
Treehugger Robot
01f8784246 Merge "Read BUILD files in bp2build" 2023-06-09 22:42:39 +00:00
Liz Kammer
8bd92429e5 bp2build data property -> data attr in gensrcs
Test: go test bp2build tests
Change-Id: I2192cf9846a5783385397337d40cca85a1ef73e7
2023-06-09 15:37:45 -04:00
Treehugger Robot
cbe72299ce Merge "Add feature to print output paths for module" 2023-06-09 19:34:00 +00:00
Treehugger Robot
7cb703fb99 Merge "Make genrule sandbox script a python script" 2023-06-09 19:32:11 +00:00
Liz Kammer
81fec18a5e Add property data to gensrcs for additional inputs
This enables sandboxing for inputs that are necessary but do not need to
have a source file generated.

Test: GENRULE_SANDBOXING=true m framework-javastream-protos \
      framework-cppstream-protos
Change-Id: Id5ca1dab5799c25fa96b564a7d2008c2e7b5382b
2023-06-09 15:29:32 -04:00
Cole Faust
466975575b Merge "Remove --noexperimental_platform_in_output_dir" 2023-06-09 19:25:15 +00:00
Chris Parsons
8152a94816 Read BUILD files in bp2build
The parsed BUILD files will be scanned for obvious definitions of BUILD
targets which have Android.bp counterparts. In such cases, bp2build will
automatically omit conversion of these defined modules (to prevent
collisions). With this change, we no longer need one-off denylisting of
modules which have BUILD file definitions.

This has a 0.03s to 0.2s slowdown for bp2build with current state. This
impact is identical on a heavier test branch, as well. I also ran an
experiment that applied BUILD scanning to all source BUILD files
(regardless of allowlisting), and this had a 2 second slowdown.

We may want to look into parallelizing or improving the performance of
this evaluation, but it's probably not worth the effort at this time,
since the current performance hit is small.

Test: New integration test
Test: Removed libprotobuf-python from denylist and tested building the
package
Test: Treehugger

Change-Id: Ibde3bab12cd4a8fed642ad46e5344a56953bec91
2023-06-09 16:02:40 +00:00
Liz Kammer
2fb361cfb8 Add feature to print output paths for module
Test: ./genrule_sandbox_test.py -o gen_fstab.gs201 \
    libbt_topshim_bridge_header \
    android-support-multidex-instrumentation-version
Change-Id: Ied74d727054a1bc3b447c1f10a4ee41b3fdfdf1d
2023-06-09 11:31:28 -04:00
Liz Kammer
767fad4b05 Make genrule sandbox script a python script
Unfortunately, genrules are not always available with `m`, instead we
need to know their output paths in order to build them and diff them.
Rewriting in Python lets us store module:output path maps more easily.

Test: ./genrule_sandbox_test.py gen_fstab.gs201 \
      libbt_topshim_bridge_header \
      android-support-multidex-instrumentation-version
Change-Id: If74130e5a4381cc0e1fab396ebb90dfd5a595a1c
2023-06-09 11:31:08 -04:00
Joe Onorato
175073c472 Make aconfig flags generate a library instead of a srcjar.
Also add unit tests for the rest of device_config

Bug: 283475679
Test: m nothing (soong unit tests)
Change-Id: Iee18a1f2f2cbb23e8c8d84c54e903b32be29a693
2023-06-09 06:16:06 -07:00
Sorin Basca
a7b777f800 Revert^2 "Add exports needed for Doclava"
a39209b565

Change-Id: Ib7c674e5142d2dff719d14092ac5383b6484d54c
2023-06-09 09:19:36 +00:00
Yi Kong
f1d37b3511 Merge "Refactor LTO" 2023-06-09 03:16:22 +00:00
Yi Kong
895d241013 Refactor LTO
We removed Full LTO support, now LTO is a binary choice. This allows us
to greatly simplify the LTO propagation logic.

Test: m
Test: GLBOAL_THINLTO=true m
Bug: 169004486
Change-Id: Ie4e453d7518c7069a7c755734dab1e776c16e656
2023-06-09 03:15:49 +00:00
Treehugger Robot
5950b039b3 Merge "Revert "mk2rbc: temporarily bump matching paths limit to 155. "" 2023-06-09 02:44:09 +00:00
Cole Faust
319abae1c7 Remove --noexperimental_platform_in_output_dir
This is a followup to aosp/2606989.

This flag is not necessary now that we're using one platform name
for all of mixed builds.

Also rename current_product to mixed_builds_product so that it's clear
that that this platform should only be used for mixed builds.

In addition, make the bazelrc files point to the named products again
instead of the mixed build product so that b builds will still have
qualified outputs, but mixed builds won't.

Test: Presubmit and kernel build tools abtd run
Change-Id: I7f764cf42cd1323f4b495d1320931f59a076ac63
2023-06-08 17:58:35 -07:00
Cole Faust
f1815ea326 Merge "Allowlist build_image and its dependencies" 2023-06-09 00:29:27 +00:00
Cole Faust
8ff3c63376 Revert "mk2rbc: temporarily bump matching paths limit to 155. "
This reverts commit 30d48351be.

Reason for revert: The underlying issue was fixed in ag/23603641

Change-Id: Ibe2749c3bb7412132de6d96d178f54cd8d1d0666
2023-06-08 22:53:16 +00:00
Treehugger Robot
f253d23e95 Merge changes from topic "cc_stem"
* changes:
  Remove modules from denylist
  Update runpath for jni libs
  bp2build support for stem
2023-06-08 22:38:34 +00:00
Cole Faust
17cd19c040 Allowlist build_image and its dependencies
Bug: 265127181
Test: Presubmits
Change-Id: Idd8508cd2ca549c75d918635b7eef36c8edd2ba0
2023-06-08 12:26:42 -07:00
Aditya Kumar
9d1a17d18a Merge "[RISC-V] rv64gc_zbb for Android" 2023-06-08 17:12:26 +00:00
Himanshu Rawat
4ead3a807d Merge "Revert "Add exports needed for Doclava"" 2023-06-08 16:45:02 +00:00
Treehugger Robot
087642b8d2 Merge "Reclassify OFL as notice per cl/537072410" 2023-06-08 16:33:00 +00:00
Himanshu Rawat
a39209b565 Revert "Add exports needed for Doclava"
Revert submission 2615972-b-270335653-doclava-search-imports

Reason for revert: DroidMonitor: Potential culprit for Bug 286398320 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted

Reverted changes: /q/submissionid:2615972-b-270335653-doclava-search-imports

Change-Id: Ibc3bdb301110b564e1427432a1b530e07bb840cd
2023-06-08 16:12:31 +00:00
Treehugger Robot
02761e58a0 Merge "Add exports needed for Doclava" 2023-06-08 15:35:48 +00:00
Mårten Kongstad
ab76e26ac8 Merge "Change aconfig parameter from --namespace to --package" 2023-06-08 15:12:10 +00:00
Treehugger Robot
ca69a6fc21 Merge "Revert "Remove --noexperimental_platform_in_output_dir"" 2023-06-08 12:10:14 +00:00
Matthias Männich
08ccec7c11 Revert "Remove --noexperimental_platform_in_output_dir"
This reverts commit 24af24e0f2.

Reason for revert: Breaks kernel build tools build https://ci.android.com/builds/branches/aosp_kernel-build-tools/grid?head=10282004&tail=10282004

Change-Id: I486d7f305d44cfecc51a0e039cc41c0afa6495f3
2023-06-08 08:19:14 +00:00
Treehugger Robot
731c4525ca Merge "Remove --noexperimental_platform_in_output_dir" 2023-06-08 06:08:14 +00:00
Kiyoung Kim
fb8715c36e Merge "Rename soong.environment.used with product name" 2023-06-08 05:03:09 +00:00
Treehugger Robot
923f1fd3e2 Merge changes Ia67986af,I79da6b75
* changes:
  Mixed builds support for prebuilt_* targets
  Create GetPrebuiltFileInfo to Mixed builds cquery api
2023-06-08 02:05:57 +00:00
Kiyoung Kim
eaa55a8ce1 Rename soong.environment.used with product name
From the previous work on renaming build.ninja, it was found that there
are extra dependencies from build.ninja which can be varied by
TARGET_PRODUCT : which is soong.environment.used.<tag>. This change
renames soong.environment.used to have target product between 'used' and
'<tag>' if available.

Bug: 277029044
Test: Test confirmed that build.ninja is not being re-generated
Change-Id: I987b6bd1a8b4f06dac52537e4178d8556251d254
2023-06-08 01:07:47 +00:00
Yu Liu
0cba661b05 Merge "Only allowlist cfi enabled modules for apex variant." 2023-06-08 00:37:39 +00:00
Jooyung Han
4137756d2d Merge "vendor apex: label apex_manifest as vendor_apex_metadata_file" 2023-06-07 23:59:59 +00:00
Spandan Das
756d3400d6 Mixed builds support for prebuilt_* targets
These targets do not have any build actions per se, but return a
PrebuiltFileInfo provider. Parse this info from cquery and generate the
appropriate installation rules and androidmk entries

Details
- Support the bp2build available properties. Not all properties have
  been converted by bp2build yet, and those are being tracked in b/207489266
- Create a addInstallRules helper function to reduce duplication between
  GenerateAndroidBuildActions and ProcessBazelQueryResponse

Test: unit test
Bug: 280094612
Change-Id: Ia67986af1dd2ff4712586dbec86ee9fda380f726
2023-06-07 22:08:35 +00:00
Spandan Das
bd1568178b Create GetPrebuiltFileInfo to Mixed builds cquery api
prebuilt_file Bazel targets do not have any build actions per se, but
return a PrebuiltFileInfo provider that determines installation rules.
To integrate this info into mixed builds, add a `GetPrebuiltFileInfo` method to
the API.

Bug: 280094612
Test: unit tests for prebuilt_etc in the next CL of this stack
Change-Id: I79da6b75b6a6cbd30869860d3620aeda731ea36a
2023-06-07 22:08:30 +00:00
Yu Liu
8860c6c114 Only allowlist cfi enabled modules for apex variant.
Bug: 286224058
Test: lunch aosp_bramble-userdebug && m --skip-soong-tests nothing --bazel-mode-staging
Change-Id: Ida3287ee718dc868a46b625f82c352029734a724
2023-06-07 13:22:54 -07:00
Treehugger Robot
226354ab1d Merge "add apex_available_name variant_version to bp2build unit tests" 2023-06-07 19:40:55 +00:00
Aditya Kumar
55ceae9e61 [RISC-V] rv64gc_zbb for Android
This reverts commit cc75089229.

Reason for revert: Retry

Change-Id: I957ef442a4988046eeb9771b7ce1acaf4cb6ef8d
2023-06-07 11:19:24 -07:00
Cole Faust
24af24e0f2 Remove --noexperimental_platform_in_output_dir
This is a followup to aosp/2606989.

This flag is not necessary now that we're using one platform name
for all of mixed builds.

Also rename current_product to mixed_builds_product so that it's clear
that that this platform should only be used for mixed builds.

In addition, make the bazelrc files point to the named products again
instead of the mixed build product so that b builds will still have
qualified outputs, but mixed builds won't.

Test: Presubmit
Change-Id: I5acbd18869589f67efb0ad3ebfda2c4d5a6a3850
2023-06-07 11:08:44 -07:00
Jihoon Kang
e02112615e Merge changes from topic "platform_compat_config_bp2build"
* changes:
  Allowlist process-compat-config module
  Create bp2build converter for platform_compat_config module type
2023-06-07 18:03:48 +00:00
Mårten Kongstad
9feb96d47d Change aconfig parameter from --namespace to --package
The namespace field in aconfig is now called package, and `aconfig
create-cache --namespace ...` is now called `aconfig create-cache
--package ...`. Change the call-site accordingly.

The Soong code still uses the namespace terminology. A follow-up CL will
change the code to refer to package instead.

Bug: 285000854
Test: m nothing
Change-Id: Id787f80c1fa4ab5d4bc37410d6712aadd8833fb4
2023-06-07 13:56:49 +02:00
MarkDacek
bf7a5f1c71 Add b_test to run_integration_tests.sh
Bug: 281547018
Test: run the script
Change-Id: I4cb0205ba47c6c97015146fa0782d7a30fb80bac
2023-06-07 00:52:09 +00:00
Mark Dacek
68d18d2d55 Merge "Delete stale bazel metrics files." 2023-06-07 00:51:34 +00:00
Jason Wu
e2df3b5f8f Merge "Add re_analysis environment varibles fields to soong_metrics" 2023-06-07 00:31:46 +00:00
Kousik Kumar
ac985b9c59 Merge "Revert "Remove env config fetcher code"" 2023-06-06 21:26:36 +00:00
Sam Delmerico
1ef69c75fb Merge "update docs for apex_available_name" 2023-06-06 21:16:06 +00:00
Sam Delmerico
013f6f2249 Merge changes from topics "apex_available_name-bp2build", "variant_version-bp2build"
* changes:
  add variant_version to bp2build apex converter
  add apex_available_name to bp2build apex converter
2023-06-06 21:14:24 +00:00