Commit graph

66546 commits

Author SHA1 Message Date
Trevor Radcliffe
24e0b13b9c Merge "Export no sanitize link runtime flag" into main 2023-08-03 20:54:39 +00:00
Cole Faust
95c5cf88bd Fix kernel build tools
That build doesn't set platform_sdk_version.

Bug: 269577299
Test: ./prebuilts/kernel-build-tools/build-prebuilts.sh on the kernel-build-tools branch
Change-Id: I68eb33bfb80770cef9c3a9c5e01f1ed746a2d069
2023-08-03 13:49:27 -07:00
Trevor Radcliffe
0555acc1f7 Merge "Export Minimal Runtime Flags" into main 2023-08-03 20:39:22 +00:00
Cole Faust
fc47771bdd Merge "Make bp2build-generated selects() based on product config build settings" into main 2023-08-03 20:09:30 +00:00
Vinh Tran
f5e598130e Revert^2 "Allowlist build files in rules_python"
a851ba0627

Change-Id: I4c4de3fef792eafbe3190a11668d7410e3a3cc44
2023-08-03 19:47:30 +00:00
Colin Cross
482ccfab04 Merge "Delete aapt2 generated java files after creating srcjars" into main 2023-08-03 18:57:24 +00:00
Spandan Das
a99348dca4 cc Bp2build support for genrules that generate .proto file
If `srcs` contains a gensrcs/genrule module, the current bp2build module
will put it in the catch-all `srcs` attribute. This is reserved for .cpp
sources, so if the genrule produces a .proto/.aidl/... file, this will
fail.

This handles genrules that produce .proto files. To implement this, this
creates an additional partition that detects if the other module is a
genrule/gensrc that produces .proto files. If true, it will append it to
the proto partition.

This CL does not handle
- genrule that produce .c/.aidl/.yacc/.... files. They will continue to
  be partitioned into the catch-all partition
- java modules

Test: unit tests
Test: TH
Bug: 293205700
Change-Id: Ib720fdf3a053ff5dd256e6faa632e3fa7776966d
2023-08-03 18:56:05 +00:00
Cole Faust
87c0c33a65 Make bp2build-generated selects() based on product config build settings
...instead of based on constraint settings.

Bug: 269577299
Test: m nothing and ./build/bazel/ci/bp2build.sh
Change-Id: Ib9caec79c92b8fd304e46be841de5612bd1637e3
2023-08-03 10:12:09 -07:00
Cole Faust
7997b3bb1c Merge "Make the bazel sandwich ignore targets that don't exist" into main 2023-08-03 16:52:41 +00:00
Spandan Das
fac9d8e71d Merge "Special-case go modules in convertedToBazel" into main 2023-08-03 16:45:49 +00:00
Paul Duffin
ff3fcd1f64 Merge "Revert "Make glob output include product name"" into main 2023-08-03 16:40:47 +00:00
Paul Duffin
d0e8180ea8 Revert "Make glob output include product name"
This reverts commit 03e50cb4d7.

Reason for revert: I think it broke globbing, see b/294378814

Change-Id: I7e81e8e591278bc2d6b6203b93f128351ca6a241
2023-08-03 15:50:16 +00:00
Kevin Jeon
05518b64b4 Revert "Add libdumpstateutil to vendor variant list"
Revert submission 2681060-dumpstate-isstrictrun

Reason for revert: This change has been successfully cherry-picked to udc-d1-dev, and can now be reverted in AOSP so that libdumpstateutil doesn't need a vendor variant.

Reverted changes: /q/submissionid:2681060-dumpstate-isstrictrun

Change-Id: Ia337b557c71c5a64d350f45199929440474fa278
2023-08-03 13:56:54 +00:00
Colin Cross
f3b7bada56 Don't generate aapt2 srcjars when using resource processor
When using resource processor the R.class files are generated
directly, and the R.java files generated by aapt2 are unused.  These
files can huge, reaching 500 MB for some modules and 76 GB across
all modules for a checkbuild on internal main.  They will be deleted
after zipping into srcjars after Ie5143e1e4b36ca1f4e45b001d79aca5379063517,
but we can skip generating them completely for modules where resource
processor is used.

Bug: 284023594
Bug: 294285775
Test: m checkbuild
Change-Id: If5e3fd1d25c6c7860898776ecdd392be8850c17c
2023-08-02 21:50:38 -07:00
Colin Cross
3b1e71c958 Delete aapt2 generated java files after creating srcjars
The R.java files generated by aapt2 are unused after they are zipped
into srcjars.  These files can huge, reaching 500 MB for some modules
and 76 GB across all modules for a checkbuild on internal main.
Delete the R.java files after after zipping them into srcjars.

