Commit graph

59146 commits

Author SHA1 Message Date
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
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
4a06eea3cf Merge "Update clang version to clang-r475365" 2022-11-30 00:46:00 +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
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
bd879db596 Merge changes I84cf63d1,Ia74af915
* changes:
  Enable sizeof-array-div warning
  Enable array-parameter warning
2022-11-29 21:41:24 +00: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
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
Yu Liu
56ccb1aecd Support abi check in bazel.
Bug: 253498204
Test: Manual and unit test.
Change-Id: Id23c4f772f67c4ba05704eaad77322133474b42b
2022-11-29 11:25:10 -08:00
Jason Wu
47d7ccfffd Merge "Upload bp2build_metrics file" 2022-11-29 18:50:32 +00:00
Igor Foox
6463871fd9 Merge "Add tzdata do the Bazel mixed build prod mode allowlist." 2022-11-29 18:09:23 +00:00
Dan Albert
f7cb563a18 Improve error output for missing ABI dumps.
Bug: http://b/156513478
Test: tried using this, saw the error message
Change-Id: Ia5b292315a5c5d603ab0ba4dc3303b1b8ff2ef5b
2022-11-29 17:20:16 +00:00
Paul Duffin
45c566591e Merge "Output min_sdk_version to snapshot" 2022-11-29 17:19:54 +00:00
Jason Wu
c4a03138e0 Upload bp2build_metrics file
Test: m nothing
Test: m --bazel-mode-dev
Test: Verified bp2build_metrics is available in local metrics tables from builds that include this CL

Bug: 257537925

Change-Id: I09617a7850f1471f18192a0418396126fd4c98ef
2022-11-29 16:18:45 +00:00
Anton Hansson
805e0a53ef Ignore native bridge archs for apex selection
This leads to an arm64 apex being used on a device that is mixed
x86_64 with nativebridge=arm64. A device like that doesn't appear
to work with arm64 binaries. For example, the boringssl-self-check
binary crashes on boot.

Bug: 260115309
Test: unit test
Test: boot emulator with this combination
Change-Id: Ic4a91974290a05b1799f755fcf52ef226d68f4c2
2022-11-29 12:56:37 +00:00
Jiakai Zhang
7d78bad7e2 Merge "Only dexpreopt system server jars for the primary arch." 2022-11-29 11:57:24 +00:00
Jingwen Chen
ed6240d1bc Merge "Revert "bp2build conversion for Sanitize.Integer_overflow"" 2022-11-29 02:35:07 +00:00
Kiyoung Kim
f160f7ffa8 Add more cases to vendor-installed module
Current InstallInVendor only checks vendor property, but there are more
properties to check if the module will be installed in the vendor. This
change adds two more cases (soc_specific and proprietary) to the
function.

Bug: 233294155
Test: N/A
Change-Id: Ic3cb4c52f5097cdcc6231c0e85a62ce3ad6094b3
2022-11-29 10:58:08 +09:00
Chih-Hung Hsieh
5a06f330ed Enable sizeof-array-div warning
Except third-party external/vendor projects.

Bug: 148815709
Test: presubmit; make tidy-soong_subset
Change-Id: I84cf63d1b9e244acb3ff3bc913ee9c2f1eae0e5a
2022-11-29 00:13:01 +00:00
Chih-Hung Hsieh
823e0b7e12 Enable array-parameter warning
Except third-party external/vendor projects.

Bug: 241941550
Test: presubmit; make tidy-soong_subset
Change-Id: Ia74af9155d7d1aca0e6cecf1103f4d0de4345291
2022-11-29 00:12:07 +00:00
Jingwen Chen
0ead79bd11 Revert "bp2build conversion for Sanitize.Integer_overflow"
Revert submission 2277186-ubsan_bp2build

Reason for revert: b/260630869 broke mixed_droid
Reverted Changes:
Idd9b33e53:bp2build conversion for Sanitize.Integer_overflow
I0d636e439:Add Sanitizer libs up the dependency tree
If113de7bc:Introduce toolchain features for sanitizers

