Commit Graph

62307 Commits

Author SHA1 Message Date
Treehugger Robot
cf7f7a30a7 Merge "Copy bazelrc files into the queryview workspace" am: b4bac94eb5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321778

Change-Id: Ieef98f0001c7cbff95c4fc9afe2f2ad9e8b10332
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 19:23:45 +00:00
Treehugger Robot
82c41a8a19 Merge "Improve error output for missing ABI dumps." 2022-11-30 19:18:48 +00:00
Treehugger Robot
b4bac94eb5 Merge "Copy bazelrc files into the queryview workspace" 2022-11-30 18:36:48 +00:00
Yu Liu
67841b7226 Merge "Support abi check in bazel." am: 734fefdf90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2300265

Change-Id: I225c1f3e4f465ca0d5aeb5afefb102ef0850c605
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 18:17:44 +00:00
Yu Liu
734fefdf90 Merge "Support abi check in bazel." 2022-11-30 17:57:42 +00:00
Treehugger Robot
2b92aa814f Merge "Add the symlinks of the external repository in api_bp2build workspace" am: e0229e6855
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322298

Change-Id: If51d79f362dc155e926902bc711a1710b63ee21a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:45:36 +00:00
Alix Espino
6fc0de289e Merge "Bp2Build for libs property in java_library" am: 9ba98bb9cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2310791

Change-Id: I986e34422bc58e9661ff3c9bd293d1b59997e194
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:45:18 +00:00
Treehugger Robot
92b787bb3f Merge "Add more cases to vendor-installed module" am: d0cd326415
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2319850

Change-Id: Ide6ae42f59d7f509ff8d09eb7c49b335be8dd457
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:44:18 +00:00
Jihoon Kang
a30b3145c7 Merge "Add phony rule for java_api_library module type" am: c05902cff9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321693

Change-Id: I8c599df6c463ac7319cc95d74fd6e5413e1c48d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:43:40 +00:00
Treehugger Robot
e0229e6855 Merge "Add the symlinks of the external repository in api_bp2build workspace" 2022-11-30 17:38:09 +00:00
Bob Badour
07c034bf34 Change condition to match go/thirdpartylicenses
Policy uses restricted_if_statically_linked at
https://opensource.google/documentation/reference/thirdparty/licenses#RestrictedIfStaticallyLinked

Test: m droid

Change-Id: I6eee52bef179b2a2b4257595e596652cfbdfef68
2022-11-30 09:34:51 -08:00
Alix Espino
9ba98bb9cf Merge "Bp2Build for libs property in java_library" 2022-11-30 17:34:49 +00:00
Treehugger Robot
d0cd326415 Merge "Add more cases to vendor-installed module" 2022-11-30 17:19:25 +00:00
Jihoon Kang
c05902cff9 Merge "Add phony rule for java_api_library module type" 2022-11-30 17:06:29 +00:00
Christopher Parsons
ff4cceb7bc Revert "Revert "Add tzdata do the Bazel mixed build prod mode allowlist.""
This reverts commit f8ab0321e3.

Reason for revert: Fixed underlying bugs (aosp-riscv and llvm breakages)

Change-Id: Ib7fe8e39af5bbe40bac615c815307ad9f05e83d3
2022-11-30 15:44:15 +00:00
Sam Delmerico
5150d0d309 fallback to nonmixed builds for unsupported builds
Bug: 253664931
Change-Id: I8026d0412b8dd62f55edf776f72747209ce2e955
2022-11-30 10:36:48 -05:00
Treehugger Robot
aae2c9dad5 Merge "Exclude prebuilts/clang/host/linux-x86/clang-dev/BUILD from the symlink forest." am: 9b2e24c318
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321585

Change-Id: Icff699e87fd1cf430aa6c5fd5d8a68ee3246df70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 12:12:29 +00:00
Treehugger Robot
9b2e24c318 Merge "Exclude prebuilts/clang/host/linux-x86/clang-dev/BUILD from the symlink forest." 2022-11-30 11:51:59 +00:00
Jingwen Chen
bcfadce598 Exclude prebuilts/clang/host/linux-x86/clang-dev/BUILD from the symlink forest.
Background: toolchain/llvm_android/test_compiler.py generates clang-dev, a directory
symlink pointing to out/install/linux-x86/clang-dev, which itself
contains a BUILD file. This BUILD file should be excluded from the
symlink forest because it's not an allowlisted BUILD file.

