Commit graph

64322 commits

Author SHA1 Message Date
Spandan Das
0bf4ea53f5 Merge changes I4129c2a9,I9af06f81
* changes:
  Drop the default apex_available value from BUILD files
  Make //apex_available:platform the default.
2023-04-20 15:30:20 +00:00
Inseob Kim
0933fd59d7 Merge "Add min_sdk_version prop to snapshots" 2023-04-20 07:36:58 +00:00
Sam Delmerico
dc0a4021cd Merge "Revert "mixed builds correctly reference stubs libs"" 2023-04-19 19:57:49 +00:00
David Fu
1ea1bc3b6b Merge "Added assignee field to FuzzConfig." 2023-04-19 18:23:45 +00:00
Zi Wang
04af019ec0 Merge "Fix api fingerprinting with apex." 2023-04-19 16:49:38 +00:00
Elliott Hughes
0ee012c2c4 Merge "riscv64: stop reserving x18 for shadow call stack." 2023-04-19 14:38:37 +00:00
Usta (Tsering) Shrestha
1db4348734 Revert "mixed builds correctly reference stubs libs"
This reverts commit ca438e6b72.

Reason for revert: ci post-submit failures in aosp-master-bazel of targets mixed-droid-clean and mixed-droid-incremental:
FAILED: ninja: 'out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libc_intermediates/libc.so.toc', needed by 'out/target/product/generic_arm64/obj/EXECUTABLES/updater_intermediates/LINKED/updater', missing and no known rule to make it
12:21:27 ninja failed with: exit status 1

Change-Id: I081b499d23f2568cdf6227c4e3b0278164086b69
2023-04-19 14:02:52 +00:00
Zi Wang
a4f7dae7b9 Fix api fingerprinting with apex.
Test: b build adbd and tzdata and verify target sdk version is correct

Bug: 277921995
Change-Id: I05a98fcb628f2a1d83358fe79f19c58010f05430
2023-04-18 21:12:02 +00:00
Peter Collingbourne
67237c82ed Merge "Pass -Wl,--as-needed when linking Rust binaries." 2023-04-18 19:17:41 +00:00
David Fu
af4e33bcc8 Added assignee field to FuzzConfig.
Change-Id: Ia8cff7fa0980674ef6ed64922b6895b61c1e41a4
2023-04-18 10:43:24 -07:00
Usta (Tsering) Shrestha
cf76125627 Merge "Add aidl.deps prop to include aidl implicit deps explicitly in Android.bp" 2023-04-18 14:18:51 +00:00
Jihoon Kang
d1a038c183 Merge "Add additional java_api_library module to java testing" 2023-04-18 03:46:55 +00:00
Inseob Kim
5860f8227c Add min_sdk_version prop to snapshots
Bug: 277403349
Test: build vndk/vendor snapshot and build
Change-Id: I226032bb0f9356cdef6747daec6ceb06589d9cbb
2023-04-18 11:30:22 +09:00
Jihoon Kang
fb502593cd Add additional java_api_library module to java testing
Module lib surface is comprised of contributions from art, conscrypt,
and i18n api domains. On top of this, the module lib api surface generates an additional stub library containing the contributions of the non-updatable api domains. Adding this additional module to the testing module enables more thorough testing of module lib api scope java_api_library modules.

