Commit graph

64252 commits

Author SHA1 Message Date
Cole Faust
117bb747a4 Move the testing platforms out of soong_injection
See the other cl in this topic for more information.

Bug: 269577299
Test: b test --config=android //build/bazel/rules/apex:all
Change-Id: I1f20bc5f85398cd79dc5b7fe9d0bd4d93d442383
2023-03-29 14:46:20 -07:00
Treehugger Robot
bc2906efef Merge "Modify Soong to utilize from-text android.jar in build" 2023-03-29 20:31:20 +00:00
Treehugger Robot
f1e0ce079c Merge "Remove dead code." 2023-03-29 19:17:57 +00:00
Treehugger Robot
4dd3659393 Merge "Enable Wincompatible-function-pointer-types globally" 2023-03-29 19:11:14 +00:00
Treehugger Robot
0bdbc1c387 Merge "pass cc shared libs as order-only to rustc" 2023-03-29 18:25:50 +00:00
Dan Albert
a910e10b76 Merge "Generate api_levels.json from the preview codenames." 2023-03-29 17:57:22 +00:00
Treehugger Robot
998fdd7e37 Merge "support PRODUCT_SOURCE_ROOT_DIRS product variable" 2023-03-29 17:04:37 +00:00
Colin Cross
3f3320cb1c Merge changes I93da03b1,I5fb3ee29
* changes:
  Use static asan runtime for musl
  Simplify depending on static sanitizer runtimes
2023-03-29 17:04:14 +00:00
Jingwen Chen
559e3a803f Merge "Revert "Build test1_com.android.tzdata and test3_com.android.tzdata with bazel."" 2023-03-29 16:40:14 +00:00
Alistair Delva
08a68a09a9 Merge "Revert "[RISC-V] rv64gc_zbb for Android"" 2023-03-29 16:24:19 +00:00
Jingwen Chen
7a3fed2565 Revert "Build test1_com.android.tzdata and test3_com.android.tzdata with bazel."
This reverts commit d28c426f15.

Reason for revert: breaks timezone_data_e2e_tests b/275666961

Change-Id: Icb2ee7c0db8b9eb82d1eaf191c8bf62afcece22f
2023-03-29 16:21:34 +00:00
Sam Delmerico
51d6d1c585 pass cc shared libs as order-only to rustc
The library file for a cc_shared_library dependency is added to the linkFlags of the rustc compilation action, but no explicit dependency was made on it from a Ninja perspective if a TOC was also present. This change adds the explicit dependency on the library file whether or not a TOC is present.

Test: m crosvm
Bug: 275416061
Change-Id: I625b62762d9ba7b4fd2b8362285528e47f728dd4
2023-03-29 14:33:20 +00:00
Jeongik Cha
2ece11ecd1 Add more modules in HugeModulesMap
Generate list based on build metric.
The next step is generate the list from module characteristics, not from
module name.

Bug: 273282046
Test: m
Change-Id: I0e9caa9987e8fc7f5a378bef940f3646e7bd169c
2023-03-29 23:29:45 +09:00
Jingwen Chen
263d400425 bp2build: fix breakage with more allowlists.
A new dep on //hardware/interfaces/audio/aidl/default was added, breaking mixed droid.

Bug: 275660561
Fixes: 275660561
Test: presubmits
Test: b build --config=android //hardware/interfaces/audio/aidl/... //external/tinyalsa_new/... //system/libvintf/... //system/tools/... //system/media/... //packages/modules/...  //external/tinyalsa/... //external/tinyalsa_new/...
Test: b build //hardware/interfaces/audio/aidl/... //external/tinyalsa_new/... //system/libvintf/... //system/tools/... //system/media/... //packages/modules/...  //external/tinyalsa/... //external/tinyalsa_new/...
Change-Id: Iead2fe6bfcf9cdb2a5b75210d9e84d33dc71691b
2023-03-29 12:17:43 +00:00
Jingwen Chen
a8623da12e bp2build apex: convert canned_fs_config property.
Bug: 275280970
Test: bp2build unit test
Change-Id: Ic6867a640a5079cd206419ddd378d2357093dae6
2023-03-29 04:20:08 +00:00
Jingwen Chen
3ebe338ec1 Merge "Build test1_com.android.tzdata and test3_com.android.tzdata with bazel." 2023-03-29 03:01:28 +00:00
Jingwen Chen
0cefc0cbc4 Merge "Add tests for custom canned_fs_config." 2023-03-29 02:53:23 +00:00
Treehugger Robot
c23ca62058 Merge "Do not install prebuilt stubs from module_sdk" 2023-03-29 02:29:09 +00:00
zijunzhao
2a08ccd0ba Enable Wincompatible-function-pointer-types globally
Bug: b/257101299
Test: make checkbuild
Change-Id: I7a5adc0c04e420e6782371b3efc3fbffd367b3a2
2023-03-29 00:31:49 +00:00
Cole Faust
d3cc7c9bef Merge "Add testing android products" 2023-03-29 00:19:51 +00:00
Dan Albert
169256f535 Fix NDK library sysroot arrangement.
We've been fixing this up on the NDK build side for ages. The
platforms/ subdirectory is a legacy thing from very old NDKs. Fix the
install paths to match what the NDK actually uses. This both lets us
delete some code on the NDK side and also makes the platform's output
easier to consume directly without having to wait for an NDK release
(or even a canary).