Problem: However, our current symlink forest logic and finder logic doesn't
handle this situation. It's not in bazel.list:

```
$ less out/.module_paths/bazel.list | grep prebuilts/clang
prebuilts/clang/host/linux-x86/BUILD.bazel
prebuilts/clang/host/linux-x86/cc_toolchain_config.bzl
prebuilts/clang/host/linux-x86/cc_toolchain_constants.bzl
prebuilts/clang/host/linux-x86/cc_toolchain_features.bzl
prebuilts/clang/host/linux-x86/clang-r450784d/BUILD.bazel
prebuilts/clang/host/linux-x86/clang-r450784e/BUILD.bazel
prebuilts/clang/host/linux-x86/clang-r458507/BUILD.bazel
prebuilts/clang/host/linux-x86/clang-r468909/BUILD.bazel
prebuilts/clang/host/linux-x86/clang-r468909b/BUILD.bazel
prebuilts/clang/host/linux-x86/clang-r475365/BUILD.bazel
```

The symlink forest logic uses this bazel.list file and matches it
against the keepExistingBuildFile list to exclude BUILD files from the
symlink forest. Since clang-dev/BUILD.bazel is not in bazel.list, it's
symlinked into the forest.

All of these gymnastics could be avoided if we added custom BUILD file
name support to Bazel, and only symlinked (e.g.) Android.bazel and
ignored all other BUILD files in the tree. It would be very clear which
checked-in BUILD files we want to use in the symlink forest.

I think we should pursue custom BUILD file names instead of adding more
complexities, to say, the finder logic, to support such a use case. It's
also why I decided to add this hardcoded exclusion to keep the
workaround simple.

Bug: 260809113
Test: presubmits
Test: $ DIST_DIR=/tmp/dist prebuilts/python/linux-x86/bin/python3 toolchain/llvm_android/test_compiler.py --build-only --target aosp_raven-userdebug --no-clean-built-target --module dist --module droid --module tidy-soong_subset --with-tidy ./
Change-Id: I415371543585c1c5e8e00e6958105f65ea5978ee
2022-11-30 08:44:05 +00:00
Treehugger Robot
7f61a3b638 Merge "Revert "Allowlist build files in external/python/absl-py"" am: f219c0fc87
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322224

Change-Id: I23c5a1e5b9221fdc5e4cd323647ba2ece9459070
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 08:23:44 +00:00
Hsin-Yi Chen
f36301260e Add a build rule for opt-in ABI dumps
The developers can specify ref_dump_dirs for shared libraries in
Android.bp. Each of the ref_dump_dirs generates a command to diff the
ABI with the reference dumps in the directory. The existing ABI diff for
VNDK, NDK, and Mainline are not changed.

Bug: 227282691
Test: make libutils
Change-Id: I62158393c8804200e96d538bc69c24147cb5caa5
2022-11-30 16:00:51 +08:00
Treehugger Robot
f219c0fc87 Merge "Revert "Allowlist build files in external/python/absl-py"" 2022-11-30 07:47:26 +00:00
Kiyoung Kim
d5d1ab1b3e Support NDK variant of cc_api_variant
Update cc build logic to support NDK variant of cc_api_variant. Any
cc_api_library with NDK variant of cc_api_variant would be treated as
similar with NDK library.

Bug: 259007436
Test: Cuttlefish vendor build succeeded
Change-Id: I75a7475f4fdcbac779f5aa64e76c60f94ea7ea1a
2022-11-30 16:36:14 +09:00
Hsin-Yi Chen
0af4e6728a Deprecate ABI reference dumps in gzip
ABI dumps in gzip are no longer supported because they cannot be
reviewed or merged.