Bug: 294285775
Test: m checkbuild
Change-Id: Ie5143e1e4b36ca1f4e45b001d79aca5379063517
2023-08-02 21:50:37 -07:00
Colin Cross
9fa43ad2e3 Downgrade newly failing lint checks
Downgrade new lint checks that are failing to warnings.

Bug: 294098365
Test: treehugger
Change-Id: If236199b22c31d95acbffaefee569c806ef0018d
2023-08-03 00:57:41 +00:00
Treehugger Robot
4d730a8f14 Merge "Make glob output include product name" into main 2023-08-03 00:47:32 +00:00
Roy Luo
2631bcd34e Merge "Revert "Reland "Enable R8 full mode by default for apps""" into main 2023-08-03 00:00:25 +00:00
Roy Luo
74a5c2ec76 Revert "Reland "Enable R8 full mode by default for apps""
This reverts commit a9f5c57b90.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/test_investigate/?invocationId=I59400010184068138&testResultId=TR41428835561759069&tab=trace, bug b/294287299

Bug:294287299
Change-Id: Id7bbe3b1a4cdc999c6a4cb9002b60c882b34f11e
2023-08-02 23:56:46 +00:00
Treehugger Robot
3ff50d5854 Merge "Limit LTO inlining even when profile is present" into main 2023-08-02 22:27:04 +00:00
Spandan Das
6485242321 Special-case go modules in convertedToBazel
This function is called in getOtherModuleLabel, and is used to mark the
otherModule as an unconvertedDep. This meant that if a soong module `A`
depends on soong_zip, it would add soong_zip as unconverted dep of `A`.
All go modules have been converted in bp2build, so this CL special
cases go_package and go_binary in this function.

Bug: 294098662
Test: printf metrics in build_conversion.go# GenerateBazelTargets, and
made sure that the string "has unconverted.*soong_zip" does not appear

Change-Id: I8d1d0876c581f9b2eb72dafcb3a28bd5577bbb4c
2023-08-02 22:11:37 +00:00
Treehugger Robot
cfe9e6d008 Merge "Reland "Enable R8 full mode by default for apps"" into main 2023-08-02 21:38:29 +00:00
Trevor Radcliffe
da64d91d2e Export no sanitize link runtime flag
Bug: 294219797
Test: Unit tests
Change-Id: Id4bbf78e9ba3893fb857b85e6b7261b11404ebf0
2023-08-02 20:24:29 +00:00
Wei Li
b82c236cbb Merge "Add integration test for verifying package verification code in SBOM." into main 2023-08-02 19:10:52 +00:00
Wei Li
8ea2ffc825 Add integration test for verifying package verification code in SBOM.
The test case calculates package verification code of package product according to the SPDX spec and compare it to the one in SBOM file which should have the same SHA1 hash value. This helps verify the python logic of generating it in SBOM files.

Bug: 293304694
Test: build/soong/tests/sbom_test.sh
Change-Id: I37c96d90a1990fbeb786f1bd4e8dc87102e0f0cd
2023-08-02 19:10:23 +00:00
Cole Faust
16d10942c5 Make the bazel sandwich ignore targets that don't exist
So that things can be allowlisted that aren't in all branches, or
that aren't present in tests.

Then remove the example partition from the soong integration tests
so that we don't need to pull all of the tools needed to build
partitions into that test.

Bug: 265127181
Fixes: 294220392
Test: ./build/soong/tests/run_integration_tests.sh and m bazel_sandwich
Change-Id: I66fb1ad1c2eee815bfb9700595a26e74e54c6214
2023-08-02 11:45:43 -07:00
Trevor Radcliffe
3876c5a143 Export Minimal Runtime Flags
Bug: 294219797
Test: Unit Tests
Change-Id: Ia6a617378ccecb01bda4951d223b6c99d6c75060
2023-08-02 15:41:50 +00:00
Matthias Männich
a5e9abe75f Merge "NDK library: remove remnants of abidw usage" into main 2023-08-02 15:18:02 +00:00
Treehugger Robot
687041c9e0 Merge "Add go modules to bp2build progress dashboard" into main 2023-08-02 12:02:19 +00:00
Treehugger Robot
eec4bb4ecd Merge changes Ideaa9908,Ie45cb7da into main
* changes:
  NDK library: extract ABI representations with STG
  NDK library: switch abi diffing to STG
2023-08-02 11:24:39 +00:00
Treehugger Robot
c9893274e0 Merge "NDK library: switch to stg ABI format" into main 2023-08-02 11:23:05 +00:00
Treehugger Robot
1ee2d0979d Merge "Allowlist jinja and deps" into main 2023-08-02 07:48:39 +00:00
Spandan Das
77ce127886 Allowlist jinja and deps
jinja is a dep of some python_test_host