Bug: None
Test: treehugger
Test: inspected out/soong/ndk/sysroot
Test: build/soong/scripts/build-ndk-prebuilts.sh, imported into NDK
Change-Id: I3c4e0ce6d7960ae0138d1cf803755e4f1e575631
2023-03-28 23:19:01 +00:00
Dan Albert
e75af185a8 Remove dead code.
NDK CRT objects haven't been prebuilts for ages.

Bug: None
Test: treehugger
Change-Id: I923381da629b78487587e997018fa63dd818617f
2023-03-28 23:13:16 +00:00
Spandan Das
709dbd08a0 Merge "Compile stubs to .dex" 2023-03-28 22:56:41 +00:00
Steven Moreland
ee975ee3da sbox: print more errors
The output directory is deleted, so when I want to
see the files there, it can really be helpful to
see more.

Bug: N/A
Test: N/A
Change-Id: Ie40c412fe1bebbf87db00a4dbce107696ab2805e
2023-03-28 22:39:00 +00:00
Jihoon Kang
1bff0349d4 Modify Soong to utilize from-text android.jar in build
Context
- from-text android.jar files are built using Metalava, and these can be
  utilized in `decodeSdkDep` so that any modules that depends on APIs
  can be compiled using from-text android.jars
- This change removes dependency on source java files when compiling
  stub android.jar files

Implementation
- Modify java_api_library module to create system modules using the
  generated android.jar
- Replace modules in decodeSdkDep to link against java_api_library
  modules
- Add --build-from-text-stub flag to hide the feature behind a flag

Test: m --build-from-text-stub
Bug: 271154441
Change-Id: I104df595edc65c0006820d5ae5b15f1fb167e190
2023-03-28 21:53:45 +00:00
Alistair Delva
cc75089229 Revert "[RISC-V] rv64gc_zbb for Android"
This reverts commit 9838acffdd.

Reason for revert: b/274947458

Broke CI.
Will reland with QEMU options once the host image is fixed.

Change-Id: I6ad847cde2a291b3dd5b92314b2011744de50883
2023-03-28 20:59:36 +00:00
Liz Kammer
f2571c4136 Merge "Propagate testonly for override_apex bp2build" 2023-03-28 20:57:45 +00:00
Spandan Das
5aade5f52d Merge "Update max_sdk_version from SdkSpec to ApiLevel" 2023-03-28 19:17:48 +00:00
Cole Faust
ebc01a3225 Add testing android products
These must be added in the soong_injection code as opposed to just
defined loosely in checked-in bzl files because the product_vars
select statement must be updated to support the new platforms.

Bug: 269577299
Test: b test --config=android //build/bazel/...
Change-Id: I7bba9af214896dd3b5938bae70b7c0cea4f75e41
2023-03-28 11:27:30 -07:00
Treehugger Robot
9e30ad39ba Merge "Add tests to verify more use cases of afdo in cc and rust" 2023-03-28 18:18:18 +00:00
Liz Kammer
1a1c9df4e7 Propagate testonly for override_apex bp2build
Test: go test bp2build tests
Change-Id: I42c61687223c658237b3e4b0a0d6dd339946a6aa
2023-03-28 11:39:50 -04:00
Trevor Radcliffe
6182d31c63 Merge "Supporting changes for CFI toolchain features" 2023-03-28 14:23:55 +00:00
Jingwen Chen
dea7a649ac Add tests for custom canned_fs_config.
There are no tests to verify the generated action for the canned fs
config entries, so add some.

Also update the prop's docstring to reflect the actual logic.

Bug: 275209284
Fixes: 275280970
Test: soong tests

Change-Id: I37f2a8640bf4c307068a77db7a635c9bbeb9f38f
2023-03-28 11:32:37 +00:00
Jingwen Chen
d28c426f15 Build test1_com.android.tzdata and test3_com.android.tzdata with bazel.
..and allowlist //system/timezone/testing/... so that these apexes are mixed builds enabled.

Bug: 273910287
Fixes: 275351675

Test: b build //system/timezone/testing/...
Test: b build //system/timezone/testing/... --config=android
Test: m test1_com.android.tzdata test3_com.android.tzdata
Test: showcommands test1_com.android.tzdata | grep bazel-out
Test: showcommands test3_com.android.tzdata | grep bazel-out
Test: build/bazel/scripts/print_analysis_metrics.py --save-proto-output-file=out/proto-out.txt; rg enabled out/proto.txt
        $ rg enabled out/proto-out.txt
    639:    "mixed_build_enabled_modules": [ "adb_crypto_test", "adb_pairing_auth_test", "adb_pairing_connection_test", "adb_tls_connection_test", "adbd_test", "api_fingerprint", "com.android.adbd", "com.android.tzdata", "libbase", "libc++", "libcrypto", "libcutils", "test1_com.android.tzdata", "test3_com.android.tzdata", "test_com.android.adbd" ],