Bug: 227282691
Test: make
Change-Id: I9fdf943fb8ae30aeae884d4d361a65034ab6fa94
2022-11-30 15:02:18 +08:00
Kevin Dagostino
3e2da94e2d Use existing BUILD files for test-related tools.
Allowlist BUILD files of test-related tools so that they appear in the final bp2build workspace. This is required for Bazel test rules that are dependent on these projects.

Test: b build //prebuilts/runtime/... //tools/asuite/atest:atest-tradefed  //tools/asuite/atest/bazel/reporter/...
Change-Id: Ie34658706efe6ca7657c935528df8daef61bfc0c
2022-11-30 06:07:59 +00:00
Cole Faust
762c2def20 Revert "Allowlist build files in external/python/absl-py"
Revert submission 2308141-colefaust_run_b_from_out_folder

Reason for revert: Breaks CI due to more instances of the bazel shutdown issue
Reverted Changes:
I51c28e232:Allowlist build files in external/python/absl-py
I9e6530d95:Cd into the bazel workspace instead of using --pac...

Change-Id: Ice47ef2baaef9976546f9562dc7dd9b19b383d59
2022-11-30 05:16:30 +00:00
Hsin-Yi Chen
a6ddb144f8 Refactor the build rules for ABI diff
- Move the logic that determines the versioned dump directories
  from pathForVndkRefAbiDump to linkSAbiDumpFiles.
- Move sourceAbiDiff which generates the flags for ABI diff from
  builder.go to library.go.
- Define two functions that generate the rules for cross-version and
  same-version ABI diff.

Bug: 227282691
Test: make
Change-Id: Ic33799e86dd9ae627f5680b70973f96e15c030e9
2022-11-30 11:34:39 +08:00
Spandan Das
6b91a38b51 Add the symlinks of the external repository in api_bp2build workspace
Unlike bp2build, api_bp2build depends on a well-defined subset of checked-in
BUILD/bzl files, and we create symlinks for that subsset in
out/soong/api_bp2build. Since we now cd into the workspace after
aosp/2308141, we need to add the sylimks of the external repositories as
well

Test: bazel build --config=api_bp2build //:empty
Change-Id: Ia7ecc5543226893a3878bc0fd35e025a37c80413
2022-11-30 02:22:57 +00:00
Yabin Cui
46f034eee5 Merge "Revert "Update clang version to clang-r475365"" am: a7526ad43a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321403

Change-Id: I5b89852a39f2ef707ff1ded0bedd253ea8ad2485
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 02:18:09 +00:00
Treehugger Robot
e9fb62aefd Merge "Revert "Enable sizeof-array-div warning"" am: acf23fe098
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321955

Change-Id: I84c28ce4fdbcdc55507ceee2a0f80fc0d44f52a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 02:17:55 +00:00
Yabin Cui
a7526ad43a Merge "Revert "Update clang version to clang-r475365"" 2022-11-30 02:02:37 +00:00
Yabin Cui
a558be6472 Revert "Update clang version to clang-r475365"
This reverts commit 7a53b71f3b.

Reason for revert: fix aosp_riscv64-userdebug build

Change-Id: Ie1579c5692335573b85fd5b062a4104023276287
2022-11-30 02:00:43 +00:00
Treehugger Robot
acf23fe098 Merge "Revert "Enable sizeof-array-div warning"" 2022-11-30 01:50:46 +00:00
Yabin Cui
dc0cb15fc7 Merge "Update clang version to clang-r475365" am: 4a06eea3cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2301166

Change-Id: Icf77a9e20da9ef4a0fa4f0f1a68f9a9257b54d2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 01:13:53 +00:00
Yabin Cui
4a06eea3cf Merge "Update clang version to clang-r475365" 2022-11-30 00:46:00 +00:00
Krzysztof Kosiński
d867b39f76 Merge "Revert "Add tzdata do the Bazel mixed build prod mode allowlist."" am: b35b88ee82
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321954

Change-Id: Id75281532957b5d6bf60e7a1082a9257591b48d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 00:42:48 +00:00
Krzysztof Kosiński
b35b88ee82 Merge "Revert "Add tzdata do the Bazel mixed build prod mode allowlist."" 2022-11-30 00:19:17 +00:00
Jihoon Kang
423d229c3b Add phony rule for java_api_library module type
Context
- Create phony rule for java_api_library module with its artifact
  (*.jar) as dependency
