Commit graph

59169 commits

Author SHA1 Message Date
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
Alexander Smundak
2f213d0946 Merge "Allow profiling Soong from the full build" 2022-11-22 18:52:25 +00:00
Liz Kammer
2c1d6aae37 Update sanitize to not modify user properties
Test: m nothing before/after and compare build.ninja (no diff)
Change-Id: Ia165e4beea0b34417f873247b592837a152d45cd
2022-11-22 13:14:39 -05:00
Jihoon Kang
a2d3947a4e Fix java/fuzz_test.go post submit build breakage
Context
- Fix build breakage in aosp-build-tools for darwin targets

Test: m
Bug: b/260020491
Change-Id: I892876cf1567b4464e86daca0b305510da0ab2fd
2022-11-22 17:51:23 +00:00
Spandan Das
53e680d2ae Merge "Add min_sdk_version to aidlCmd for droidstubs" 2022-11-22 17:09:26 +00:00
Liz Kammer
92c725994f Extend sanitize_test.go
Test: go test soong cc tests
Change-Id: I63fe74fb837e25f63074fb918a573f8b421562f1
2022-11-22 11:46:34 -05:00
Liz Kammer
fd8a49fb9d Limit propagating san config of shared to fuzzer
Prior to refactoring the sanitizers to use transition mutators, only
fuzzer sanitizer propagated configuration to shared dependencies
https://android-review.googlesource.com/c/platform/build/soong/+/2123434/9/cc/sanitize.go#b1365
However, this expanded to include TSAN in the refactoring
https://android-review.googlesource.com/c/platform/build/soong/+/2123434/9/cc/sanitize.go#1068.

Fortunately, TSAN is never enabled via Android.bp files in AOSP, so
there was no regression, but we should restore to the prevous state.

Test: go tests
Change-Id: I1a5ad8d033f7a9b4f7578393a2eac7c9362ab6f7
2022-11-22 11:46:32 -05:00
Colin Cross
262d65d481 Merge "Remove SettingsOverlay* from legacyCorePlatformApiModules" 2022-11-22 16:39:04 +00:00
Alan Stokes
73feba3330 Allow stubs implementation to be omitted
When defining a stubs library, allow specifying that the
implementation library does not need to be installed. This allows for
cases where the implementation is deployed in some non-standard way -
e.g. inside a Microdroid virtual machine.

Without this, we get build errors like: "TARGET module
com.android.compos requires non-existent TARGET module: libvm_payload".

Default behavior is unchanged. The change is protected by an allowlist
to limit usage to the immediate use case.

Bug: 243512108
Test: builds; soong tests pass
Test: Remove allowlist, see build failure
Change-Id: Iaae75f2e93b842f5944a7518cc95069d62c5a638
2022-11-22 16:00:02 +00:00
Paul Duffin
032734ca9f Merge "Remove support for unused env vars from sdk snapshot generation" 2022-11-22 15:56:04 +00:00
Treehugger Robot
dd33a493fb Merge "use CommonAttributes for Tags in protos filegroups" 2022-11-22 15:46:59 +00:00
Treehugger Robot
657ee23d83 Merge "Pass "-Xgc:CMC" to dex2oat when userfaultfd GC is enabled." 2022-11-22 15:10:20 +00:00
Parth Sane
000cbe0aab Add support for AIDL traces in Priv apps
Change-Id: Iafb6c6fd53ce33f7aa1679db55deec2ec383bea7
Test: Manual
Bug: 236441443
2022-11-22 13:05:19 +00:00
Spandan Das
6960ac12ac Add jarjar's deps to bp2build allowlist
jarjar switched its deps from prebuilts to source (aosp/2305413). Add
the source directory to the allowlist. This should fix broken bp2build
presubmits