Change-Id: I2e74426d974d07ca39fccb5003dd4baed9763941
2023-03-28 10:40:37 +00:00
Jooyung Han
e5f063e85f Do not install prebuilt stubs from module_sdk
This is a rework of commit 5bdf2d589c
which made implementation variant of prebuilts with stubs as not
installable except libclangrt. This change narrows the affected modules
to prebuilts/module_sdk because cc_prebuilt_library_shared with stub
implementation is a special case only used there. It's typical for
cc_prebuilt_library_shared to have implementation, not stub.

Bug: 220898484
Test: ART_MODULE_BUILD_FROM_SOURCE=false m nothing
Change-Id: I99e5213da8cc473901e23942b50f06c023d91f60
2023-03-28 18:19:04 +09:00
Aditya Kumar
13ca1a9207 Merge "[RISC-V] rv64gc_zbb for Android" 2023-03-28 05:05:05 +00:00
Jeongik Cha
56df091391 Merge changes from topic "b/273282046"
* changes:
  Add HINT_FROM_SOONG option for ninja weight list
  Add EXTERNAL_FILE option for ninja weight list
2023-03-28 03:51:20 +00:00
Cole Faust
426b1c6c7f Merge "Rename utils.bzl to android_product.bzl" 2023-03-27 21:56:43 +00:00
Dan Albert
8c7a994dfc Generate api_levels.json from the preview codenames.
When the branch is configured as something less than the max codename
(for example, right now AOSP is U but V is also in development), the
active codenames list will not include V.

Bug: None
Test: None
Change-Id: Ia22388a8ba94ff00d053acb33363c3cdce7677d0
2023-03-27 20:34:01 +00:00
Maciej Żenczykowski
480a562661 Merge "Revert "Sort canned fs_config lines to facilitate comparison with Bazel-built APEXes"" 2023-03-27 18:51:45 +00:00
Sam Delmerico
98a7329d59 support PRODUCT_SOURCE_ROOT_DIRS product variable
Soong analyzes the entire source tree even though not every lunch target
needs to know about every module. For example, OEM sources can be
ignored for cuttlefish products. This functionality allows blueprint to
ignore a list of undesired directories.

Bug: 269457150
Change-Id: I1eec5d7b6a268cae4c633d8d89ed485598ebca45
2023-03-27 14:42:36 -04:00
Trevor Radcliffe
391a25d7fa Supporting changes for CFI toolchain features
Mostly exporting variables to Bazel, but also allowlisting a BUILD
file.

Bug: 251217226
Test: Unit tests
Change-Id: Id87015a3cd5d970700c4058ec989bb0c14c36bcb
2023-03-27 18:07:40 +00:00
Cody Heiner
2e758305ac Merge "Reword documentation" 2023-03-27 18:04:59 +00:00
Vinh Tran
2e7b0fd271 Add tests to verify more use cases of afdo in cc and rust
Test: go test
Bug: 267229065
Change-Id: I4aa9538e92aa27e0f842bdce3725bc82739196cb
2023-03-27 14:01:40 -04:00
Liz Kammer
a22c4b6a79 Disable flaky test temporarily
Test: go test . -run TestStubsForLibraryInMultipleApexes -count 1000
Bug: 275313114
Change-Id: Iee0ffa0c182840f036325b67c15d3731566151b2
2023-03-27 10:06:02 -04:00
Liz Kammer
48cdbeba29 Handle stubs within an apex with apex_available
Note this doesn't entirely match Soong's logic but is an improvement to
allow linking against implementation when two cc modules are
apex_available to the same module.

It is not possible to recreate the logic for "directly in" without
significant changes to bp2build as we do not add dependencies nor run
apex mutators. Rather than trying to replicate this, we would be better
off refactoring Soong to no longer support the "directly in apex" logic
and require users to correctly specify apex_available.

Bug: 272378496
Test: go test conversion tests
Change-Id: I17ac426f9b4bdad0c2ab661484e5d994f63568ce
2023-03-27 13:05:37 +00:00
Maciej Żenczykowski
67e2f79eb3 Revert "Sort canned fs_config lines to facilitate comparison with Bazel-built APEXes"
This reverts commit d6322939f7.

Reason for revert: breaks custom canned_fs_config

Bug: 275209284
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I70756af42cbfbc8a1e80894f1bdaa9f4c5cba9e8
2023-03-27 07:04:16 +00:00
Treehugger Robot
8fdb210be2 Merge "Add apex_available aidl + aidl&lang libraries" 2023-03-25 00:00:32 +00:00
Cole Faust
bd249821b9 Rename utils.bzl to android_product.bzl
Bug: 269577299
Test: b build --config=android `bmod com.android.adbd`
Change-Id: I93743a058a4f700e015cdd1c51544467a29d4fe6
2023-03-24 16:03:43 -07:00
Treehugger Robot
58c9b0678a Merge changes from topic "sysprop-apex-available"
* changes:
  Add apex_available tags for sysprop modules
  Add apex_available for static/shared only props
2023-03-24 22:21:16 +00:00