Change-Id: Idf7e7b62f6fb6d4ff92341cc4c9c4b7426b70951
2022-11-28 22:44:35 +00:00
Treehugger Robot
efc1bc7f2f Merge "Improve mixed builds error messages" 2022-11-28 22:06:21 +00:00
Trevor Radcliffe
202f2afbf8 Merge "bp2build conversion for Sanitize.Integer_overflow" 2022-11-28 21:45:07 +00:00
Yabin Cui
7a53b71f3b Update clang version to clang-r475365
Bug: 253033919
Test: build
Change-Id: I3c0d133d57cc389ee62502dd6aa36ee019e624d6
2022-11-28 13:40:14 -08:00
Cole Faust
93dc19d39d Allowlist build files in external/python/absl-py
Needed because we import absl-py in our bazel.workspace file.
It only worked before in b, not mixed builds, because b was
run from the real android tree instead of out/soong/workspace.

Bug: 234449134
Bug: 249685973
Test: Presubmits
Change-Id: I51c28e23260bed7ca7d4968fd823f52f0d26a0ab
2022-11-28 12:00:00 -08:00
Trevor Radcliffe
548fc5dcec bp2build conversion for Sanitize.Integer_overflow
and Sanitize.Misc_undefined.

Bug: 253428057
Test: Unit tests
Change-Id: Idd9b33e537d1b1c80b0c96a9590327dae13fada7
2022-11-28 19:31:34 +00:00
Jiakai Zhang
2fbc355f47 Only dexpreopt system server jars for the primary arch.
This change stops the build system from dexpreopting system server jars
for the secondary arch. System server jars are only loaded by the system
server, so the artifacts for the the secondary arch are not used.

Bug: 260577273
Test: Build a system image and no longer see artifacts for the
  secondary arch.
Change-Id: I0b131a02e996ed50e7aec3bb0a221f8ceed9ce57
2022-11-28 15:38:23 +00:00
utzcoz
4283bf300b Remove unused rules for platform-robolectric-4.4-prebuilt
platform-robolectric-4.4-prebuilt was removed by
https://android-review.googlesource.com/c/platform/prebuilts/misc/+/2298317,
and soong's special rules for platform-robolectric-4.4-prebuilt is not
needed anymore.

Test: m

Signed-off-by: utzcoz <utzcoz@gmail.com>
Change-Id: I3304aa1061d8b945b03cfe1a91f466ceb6ca1260
2022-11-28 07:53:20 +00:00
Igor Foox
ff387e55fc Add tzdata do the Bazel mixed build prod mode allowlist.
Bugs:  b/258504104
Test: Ran a local build and checked build metrics and ninja file,
presubmits.

Change-Id: Ifdefdaebc13188e036b0b9cd55fbdcdfbdc8e11f
2022-11-27 21:48:40 -05:00
Paul Duffin
bb638eba50 Output min_sdk_version to snapshot
The min_sdk_version was added to the java_import in Tiramisu. This
change will propagate the min_sdk_version set on a java_library to the
java_import snapshot. If possible the min_sdk_version will be resolved
into a numerical version to ensure consistent behavior across build
releases.

Bug: 260560424
Test: m nothing
      BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
      # Ran above before and after this change and made sure that only
      # Tiramisu, UpsideDownCake and latest were changed and those changes
      # were the addition of a min_sdk_version property.
      #
      # Ran the following command in tm-mainline-prod:
      #     lunch cf_x86_64_phone-userdebug
      #     m ART_MODULE_BUILD_FROM_SOURCE=false nothing`.
      #
      # It failed with:
      #     module "prebuilt_okhttp-norepackage" variant "android_common": should support min_sdk_version(33) for "AdServicesApk": min_sdk_version is not specified.
      #
      # Unpacked the Tiramisu art snapshot generated with this change into
      # tm-mainline-prod and reran the previous command and it succeeded.
Change-Id: I9d9d730845554fc175d17f38c038e4e3c7d39e07
2022-11-26 15:52:32 +00:00
Yi-yo Chiang
9fd9129b57 Merge "cc: Add docstring for IsVndk() and UseVndk()" 2022-11-25 09:17:26 +00:00
Yi-Yo Chiang
1080f0c495 cc: Add docstring for IsVndk() and UseVndk()
Note that IsVndk() returns true for all variants of vndk-enabled
libraries. Not only vendor variant, but also platform and product
variants of vndk-enabled library return true.

