Commit graph

72021 commits

Author SHA1 Message Date
Treehugger Robot
4003606c5f Merge "Don't delete withres-withoutdex jar from R8 rules" into main am: 72928074f5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769925

Change-Id: I138e00eec2622acd40b8329fe1d04b9c31c9b6c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 19:52:57 +00:00
Treehugger Robot
72928074f5 Merge "Don't delete withres-withoutdex jar from R8 rules" into main 2023-10-03 19:17:56 +00:00
Mark Dacek
4ea798d3fd Merge "Revert "Modify symlink_forest to rerun when soong_build has changed."" into main am: 4ac292ffd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769443

Change-Id: If1c67dc37b57f3dd11d7805ec2a55e8ebcdb9769
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 19:04:56 +00:00
Mark Dacek
4ac292ffd8 Merge "Revert "Modify symlink_forest to rerun when soong_build has changed."" into main 2023-10-03 18:39:46 +00:00
Colin Cross
8484082fad Don't create withres-withoutdex files for R8
The withres-withoutdex files were added in b/195558228 because D8
produced errors when given an input jar that contained both class
and dex files:
Error: com.android.tools.r8.internal.Cc: Cannot create android app from an archive 'out/soong/.intermediates/libcore/libcore-crypto-tests/android_common/withres/libcore-crypto-tests.jar' containing both DEX and Java-bytecode content

It turns out R8 doesn't have this problem, it defaults to ignoring *.dex
files unless the com.android.tools.r8.allowDexInputToR8 system property
is set.  Remove the withres-withoutdex files when using R8, but keep
it in place for D8 for now.

Bug: 302573555
Bug: 303264288
Bug: 303064127
Test: m checkbuild
Test: m Calendar && m Calendar
Test: m framework-minus-apex && m framework-minus-apex
Change-Id: Ib6410f7fef6faf5913476c6423cdd27215c68c45
2023-10-03 18:27:28 +00:00
Yu Liu
b57dd3946e Remove AconfigJavaHostTest from the allowlist.
It was added by an accident previously.

Bug: None
Test: CI
Change-Id: I9a1fa32bb2686f336f9735a1e809a8491d38cd4c
2023-10-03 11:22:07 -07:00
Jihoon Kang
3d1cecda28 Merge changes from topic "expose_flagged_api_revert" into main am: a7e5e29ec1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769001

Change-Id: Id1645b93c56654857c6d8ae551227c728ac76e50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 18:02:14 +00:00
Spandan Das
063030cbb7 Merge "Handle symlinks in isPackageBoundary" into main am: 29af2a470d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769118

Change-Id: Id479359b55f4b75b92817cdeb3a5aaa4333c9c6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 18:01:43 +00:00
Yu Liu
2d7db62bcc Merge "Convert java_aconfig_library to bazel." into main am: 7a90fcfa45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2755429

Change-Id: I298633470fbb8c41442104419b811ac59751d213
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 18:01:26 +00:00
Jihoon Kang
a7e5e29ec1 Merge changes from topic "expose_flagged_api_revert" into main
* changes:
  Revert^2 "Add flagged api hide conditional to droidstubs"
  Revert^2 "Add soong config variable Release_expose_flagged_api"
2023-10-03 17:55:16 +00:00
Spandan Das
29af2a470d Merge "Handle symlinks in isPackageBoundary" into main 2023-10-03 17:51:41 +00:00
Yu Liu
7a90fcfa45 Merge "Convert java_aconfig_library to bazel." into main 2023-10-03 17:29:26 +00:00
Zi Wang
8cae29f34c Merge "Allowlist tradefed-common-util and some dependents for tradefed" into main am: 33befd0c58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769103

