Commit graph

72760 commits

Author SHA1 Message Date
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
Mark Dacek
9574fb9ab2 Merge "Modify symlink_forest to rerun when soong_build has changed." into main am: e20b7589b4 am: 55c467dd51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2758108

Change-Id: I7759f157177fa248a577ec7984a131bde06bfd45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 18:33:12 +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
49b07dc069 Merge "Use manual BUILD files in jdk8 and allowlist apache-commons-compress" into main am: e2007bfd0e am: fc6a6fd081
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2767831

Change-Id: Id85f25741908bc67982813fcd9f2bbc2bbebc626
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 14:25:22 +00:00
Aleksei Vetrov
c600c8b9f4 Merge changes I94a0e2de,I95ebfef6 into main am: bf62b334f6 am: 3306e5228a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2646423

Change-Id: I6836367ef771711213c08083590d533d3ea6c2ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 14:25:11 +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
MarkDacek
23a4120c57 Modify symlink_forest to rerun when soong_build has changed.
Also remove existing symlink_forest_version functionality.

This remedies issues pertaining to b/300122962 - symlinks not
clearing after a revert

Timing wise - this doesn't present a performance regression
on a clean build. When soong_build changes, it's considerably longer
but no different from the time when symlink_forest_version is changed.

Bug: 300288299
Test: build/soong/tests/symlink_forest_rerun_test.sh
Change-Id: I0e95aac315dfea7ea3b8bb9a3eb0c6408300bd3b
2023-09-29 22:53:07 +00:00
Spandan Das
dc7d7f7557 Handle symlinks in isPackageBoundary
isPackageBoundary looks at ShouldKeepExistingFile before checking if
that directory contains a BUILD file or not. ShouldKeepExistingFile
should be complemented with a isSymlink check. This is necessary because
we copy all symlinks to the synthetic workspace, and the resolved
symlink might point to a directory containing a BUILD file.

This additional clause is redundant if the directory has been
allowlisted for keepExistingBuildFile (e.g. build/bazel, recursive)

Test: b build //bionic/libc:versioner-dependencies (top of stack)

Change-Id: I5b23262f89ea34a78de4ccade6d27e4c5dd95c2e
2023-09-29 21:04:30 +00:00
Romain Jobredeaux
3fe1edde31 Use manual BUILD files in jdk8 and allowlist apache-commons-compress
Bug: 302008402
Bug: 302587886
Change-Id: I91401bf3fcda4c83ad2bb9d782b4021ffe6fd103
2023-09-29 15:08:55 -04:00
Liz Kammer
79ff08f12c Expand regex for likely aidl filegroups
Test: go test soong tests
Change-Id: Iab7abea8e2d11583cb4a8ecd4b27368f61dd40e0
2023-09-29 12:38:42 -04:00
Trevor Radcliffe
9b81d79ef6 Implement bp2build for Sysprop Java
Bug: 297356813
Test: bp2build and inspect BUILD files
Test: Conversion Unit Tests
Change-Id: Ib70400eb91bca946df1d99d953d7a0e7e63fb7cf
2023-09-29 15:42:00 +00:00
Jason Wu
4802534b19 Merge "Skip @bazel_tools// labels from ninja" into main am: fc5ff341e8 am: 7e1bbc9629
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2761148

Change-Id: I704e91ee2344436ba2156ac245cda5d27fcace3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 14:38:04 +00:00
Treehugger Robot
ad0a6f614f Merge "Delete temporary files after d8 and r8 rules" into main am: 956f79c5d4 am: 737cf4dc67
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768187

Change-Id: I0605811c5d0e17a4b8d4e69f9502869924f6ef7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 14:35:42 +00:00
Mark White
f500e9d78d Merge "Added new framework-pdf jar inside MediaProvider module" into main am: 477a31271d am: 14a6903e77
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2760586

Change-Id: I8967a0c014db1dee3c1ae5141c06c63028a0ae78
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 14:33:27 +00:00
Jason Wu
7e1bbc9629 Merge "Skip @bazel_tools// labels from ninja" into main am: fc5ff341e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2761148

Change-Id: I48f8d8ab339461a435d18d38a001176570d488aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 14:28:24 +00:00
Treehugger Robot
737cf4dc67 Merge "Delete temporary files after d8 and r8 rules" into main am: 956f79c5d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768187

Change-Id: I2fadedf0bf0dc36452139d77c70b1d8d1f98535f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 14:28:07 +00:00
Jason Wu
fc5ff341e8 Merge "Skip @bazel_tools// labels from ninja" into main 2023-09-29 14:26:37 +00:00
Treehugger Robot
956f79c5d4 Merge "Delete temporary files after d8 and r8 rules" into main 2023-09-29 13:27:57 +00:00
Mark White
14a6903e77 Merge "Added new framework-pdf jar inside MediaProvider module" into main am: 477a31271d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2760586

Change-Id: I2ae058860ad10e700934ff3648a2d51ad81bf0ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 13:26:48 +00:00
Mark White
477a31271d Merge "Added new framework-pdf jar inside MediaProvider module" into main 2023-09-29 12:21:33 +00:00
Sam Delmerico
5f777ced6f Merge "add testcases for rust output file paths" into main am: 1579a91352 am: 54e057563b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2764070