Test: m
Change-Id: Ia648651fb9e6cba2642de7e8d39047d888bf49ce
2023-04-17 21:28:47 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
fecec28c34 Merge "bp2build: migrate export_{,system_}include_dirs -> *includes for cc_prebuilt_library{,_static,_shared}" 2023-04-17 21:01:21 +00:00
Romain Jobredeaux
d7141be8ff Merge "Allowlist CaptivePortalLogin and required dependencies." 2023-04-17 20:33:00 +00:00
Spandan Das
2dc6dfcb16 Drop the default apex_available value from BUILD files
If apex_available is missing from Android.bp files, ApexAvailable
returns [//apex_available:platform], which is the default. To avoid
BUILD file verbosity, remove the build system default value from the
generated BUILD files.

Bug: 277651159
Test: go test ./bp2build

Change-Id: I4129c2a93ac28578f46ebeed49baa23ce727aa1f
2023-04-17 19:26:03 +00:00
Spandan Das
8e6386e0aa Make //apex_available:platform the default.
go/Android.bp mentions that ["//apex_available:platform"] is the
default, but currently it was []. This change does not create any
additional module variants.

(Noticed this for libz, I was expecting its apex_available to be
platform and not an empty list)

Test: TH
Change-Id: I9af06f813b1a1d7b716939874f469bd2e1ce4d14
2023-04-17 17:28:06 +00:00
Ramy Medhat
93c52efc15 Merge "Enable reclient cache directory." 2023-04-17 14:10:20 +00:00
Romain Jobredeaux
aa6e25df46 Allowlist CaptivePortalLogin and required dependencies.
Change-Id: I5ed5bfa70d5a7d179e8721df0e833315a2ada05a
Bug: 215230089
2023-04-17 09:50:04 -04:00
Jooyung Han
9551384f65 apex: skip symbol files when replaced with prebuilt
Apexer rule with symbol files causes "no build rule" error when the apex
is replaced with prebuilt.

Bug: 251299786
Test: m checkbuild (presubmit)
Change-Id: I7390f72c321beaeb49fcee4e02a219c07f184664
2023-04-17 15:25:17 +09:00
Peter Collingbourne
4629f7c886 Pass -Wl,--as-needed when linking Rust binaries.
aosp/2518976 revealed a pre-existing bug, which was that some Rust test
targets did not have all of their shared library dependencies packaged in
the host-unit-tests.zip file. Conveniently enough, these targets did not
actually depend on any of the symbols in the missing shared libraries, so
their DT_NEEDED entries were being removed by the --as-needed flag being
passed to the linker by rustc. This flag was dropped when we switched
to running the link command directly, causing the DT_NEEDED entries to
reappear and leading to runtime failures for these test binaries.

Although we could fix the issue that prevented these (unused) dependencies
from being packaged, there wouldn't be much point in doing so because
we already know that they aren't needed. So for now, let's return to
the status quo and keep passing --as-needed to the linker.

Bug: 278168700
Change-Id: Iae103803983240fa14cdbc2ff0d8ffb4329c6024
2023-04-14 17:36:57 -07:00
Vinh Tran
2562585878 Add aidl.deps prop to include aidl implicit deps explicitly in Android.bp
In a follow-up CL, we should eventually disallow aidl.include_dirs in cc rules so that the deps are always explicit and compatible with Bazel migration.

Test: go test
Bug: 278059962
Change-Id: Ia786cc8634d03589dc008f10b01e6bb2b9f2c7f0
2023-04-14 19:28:44 -04:00
Florian Mayer
7de9aa1a7b Merge "Add handling for libc_hwasan to Soong" 2023-04-14 23:27:57 +00:00
Treehugger Robot
0c3682be50 Merge "mixed builds correctly reference stubs libs" 2023-04-14 23:07:21 +00:00
Cole Faust
ae31382119 Merge "bp2build support for python_test(_host)" 2023-04-14 20:49:01 +00:00
Cole Faust
35dcf77fb6 Merge "Remove special handling of prebuilt_framework-res" 2023-04-14 18:35:35 +00:00
Romain Jobredeaux
141dcbb6cc Merge "Delete platform mapping specific bp2build code" 2023-04-14 17:34:13 +00:00
Mark Dacek
4e37219e4c Merge "Fix issue where bazel-force-enabled-modules aren't actually analyzed." 2023-04-14 17:13:13 +00:00
Sam Delmerico
ca438e6b72 mixed builds correctly reference stubs libs
Bug: 270408757
Test: go test
Test: m NeuralNetworksTest_shared_partial --bazel-mode-staging
  && verify that Ninja commands link libneuralnetworks via stubs
Change-Id: I19bf5a829cea7fd00c0f82511ad2bddbc40fae4f
2023-04-14 12:42:23 -04:00
Treehugger Robot
9e1117bf66 Merge "Differentiate between public and module-lib stub variants" 2023-04-14 02:46:23 +00:00
MarkDacek
9c094ca153 Fix issue where bazel-force-enabled-modules aren't actually analyzed.
Bug: 273910287
Test: run mixed_mode_test.sh

Change-Id: I309c423b6e7f505ad1db0d9327e7de6b8298dfe9
2023-04-14 02:17:54 +00:00
Treehugger Robot
3d1b6964ec Merge "Update min_sdk_version used in testNoUpdatableJarsInBootImage" 2023-04-13 23:25:45 +00:00
Cole Faust
d82f036b89 bp2build support for python_test(_host)
There was a request for using b with python tests. bp2build python
tests exactly the same way as python binaries so that they can be
used with `b`.

Bug: None
Test: go test
Change-Id: Id68a6a73572745a4885b3e5bb1b8452e36baa982
2023-04-13 16:10:59 -07:00
Cole Faust
d580613a0e Remove special handling of prebuilt_framework-res
prebuilt_framework-res doesn't appear to exist anymore.

Bug: 185811447
Test: m nothing
Change-Id: Ib1aa929fbe007f87d03bdc85e4d54c6fae4e510b
2023-04-13 15:48:30 -07:00
Romain Jobredeaux
1a3382c0c2 Delete platform mapping specific bp2build code
Bug: 249685973
Test: Presubmits
Change-Id: Ib76a7659dfe57731100550c2cff4de960be2f1d7
2023-04-13 18:48:00 -04:00
Treehugger Robot
f5cd477841 Merge "Split Rust crate builds into compile and link phases." 2023-04-13 22:45:02 +00:00
Spandan Das
b2b41d57cd Differentiate between public and module-lib stub variants
The public stubs of libclang_rt.* originate from the same module. When
generating the Androidmk entries for these stubs, we need to add a
suffix to differentiate between the two stub variants.

This is likely an issue specific to libclang_rt.*. The public stubs of
other libraries like libc, liblog, ... come from a separate module
ndk_library which adds an .ndk suffix

Test: lunch module_arm64only && TARGET_BUILD_APPS="build.bazel.examples.apex.minimal" build/soong/soong_ui.bash --make-mode  nothing
(with aosp/2535141)
Test: lunch aosp_cf_arm64_phone-userdebug && m nothing

Change-Id: I2b4411cb022b4e27f44d2fce6cb26492dd7e2278
2023-04-13 22:25:40 +00:00
Treehugger Robot
01add2893c Merge "Add external_updater to bazel allowlist." 2023-04-13 21:13:05 +00:00
Trevor Radcliffe
4ffcdad9c0 Merge "New test for propagation of CFI" 2023-04-13 21:10:57 +00:00
Romain Jobredeaux
a3c029e7d5 Merge "Bp2build support for sdk_version and java_version." 2023-04-13 20:53:07 +00:00
Dan Albert
f1235a8787 Add external_updater to bazel allowlist.
Bug: None
Test: treehugger
Change-Id: I2b8a357198dbe0b2be4850ba7de4a749910c1be1
2023-04-13 16:39:28 +00:00
Trevor Radcliffe
bc65f63abc New test for propagation of CFI
Bug: 261733820
Test: It is a test

Change-Id: I3aedbdc14c4f5c41a706962894b6c686dbb1a70c
2023-04-13 14:46:40 +00:00
Jooyung Han
748fd189b5 Merge "Make conv_linker_config visible to linkerconfig" 2023-04-13 08:24:40 +00:00
Elliott Hughes
7d57090bb3 Merge "Temporarily disable shadow call stack for riscv64." 2023-04-13 01:47:42 +00:00
Cole Faust
70079c1192 Merge "Don't type variables as booleans in mk2rbc" 2023-04-12 23:35:53 +00:00
Peter Collingbourne
e7c71c344d Split Rust crate builds into compile and link phases.
Teach rustc to generate object files instead of a linked executable
for binary and shared library crates. This lets us skip the lengthy
Rust compilation phase when only the C++ dependencies of these crates
have changed.

This works using a Python script that replaces the linker invoked by
rustc and converts the linker command line into a rspfile that can be
used during the link phase. The script makes certain assumptions about
how rustc invokes the linker, but since we control the version of Rust
we use, we can update the script if those assumptions ever break. I've
asked the Rust developers about adding an official way to do this so
hopefully we won't need to rely on this hack in the future.

The rustc rule for Kythe has been altered to pass linker=true, somewhat
consistent with the main rustc rule, which now doesn't invoke the actual
linker either. `m xref_rust` still succeeds, but hopefully we can find
someone who knows more about the rest of the Kythe pipeline who can let
us know whether it should still work. Otherwise, let's use this CL as
an opportunity to find out whether the rest of the pipeline is happy
with linker=true, since otherwise we will find it hard to maintain the
Kythe rule in the future.

Change-Id: Ifb9c8689c1bd78c0afcf6fdfd111140d20377536
2023-04-12 15:51:41 -07:00
Treehugger Robot
5a15e9522c Merge "Fix crash when missing platform sdk version" 2023-04-12 21:35:31 +00:00
Elliott Hughes
2aff6c1132 riscv64: stop reserving x18 for shadow call stack.
We're switching from x18 to gp, in stages. This change frees up x18
again now bionic and ART have switched to gp. There's no need for a
corresponding "reserve gp" change because gp is automatically reserved.
That's what makes it the perfect choice for shadow call stack (at
least until we get Zsslpcfi and an actual hardware shadow stack pointer
special-purpose register).

Bug: https://github.com/google/android-riscv64/issues/72
Bug: http://b/277909695
Test: treehugger
Change-Id: Iaee1d44cba8daf5d4a27a3791fe3cc28ed1a5d9a
2023-04-12 14:24:44 -07:00
Treehugger Robot
7a9626c655 Merge "Make buildroot.cquery determinisitc" 2023-04-12 21:04:52 +00:00