- Fix source directory base mislinkage issue for input text files passed
  from java_api_contributions modules

Test: m
Change-Id: I055332fd5bc7ef0d03e7b311b0efa93f4454102f
2022-11-29 23:37:55 +00:00
Treehugger Robot
acf6f6e606 Merge "Disable bazel for riscv_64" am: 00652e7570
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322093

Change-Id: I1cd9f6ab078075708d8add515f862fcda3c3aea1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 23:37:09 +00:00
Krzysztof Kosiński
6be24baec4 Revert "Enable sizeof-array-div warning"
This reverts commit 5a06f330ed.

Reason for revert: Breaks aosp_bramble-userdebug
https://android-build.googleplex.com/builds/submitted/9348502/aosp_bramble-userdebug/latest/view/logs/build_error.log

Change-Id: I4e360638dee2c2d620c814ccb1c752cef47c0d21
2022-11-29 23:19:34 +00:00
Krzysztof Kosiński
f8ab0321e3 Revert "Add tzdata do the Bazel mixed build prod mode allowlist."
This reverts commit ff387e55fc.

Reason for revert: breaks aosp-riscv target
https://android-build.googleplex.com/builds/submitted/9347261/aosp_riscv64-userdebug/latest/view/logs/build_error.log

Change-Id: I789d0af91ab18185fbbe68616c6e10f59be4169c
2022-11-29 23:16:13 +00:00
Treehugger Robot
00652e7570 Merge "Disable bazel for riscv_64" 2022-11-29 22:58:59 +00:00
Chih-hung Hsieh
be331c445b Merge changes I84cf63d1,Ia74af915 am: bd879db596
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2309600

Change-Id: If1ed7b7e3704dbc7d71e9f8ccbd18d72a293f26c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 22:01:23 +00:00
Chih-hung Hsieh
bd879db596 Merge changes I84cf63d1,Ia74af915
* changes:
  Enable sizeof-array-div warning
  Enable array-parameter warning
2022-11-29 21:41:24 +00:00
Paul Crowley
4965dc0cc3 Fix go link given when stubby is absent.
The link here named a heading that has been changed, and so no longer works.
Instead use a dedicated go link for this purpose.

Test: none
Change-Id: Icea2fe330d8c777593802d561afd5aa0f76c9ed0
2022-11-29 13:08:06 -08:00
Cole Faust
6d51e731a6 Copy bazelrc files into the queryview workspace
They are still read when using bazel with queryview, so they
need to be in the workspace so that they can be found.

Bug: 234449134
Test: m queryview && ./build/bazel/bin/bazel query --config=queryview //...
Change-Id: I1f2187dffd5a0e6cfb44ebe0c6738fa9bbef509d
2022-11-29 12:46:48 -08:00
Chris Parsons
428c30f89a Disable bazel for riscv_64
This product is experimental and unsupported for Bazel at this time

Test: lunch aosp_riscv64-userdebug && m nothing
Test: lunch aosp_arm64-userdebug && m nothing
Change-Id: I761afb9524f1008f9d5472d2de19bb84342e9e29
2022-11-29 15:35:56 -05:00
Cole Faust
59e28e489a Merge "Allowlist build files in external/python/absl-py" am: 5d4f066ec9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2308367

Change-Id: Ib5806ac28c686d30fae9d0b752d6f1629ee681b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 20:25:33 +00:00
Cole Faust
5d4f066ec9 Merge "Allowlist build files in external/python/absl-py" 2022-11-29 20:03:20 +00:00
Alix
341484b3da Bp2Build for libs property in java_library
Bp2build for both *->java_library and java_library->* edges.

Change-Id: I2540c9af2ae2fe7677767d507647b1c6669b9bb7
Bug: 244210934
Test: ./bp2build testcase, manually inspected build files for hamcrest-library, hamcrest targets
2022-11-29 19:44:50 +00:00