Change-Id: I447eda242e74f975fa1a3f6da8b3da27447f4cad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 10:21:32 +00:00
Sam Delmerico
54e057563b Merge "add testcases for rust output file paths" into main am: 1579a91352
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2764070

Change-Id: Ia864038ab39fb7515517e0a6029e41cd97a37dc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 09:13:51 +00:00
Sam Delmerico
1579a91352 Merge "add testcases for rust output file paths" into main 2023-09-29 08:35:28 +00:00
Sam Delmerico
079a97c778 add testcases for rust output file paths
Prepare for changing rust rules by testing that output file names will
match. A build failure in b/301463284 was partially caused by output paths changing and resulting in old files building up on buildbots which filled the disk. This unit test will ensure that the file paths of rust modules do not change and cause the same failure.

Bug: 301463284
Bug: 286077158
Change-Id: I1baba2c63ad29a2c98e378fce0a2ed32bc319c1e
2023-09-29 08:35:04 +00:00
Cole Faust
977c9432e3 Generate build_number.txt only once am: 583dfb426f am: 60f2c2677d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768188

Change-Id: Ic97d5fdcc6bd2ad42c8a4810be1e96465370fcf7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 06:09:07 +00:00
Cole Faust
60f2c2677d Generate build_number.txt only once am: 583dfb426f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768188

Change-Id: I9cc986860173da4f2148afa93d2cfb34f65af0b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 05:01:28 +00:00
Roy Luo
0945907249 Merge "Revert "Generate build_number.txt only once"" into main am: eba51bf937 am: 16f282210c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768007

Change-Id: I6fdb4808307af80da08d0575bd7b6eeb3d2d081e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 01:58:45 +00:00
Treehugger Robot
ef3ed750c3 Merge "Generate build_number.txt only once" into main am: b7dbc85485 am: 2860378298
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768665

Change-Id: Ibf52463be0b3d49025bab94c38f046ed878df07d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 01:58:33 +00:00
Cole Faust
583dfb426f Generate build_number.txt only once
build_number.txt was generated in runKati, and runKati is run multiple
times throughout the build. If a build number is not set, then one will
be generated using the current timestamp, meaning that multiple
different build numbers will be used in different phases of the build.

Instead, generate build_number.txt during SetupOutDir(), so that we
only have 1 build number.

This is a resubmission with a change to ensure out/soong is created
before writing the build number file.

Bug: 297269187
Test: edit a bzl file to force bazel to rerun, change the code so that use_fixed_timestamp=true during partition builds, m installclean, m bazel_sandwich, and observe that the bazel/make partitions are byte-for-byte identical
Change-Id: I47abcca166c701bb66a6a7731aecad5818279244
2023-09-28 17:56:43 -07:00
Roy Luo
16f282210c Merge "Revert "Generate build_number.txt only once"" into main am: eba51bf937
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768007

Change-Id: Ib4dcf88313ec1484939a6ce44286308e39170b66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 00:49:50 +00:00
Treehugger Robot
2860378298 Merge "Generate build_number.txt only once" into main am: b7dbc85485
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2768665

Change-Id: Ic8578637db55e34c34cf19b97a18ce1b0c88516f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 00:49:08 +00:00
Colin Cross
56e2840a57 Delete temporary files after d8 and r8 rules
Delete files created within the d8 and r8 rules that are not considered
output files by ninja.  This should reduce disk space usage without
affecting incremental build performance.

Bug: 302573555
Test: m checkbuild
Change-Id: Ifea86888c2f385415735ade7d80cf315bc4d057e
2023-09-28 17:43:35 -07:00
Roy Luo
eba51bf937 Merge "Revert "Generate build_number.txt only once"" into main 2023-09-29 00:32:02 +00:00
Roy Luo
f852b72a22 Revert "Generate build_number.txt only once"
This reverts commit ab6e524709.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=aosp-main&target=ndk&lkgb=10879153&lkbb=10879224&fkbb=10879224, bug b/302608661.

Change-Id: I07d47a92ea9a9f5d329e813859316decfd75cde1
BUG: 302608661
2023-09-29 00:28:32 +00:00
Thiébaud Weksteen
9c0dff9ae5 Add lint.suppress_exit_code attribute
The Android lint --exitcode parameter can be skipped using
ANDROID_LINT_SUPPRESS_EXIT_CODE. Expose a similar attribute to Java
modules to ignore the exit code.

This is useful for integration testing. It is possible to build
libraries that report an error when linted. Othewise, such module would
break the checkbuild target.

Bug: 302400088
Test: m nothing
Change-Id: I372c42184f40d25753a688c380c0c63e9758ca00
2023-09-29 10:24:13 +10:00
Treehugger Robot
b7dbc85485 Merge "Generate build_number.txt only once" into main 2023-09-29 00:12:01 +00:00
Chris Parsons
2ef472be7a Treat src=name filegroups as handcrafted targets
This is groundwork for allowlist v2, as such targets are still
effectively referencable via their file syntax; thus, rdep targets of
these filegroups should still be treated as convertible.

Fixes: 302025822
Test: Unit test update
Change-Id: I93445ff75e7c0570530725d086e47c1532833c06
2023-09-28 23:07:00 +00:00
Christopher Parsons
c56fc85760 Merge "support aidl bp2build changes" into main am: dec9ce6693 am: 49ff8ddaa7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2757771

Change-Id: Iec917c9195f97144a87ff422d1abc9b0c24082e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 22:50:50 +00:00