Change-Id: Ib863c47261892d3cd594f3afd31475491a2def04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 17:12:01 +00:00
Colin Cross
b716ceb832 Don't delete withres-withoutdex jar from R8 rules
R8 rules produce a depfile generated by R8.  R8 sees the withres-withoutdex
jar as an input, and so adds it to the depfile.  If the jar is deleted
after running R8 then ninja will always consider the rule dirty, as the
input file listed in the depfile is missing.

Fixes: 303064127
Test: m Calendar && m Calendar
Test: m framework-minus-apex &&  m framework-minus-apex
Change-Id: I5cbd780b56fc131b58598d6e569a8a78b7fe9395
2023-10-03 16:42:48 +00:00
Zi Wang
33befd0c58 Merge "Allowlist tradefed-common-util and some dependents for tradefed" into main 2023-10-03 16:31:29 +00:00
Vinh Tran
63838903f1 Merge "Change bp2build to switch to using custom fdo_profile macro" into main am: 85455887b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2763705

Change-Id: I70500dc91ed9ce7784188bd7af1c5e6ce011b593
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 15:34:56 +00:00
Vinh Tran
85455887b7 Merge "Change bp2build to switch to using custom fdo_profile macro" into main 2023-10-03 14:58:21 +00:00
Anton Hansson
b06bb5762e Support passing lint baseline to doclava
There are many issues in the docs, so allow specifying a baseline
file that allows existing lint errors in doclava.

Bug: 217734059
Test: m docs
Change-Id: I8997e47a497e1366247e8354be492805f300a16e
2023-10-03 12:15:19 +00:00
Colin Cross
004bd3f526 Revert "Split Rust crate builds into compile and link phases."
This reverts commit e7c71c344d.
The intermediates created by the separated rust compile steps are very
large, on the order of 60GB.  This is more than CI can support for now,
revert the split into compile and link phases.  This comes at the expense
of incremental build time, especially when modifying C/C++ sources that
are dependencies of rust modules.

Bug: 293349612
Test: builds
Change-Id: I81169e7d0727330c8de5e7688dcdc87fe7b8d3b5
2023-10-02 22:15:55 -07:00
Jihoon Kang
c831389625 Revert^2 "Add flagged api hide conditional to droidstubs"
This reverts commit 1180919dda.

Test: go test ./java && m TARGET_PRODUCT=sdk TESTING_TARGET_RELEASE_NEXT=true nothing and inspect ninja command for generating stubs and verify the flag is included && m TARGET_PRODUCT=sdk TARGET_RELEASE=trunk_food nothing and inspect ninja command for generating stubs and verify the flag is not included
Bug: 299570421
Change-Id: I4967376c0236bad729398af80fa59b48dbab5f21
2023-10-03 01:04:00 +00:00
Jihoon Kang
f3aa3225b6 Revert^2 "Add soong config variable Release_expose_flagged_api"
This reverts commit 5548bf3053.

Test: m nothing
Bug: 299570421
Change-Id: I9f70648fb6657bbf4f5681cd6d40517d70a8fefb
2023-10-03 01:00:42 +00:00
Chris Parsons
5f1b3c7ad8 create, but dont register, bp2build_deps mutator
This is the bulk of the "allowlist v2" feature. It will disable bp2build
generation for modules which have transitive dependencies without a
bazel build definition.

This CL includes this mutator, but doesn't register it as a bp2build
mutator (outside of a few unit tests). This allows us to easily iterate
on completion of this feature and ensure there are no launch blockers
before we finalize the change in AOSP.

Bug: 285631638
Test: Unit tests
Change-Id: Ifb0a079c409ca19b02cafa3fab2efa0d3deebc50
2023-10-03 00:16:30 +00:00
Mark Dacek
aa5cc2cd6a Revert "Modify symlink_forest to rerun when soong_build has changed."
This reverts commit 23a4120c57.

Reason for revert: broke soong_integration

Change-Id: I4d51841756675b3745244d23e13aefda0916614b
2023-10-02 23:40:33 +00:00
Thiébaud Weksteen
11e2cee9a6 Merge changes from topic "linter_integration_tests" into main am: 77b232da24
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2769019

