Commit graph

64832 commits

Author SHA1 Message Date
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
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
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
Jason Wu
2520f5e36b Add re_analysis environment varibles fields to soong_metrics
Test: Tested by following steps
1.m nothing: field is empty
2.USE_RBE=false m nothing: field log cc_wrapper and rbe_wrapper
3.USE_RBE=false m nothing: field is empty
Bug: 281922291

Change-Id: I1bbb324752b9a2dea1ff2c9df5817559d4cec3a6
2023-06-06 16:11:39 -04:00
Sam Delmerico
e860d1429e add apex_available_name variant_version to bp2build unit tests
Bug: 285138555
Test: go test ./bp2build
Change-Id: Ide31e7f651b11857afc4570a891fb94460d8ea54
2023-06-06 15:47:30 -04:00
Sam Delmerico
3a5b57667b Merge changes I42b8c0dd,Ia2cb027e
* changes:
  add variant_version property to apexBundle
  add apex_available_name property to apexBundle
2023-06-06 19:43:14 +00:00
Jihoon Kang
c44be96f06 Allowlist process-compat-config module
process-compat-config module is required as executable tool to create
actions for platform_compat_config rule class. Thus, add
process-compat-config Soong module to be always converted to bazel
target.

Test: TH
Bug: 269202028
Change-Id: Ic60ace1a86f3a97927937ee0e2e7385fab756deb
2023-06-06 19:36:01 +00:00
Jihoon Kang
346a117921 Create bp2build converter for platform_compat_config module type
This change adds bp2build converter for platform_compat_config module
type and its corresponding test case.

Bug: 269202028
Test: bp2build unit tests
Change-Id: I17d560c8f0e725efe69e151685d003c3dcb11f2f
2023-06-06 19:35:36 +00:00
Jihoon Kang
4190764669 Merge changes from topic "android_stubs_current_refactor"
* changes:
  Cleanup android.JavaApiLibraryName references
  Redefine core and core platform API surface java_library
  Introduce product variable Build_from_text_stub
  Introduce "Exclude_static_libs" property for Java modules
2023-06-06 19:16:25 +00:00
Anton Hansson
efd18370b0 Merge "Allow Bluetooth to use privapp_allowlist" 2023-06-06 18:29:07 +00:00
Yu Liu
3b343c6c25 Merge "Allowtlist some cc_test modules." 2023-06-06 18:22:40 +00:00
MarkDacek
1716eefa67 Delete stale bazel metrics files.
Bug: 286083726
Test: b build libcore:all && m nothing && ls out/bazel_metrics.pb
Change-Id: Ic9f7a4771eca7935896f9ec0095588467ffada32
2023-06-06 18:20:13 +00:00
Yu Liu
d31098e6c2 Merge "Allow cfi enabled modules in mixed build." 2023-06-06 17:41:18 +00:00
Yu Liu
95c78ef99f Merge "Add the DCLA libs used by swcodec to the staging list" 2023-06-06 17:41:18 +00:00
Yi Kong
eb7f45ca9c Merge "afdo: Remove -fprofile-sample-accurate flag" 2023-06-06 17:18:31 +00:00
Treehugger Robot
2976fa1185 Merge "Use a less hacky way to detect if a module is Fuzzer enabled" 2023-06-06 17:13:20 +00:00
Sam Delmerico
c3df113402 update docs for apex_available_name
Bug: 285138555
Change-Id: Ib987ac7a4995e69cbdbfc77adbf8d2b835e15cc2
2023-06-06 12:14:23 -04:00