OTOH, `UseVndk() && IsVndk()` returns true for vendor and product
variants of vndk-enabled libraries, which actually include the actual
VNDK libs (which goes into the VNDK apex) and VNDK extension libs (which
goes to /product or /vendor partition).

Bug: 259361996
Test: Presubmit
Change-Id: Ib735fe0f7433284ca768d0e251a4f599fff5185c
2022-11-24 20:29:35 +08:00
Treehugger Robot
378124baf1 Merge "Allow stubs implementation to be omitted" 2022-11-24 11:12:18 +00:00
Justin Yun
39c303116a Allow hwasan variant for vendor_snapshot_static modules
vendor_snapshot_static modules can define hwasan variant as below:

vendor_snapshot_static {
    name: "libsnapshot",
    vendor: true,
    version: "33",
    arch: {
        arm64: {
            src: "libsnapshot.a",
            hwasan: {
                src: "libsnapshot.hwasan.a",
            },
        },
    },
}

Bug: 234772527
Test: m nothing
Change-Id: I0725028a4fdc302005d86f1e36561b98c0af623b
2022-11-24 17:51:08 +09:00
Treehugger Robot
e315b8b12a Merge "Use excludes from OS axis for OsAndInApex" 2022-11-23 17:17:19 +00:00
Anton Hansson
c5cee23d16 Merge "extract_apks matches APKs with >= 1 matching ABI" 2022-11-23 16:29:31 +00:00
Usta (Tsering) Shrestha
3caa38827c Merge "volatile-status.txt to be translated to an order-only dep in build.ninja" 2022-11-23 15:31:16 +00:00
Liz Kammer
ffc17e4edb Use excludes from OS axis for OsAndInApex
The axis for OS and in APEX was previously ignoring the excludes from
OS, which would result in excludes for non-Android OSes being
incorrectly ignored.

Test: go test Soong tests
Test: b build //hardware/libhardware:all
Bug: 260131489
Change-Id: Ie77f763bea0f473ac69a0c6b6bc3216e7359ad12
2022-11-23 10:01:30 -05:00
Cole Faust
2ced8c8a57 Prevent duplicated license_kinds
Bazel fails when there are duplicate license_kinds.

Bug: 260148018
Test: go test
Change-Id: I47a27d37d66be947e4a744cd04a3cdcc0b000de4
2022-11-22 17:43:40 -08:00
Jihoon Kang
ad8c092c08 Merge "Fix java/fuzz_test.go post submit build breakage" 2022-11-22 23:26:11 +00:00
Sam Delmerico
b48d57bdcd extract_apks matches APKs with >= 1 matching ABI
Prior to this change, the bundletool and extract_apks tools require that
all ABIs that an APEX or APK provides must be compatible with the
TargetConfig. Instead, this change allows an APK to be selected if it
has at least one compatible ABI with the TargetConfig.

Bug: 260115309
Test: go test .
Change-Id: If67ce8128099611257a834862295a2bf5fa427d3
2022-11-22 17:53:26 -05:00
Cole Faust
97d1527dd2 Improve mixed builds error messages
When a target does not have a certain provider we need,
currently we just fail at the dictionary lookup. Change
it so that we fail with a message that tells us what
target had the issue.

Bug: 260131489
Test: Presubmits
Change-Id: I99fd018835c14eba0d4db54ba2769b2da1b278f6
2022-11-22 14:38:24 -08:00
usta
fdb3e34df7 volatile-status.txt to be translated to an order-only dep in build.ninja
Bug: b/260092986
Test: 1. `out/soong/build.ninja` has `bazel-out/volatile-status.txt` as order-only dep 2. `touch Android.bp && m --bazel-mode-staging aapt2` updates bazel-out/volatile-status.txt but aapt2 is not rebuilt

Change-Id: I1fa23437fea14e0d25b68d75010e964dff34766d
2022-11-22 17:12:30 -05:00