Test: TH
Change-Id: I0ac2141e0ae5dd11b0f0fd1bc0ef5cdcc0c335f1
2023-08-02 04:54:12 +00:00
Treehugger Robot
d869dd8ace Merge "Remove sbom_test from soong integration test." into main 2023-08-02 04:44:53 +00:00
Treehugger Robot
c5cfe50f1f Merge "Revert^2 "Initial implementation of the bazel sandwich"" into main 2023-08-02 04:11:10 +00:00
Yike Zhang
91ad7f2e91 Merge "Convert merge_annotation_zips_test to b test" into main 2023-08-02 03:52:57 +00:00
Yu Liu
9cb66d0fc1 Allowlist some more cc_test modules after the runfiles support
Bug: 285899393
Test: local
Change-Id: I5b347bb30bbf22f7d31374a1c7bfcf98270436d0
2023-08-01 20:32:30 -07:00
Yu Liu
7cd9280bc1 Merge "Remove the MixedBuildsDisabledList that is not used anywhere." into main 2023-08-02 03:25:55 +00:00
Jeongik Cha
03e50cb4d7 Make glob output include product name
glob pattern could vary, depending on device configuration, but it uses
the same glob output path for now. It makes unnecessary soong
reevaluation due to the previous result is always overwritten whenever
the target is changed.

So make it product specific to avoid this.

Bug: 294058160
Test: lunch a && m nothing && lunch b && m nothing && lunch a && m
nothing and then check if there is no glob work. (a and b has different
glob pattern due to RRO configuration or something)

Change-Id: I7b6b7a326de681b046a55dbdb34d812cace510e6
2023-08-02 11:00:01 +09:00
Treehugger Robot
da798aa8fc Merge "Add some dirs to bp2build allowlist" into main 2023-08-02 01:56:17 +00:00
Wei Li
9d1ff41f3d Remove sbom_test from soong integration test.
Bug: 294129889
Test: CIs
Change-Id: Ic2925b214bd1e9299b7fa39f7ad0540bca282b53
2023-08-01 16:40:15 -07:00
Spandan Das
390a6d69a0 Add some dirs to bp2build allowlist
This dir contains some modules which are transitive deps of some modules
in internal

Bug: 292281173
Test: TH
Change-Id: I8901d8a763697a8212eff0d14906d4151e01faed
2023-08-01 22:57:39 +00:00
Spandan Das
41f1eeef91 Add go modules to bp2build progress dashboard
Since these modules have been converted, we should tag them as converted
in the dashboard.

Test: Put a print statement for `metrics` and made sure that the go
modules appear there
Bug: 294098662

Change-Id: I6282100111030a94f15f330916eaf41fcfc16e1a
2023-08-01 22:28:16 +00:00
Zhi Dou
2666c93fc1 Merge "Compare generated cache file with existing cache file" into main 2023-08-01 21:35:08 +00:00
Cole Faust
d9ece02182 Merge "Unique modules in BazelLabelForModuleDepsWithFn" into main 2023-08-01 20:50:44 +00:00
Colin Cross
0a10dfd6dc Merge "Fix missing rust dependencies when ALLOW_MISSING_DEPENDENCIES=true" into main 2023-08-01 20:07:53 +00:00
yike
1aaeea39da Convert merge_annotation_zips_test to b test
Test: b test //frameworks/base/api:merge_annotation_zips_test
Bug: 293225210
Change-Id: Ia53b4168894b5c70c843ca315d963fa905ef582f
2023-08-01 18:57:59 +00:00
Yi Kong
d6ab48c660 Limit LTO inlining even when profile is present
Reduce the import instr limit from the LLVM default (100) to 40. This
helps reduce the binary size as well as improving performance slightly.

Size:
             Default(100)   40        30
libhwui.so   11059040       11058912  11060872
libart.so    10697576       10697160  10696568

Performance:
40 vs. default:  0.37% improvement
                 http://go/art-benchmark?p=BootImageProfileId:36054
30 vs. default:  0.36% improvement
                 http://go/art-benchmark?p=BootImageProfileId:36058

Test: presubmit
Change-Id: Id800ff7818cde908daab784bac0a312c6a71272d
2023-08-01 18:30:13 +00:00
Kevin Jeon
4b4d61fa2e Merge "Add libdumpstateutil to vendor variant list" into main 2023-08-01 18:25:33 +00:00
Cole Faust
5c84c62733 Unique modules in BazelLabelForModuleDepsWithFn
This fixes the current bp2build failure.

Test: Presubmits
Change-Id: I0b141374ebdbee80aa296d9c9a577b125e5703d7
2023-08-01 11:07:02 -07:00