Change-Id: I644f41e0eefef143396008663d02aa1c2f07b348
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 23:30:03 +00:00
Treehugger Robot
1b3e900e4c Merge "Remove -Wsign-promo." into main am: 2eff89a8ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2770219

Change-Id: I5aa4ad1382edbb1335d83e8f2170deb53ffd4618
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 23:27:55 +00:00
Thiébaud Weksteen
77b232da24 Merge changes from topic "linter_integration_tests" into main
* changes:
  Add .lint tagged output to Java modules
  Add lint.suppress_exit_code attribute
2023-10-02 23:26:39 +00:00
Treehugger Robot
2eff89a8ce Merge "Remove -Wsign-promo." into main 2023-10-02 23:14:26 +00:00
Krzysztof Kosiński
2cf4265572 Merge "More documentation for C++ global config." into main am: eae6635a0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2770218

Change-Id: Iea1588705a75630c398bda2931123e6df94022a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 23:12:35 +00:00
Krzysztof Kosiński
eae6635a0f Merge "More documentation for C++ global config." into main 2023-10-02 22:27:21 +00:00
Dwayne Barry
0df7036509 Merge changes from topic "revert-2646423-HDQXAAHWBW" into main am: e298d42044
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768071

Change-Id: I3efb286e8e011c2fb5ad2d3f6c4706be44e67d83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 22:07:13 +00:00
Yu Liu
f2b94010c8 Convert java_aconfig_library to bazel.
Bug: 297357579
Test: Unit test and AconfigJavaHostTest
Change-Id: Icf944cc0b2a7382107923d49b2d2ff0eb4113638
2023-10-02 15:04:19 -07:00
Dwayne Barry
e298d42044 Merge changes from topic "revert-2646423-HDQXAAHWBW" into main
* changes:
  Revert "NDK library: enable feature flags for dumping ABI repres..."
  Revert "NDK library: enable feature flags for diffing ABI repres..."
2023-10-02 21:40:32 +00:00
Android Culprit Assistant
cd44909edc Revert "NDK library: enable feature flags for dumping ABI repres..."
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/e18f14a6-af8b-4b9e-8f8e-73515c608887).

Change-Id: Ia32769fc520459ce7cb61f8e5b1def623eee93ff
2023-10-02 21:26:39 +00:00
Android Culprit Assistant
6dabfdda65 Revert "NDK library: enable feature flags for diffing ABI repres..."
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/e18f14a6-af8b-4b9e-8f8e-73515c608887).

Change-Id: I4e0b62eea9e1c0ff49fbbf92e900606ccf93b93a
2023-10-02 21:26:39 +00:00
Wei Li
5f49a8e36e Merge "Change sbom_test.sh to take command line arguments for target product, release and build variant, which is for a corresponding change in CI." into main am: 0af40657ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2770025

Change-Id: I566856eacea24d4659d76fce37a4e8dd6b9cb171
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 18:35:52 +00:00
Christopher Parsons
87fbbe641d Merge "Treat src=name filegroups as handcrafted targets" into main am: aa3e435857
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2766186

Change-Id: Ib25d2952b0f8aca01fbe651550e1a50967e3b605
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 18:35:30 +00:00
Wei Li
0af40657ff Merge "Change sbom_test.sh to take command line arguments for target product, release and build variant, which is for a corresponding change in CI." into main 2023-10-02 18:14:33 +00:00
Spandan Das
a7da3f0e0b Create bp2build converter for versioned_ndk_headers
This module type is used by a single soong module - `common_libc` in
bionic/libc

Implementation details
- Convert this module type to ndk_headers rule. Bazel's ndk_headers rule
  will have a boolean attribute `run_versioner` to determine if
  verioner should be run on the headers