Test: b build //external/jarjar
Change-Id: Ic7f37ea0ac167dc3b0f605ca0e67f8740652e0b1
2022-11-22 04:58:06 +00:00
Spandan Das
757b666c7f Add min_sdk_version to aidlCmd for droidstubs
JavaDoc's implementation of `aidlFlags` omits `min_sdk_version`, and
therefore aidl compiler would default it to a default version.

To fix this, pass the min_sdk_version explicitly

Bug: 253122520
Test: TH
Test: go test ./java
Change-Id: Ia8f639174f8361136596d0e7b3286606f84705cd
2022-11-21 22:59:38 +00:00
Nikita Ioffe
663e060c64 Merge "Propagate stub_only_libs to the invocation generating stub sources" 2022-11-21 22:55:46 +00:00
Sam Delmerico
e9b33f70ae use CommonAttributes for Tags in protos filegroups
The Tags attribute is now available in CommonAttributes, and if we use
that one, we won't get errors with conflicting definitions of the
attribute if a global Tags value is added via CommonAttributes.

Test: m bp2build
Change-Id: I422ed817b84e6808ef60fe3599fe84332bc51d8e
2022-11-21 16:25:20 -05:00
Jihoon Kang
f33d92603e Merge "Add java/fuzz_test.go to test sources" 2022-11-21 19:29:58 +00:00
Sasha Smundak
faa97b7eb9 Allow profiling Soong from the full build
Test: treehugger
Change-Id: I5112364fff635b856a55744457f547d3eba91391
2022-11-21 10:56:51 -08:00
Jihoon Kang
ba36441424 Merge "Update java_api_library prop name" 2022-11-21 18:03:12 +00:00
Matt Gilbride
0e2c2aaa60 Merge "lint: always run module specified in ANDROID_LINT_CHECK_EXTRA_MODULES" 2022-11-21 17:38:21 +00:00
Paul Duffin
6fcb32258a Merge "Revert "Improve error reporting when depending on prebuilt implementation jar"" 2022-11-21 17:20:03 +00:00
Treehugger Robot
91831b3e7c Merge "Use missing.x509.pem instead of missing.pem for faked missing certificates" 2022-11-21 16:04:40 +00:00
Nikita Ioffe
d732da7251 Propagate stub_only_libs to the invocation generating stub sources
In some cases the java_sdk_library needs to compile against hidden
platform APIs, in order to do so it needs to add impl_only_libs
dependency on the framework library, and set the sdk_version property to
the "core_*" one (e.g. core_platform).

However, if this java_sdk_library depends on the Android SDK in it's
stable API surface, then the setup above will break the stubs srcs
generation, as it uses the sdk_version of the java_sdk_library (e.g.
core_platform), which doesn't have symbols from the Android SDK.

This chage solves the problem by propagating the stub_only_libs to the
invocation that generates the stub sources. It allows the
java_sdk_libraries to add a stub_only_libs dependency on the
android_module_lib_stubs_current stubs library to fix their stubs build.

For more context see another change in this topic:
https://android-review.git.corp.google.com/c/platform/packages/modules/Virtualization/+/2310569

Bug: 243512044
Test: builds
Test: m nothing
Change-Id: Id745cfb2789901672561050c1c3f8bb163922379
2022-11-21 15:51:40 +00:00
Paul Duffin
7ed6ff8c76 Revert "Improve error reporting when depending on prebuilt implementation jar"
This reverts commit c61783b20d.

Bug: 257969510
Reason for revert: b/255275437 - breaks checkbuild target

Change-Id: I01f88053cc24dbc1a4eb5c009f15473bdff3d565
2022-11-21 10:57:30 +00:00
Martin Geisler
a512bb53ad Merge "rust: expand docstrings for Rust module types" 2022-11-21 10:33:56 +00:00
Martin Geisler
3e9a5d9e2f Merge "rust: Test with full Rust “crate_type”" 2022-11-21 10:29:42 +00:00
Martin Geisler
3e0efc52f3 Merge "rust: Fix indentation, convert to TABs" 2022-11-21 08:36:33 +00:00