- Add this module type to the alwaysConvert bp2build list
- Add the converted target for `common_libc` to the deps of
  `ndk_sysroot`. This ensures that unbundled apps link against the
  versioned NDK headers of libc

Test: go test ./bp2build
Test: b build //bionic/libc:common_libc --config=android
Test: for f in $(find bazel-bin/bionic/libc/common_libc.versioned -type f); do cmp $f ${f/bazel-bin\/bionic\/libc\/common_libc.versioned/out\/soong\/ndk\/sysroot\/usr\/include}; done # no diff

Bug: 301169067

Change-Id: I55be202f0589db9bdc743c8be41c9c5afd74c352
2023-10-02 17:35:55 +00:00
Christopher Parsons
aa3e435857 Merge "Treat src=name filegroups as handcrafted targets" into main 2023-10-02 17:35:44 +00:00
Zi Wang
2260933688 Allowlist tradefed-common-util and some dependents for tradefed
Test: CI

Bug: 283193845
Change-Id: Id9e8eefcf47080e786c62466658c7cb1f31b055d
2023-10-02 09:56:34 -07:00
Mark Dacek
55c467dd51 Merge "Modify symlink_forest to rerun when soong_build has changed." into main am: e20b7589b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2758108

Change-Id: I6c6f2028868304284588ecf4fa6998b973e9f7bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 16:25:07 +00:00
Mark Dacek
e20b7589b4 Merge "Modify symlink_forest to rerun when soong_build has changed." into main 2023-10-02 15:36:43 +00:00
Romain Jobredeaux
fc6a6fd081 Merge "Use manual BUILD files in jdk8 and allowlist apache-commons-compress" into main am: e2007bfd0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2767831

Change-Id: I39fbdd11d59b1b3905cd55ebd4146913b8e64e5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 14:19:44 +00:00
Romain Jobredeaux
e2007bfd0e Merge "Use manual BUILD files in jdk8 and allowlist apache-commons-compress" into main 2023-10-02 13:38:50 +00:00
Aleksei Vetrov
3306e5228a Merge changes I94a0e2de,I95ebfef6 into main am: bf62b334f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2646423

Change-Id: I00b43583290322a31c1ca36bfcde5ce596327544
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 13:17:16 +00:00
Aleksei Vetrov
bf62b334f6 Merge changes I94a0e2de,I95ebfef6 into main
* changes:
  NDK library: enable feature flags for diffing ABI representations
  NDK library: enable feature flags for dumping ABI representations
2023-10-02 12:40:59 +00:00
Thiébaud Weksteen
d054436434 Add .lint tagged output to Java modules
The linter output can be referenced in other modules for further
processing.

Bug: 302400088
Test: m nothing
Change-Id: I1809b70d8d98ced5d8f3d5f068c6639c782ebebc
2023-10-02 10:12:30 +11:00
Krzysztof Kosiński
29c60f34fb Remove -Wsign-promo.
This flag has no effect in Clang:
https://clang.llvm.org/docs/DiagnosticsReference.html#wsign-promo

Bug: 296606895
Test: presubmit
Change-Id: I59c1e6b6cf541529b9f4741accdf26822572426f
2023-09-30 06:15:22 +00:00
Krzysztof Kosiński
1a4572ec9c More documentation for C++ global config.
Bug: 296606895
Test: presubmit
Change-Id: I19a4fa327bf1eac192067caf6d064a740124caf6
2023-09-30 05:49:09 +00:00
Wei Li
3b3173d5db Change sbom_test.sh to take command line arguments for target product, release and build variant, which is for a corresponding change in CI.
Bug: 276778945
Test: build/soong/tests/sbom_test.sh TARGET_PRODUCT=aosp_cf_x86_64_phone TARGET_RELEASE=trunk_staging TARGET_BUILD_VARIANT=userdebug
Change-Id: I2d9e271e4ae351e3626657aa2ac2a1a967c15fc8
2023-09-29 16:52:11 -07:00