Commit graph

96925 commits

Author SHA1 Message Date
Cole Faust
8383184b7a "Steal" single value variables in rbc inheritance
This behavior of "stealing" values from parent makefiles is needed to
match make. We already had similar behavior for list variables via
the __move_items function, but were missing it for single value
variables.

Test: ./out/rbcrun -mode rbc ./build/make/tests/run.rbc
Change-Id: Ib320b9b1cce0224184f585c7a391be1b5353b440
2024-04-30 17:30:18 -07:00
Ted Bauer
4560e3ae8f Update dependencies for new aconfig flag storage
Bug: 328444881
Test: m
Change-Id: I3685a74e9e93a6ecb89a054e243b48b67f470d55
2024-04-30 23:57:51 +00:00
Spandan Das
7d5b29ef85 Merge "Revert "Align boot jar exclusion with apex_contributions"" into main 2024-04-30 23:24:05 +00:00
Spandan Das
213847d3f6 Revert "Align boot jar exclusion with apex_contributions"
This reverts commit f340066ee3.

Reason for revert: Breaks go/ab/git_main:barbet-ap2a-userdebug

Change-Id: I62639525d5b2507a07c3145ff556fdf2b156cb01
2024-04-30 23:10:28 +00:00
Dennis Shen
c0102331c8 Merge "aconfig: add a new aconfig storage file flag listing api" into main 2024-04-30 23:06:18 +00:00
Treehugger Robot
3c5b13078b Merge "Align boot jar exclusion with apex_contributions" into main 2024-04-30 21:46:01 +00:00
Treehugger Robot
40cc23b709 Merge "Move coverage builds prebuilt special case to make" into main 2024-04-30 20:04:44 +00:00
Treehugger Robot
13f8f70758 Merge "Move aosp_x86_64 away from non-AB" into main 2024-04-30 18:20:06 +00:00
Dennis Shen
45c94c6421 aconfig: add a new aconfig storage file flag listing api
added a new function called list_flag_with_info to list all the flags
given all four storage files (package.map, flag.map, flag.val, flag.info).
also exported this api thru cxx interface so aconfigd can use it.

Bug: b/312444587
Test: atest -c
Change-Id: Ibbfe657b980d40e25e5e28962b930338192e2d98
2024-04-30 17:52:44 +00:00
Wei Li
d83c7d020b Add license metadata declarations which are moved from device/google/trout/Android.mk.
Bug: 309903693
Test: CIs
Change-Id: Iee042d5d10acc6f3a49a56f4dce9d2ef2e102918
2024-04-30 17:29:32 +00:00
Kelvin Zhang
892b51ab7d Move aosp_x86_64 away from non-AB
non-AB is deprecated, move GSI targets to AB updates

Test: th
Bug: 334489639
Change-Id: I96e398c43f594cdc4ac6e20cf9444cb67a80eee3
2024-04-30 09:34:58 -07:00
Kean Mariotti
ee081de947 Enable perfetto persistent tracing
Enable go/perfetto-persistent-tracing for eng builds.

Bug: 325622427
Test: adb shell perfetto --query \
    and check the tracing session 'sysui_persistent' started
Change-Id: Ic655eea67c96faf4fbc67bb1da3c359d50a73ccc
2024-04-30 14:05:04 +00:00
Ted Bauer
ced25ac630 Merge "Add cc_defaults containing libs needed for static linking" into main 2024-04-30 01:20:21 +00:00
Treehugger Robot
15967616ca Merge "Add tool to determine if products can be lunched" into main 2024-04-29 23:57:36 +00:00
Ted Bauer
d724dd04e2 Add cc_defaults containing libs needed for static linking
Bug: 328444881
Test: m
Change-Id: I35cbce94301415381b3ad38d7e5c697f9c010856
2024-04-29 23:41:52 +00:00
Fabián Cañas
29252f8001 Add tool to determine if products can be lunched
This could aid in cleaning unmaintained products from manifests.

Change-Id: Ic1ae4d62711cf27f17c1e4c770f64db074768fd5
Test: lunchable
2024-04-29 22:58:11 +00:00
Pawan Wagh
cc1dd590fd Merge "Fix dependency of system img on boot_otas" into main 2024-04-29 22:22:17 +00:00
Spandan Das
f340066ee3 Align boot jar exclusion with apex_contributions
`RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST` exists to flag apex boot
jars that may exist in source builds, but not in a google apex prebuilt
(a prebuilt might not have been generated yet). This is a build flag, and
exists in the <rel>.scl

It is feasible that certain products in a specific release config
never use apex prebuilts. Therefore, we need to selectively
apply `RELEASE_APEX_BOOT_JARS_PREBUILT_EXCLUDED_LIST` to products that
use apex prebuilts. At ToT, this is done via looking at
module_build_from_source_value of ANDROID soong config namespace, and
<apex>_module soong config namespace for every optional module.

<apex>_module soong config namespace was removed in
https://r.android.com/3056785. In preparation for removing
module_build_from_source, use
`PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS` to determine if
prebuilts are being used.

Test: in internal, lunch barbet-ap2a-userdebug && get_build_var APEX_BOOT_JARS_EXCLUDED
com.android.mediaprovider:framework-pdf com.android.mediaprovider:framework-pdf-v
(this is the only release config where there is a delta between prebuilt
and source apex boot jars)

Test: in internal, lunch barbet-trunk_staging && get_build_var
APEX_BOOT_JARS_EXCLUDED
"" (empty string)

Change-Id: I981ad3a7767f3602a844c8d53eadfd1f2e5db420
2024-04-29 22:06:43 +00:00
Spandan Das
2bdaea7e20 Move coverage builds prebuilt special case to make
Having this in make has the following advantages
- allows this to be used in other places in make that are sensitive to
  prebuilt selection, e.g. apex boot jars that are present in source but
  not in prebuilt apexes
- collocates the various prebuilt special edge cases

Test: presubmits
Test: in internal, lunch cf_x86_64_phone-next-userdebug
Test: EMMA_INSTRUMENT_FRAMEWORK=true get_build_var PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS
true

Bug: 308188056
Change-Id: I3e81b348e9f1e72e6d120a881d37356c413b005b
2024-04-29 21:31:31 +00:00
Treehugger Robot
faeac4d7f7 Merge "Drive instrumentation with build flag" into main 2024-04-29 21:26:55 +00:00
Michael Wright
c791547786 Merge "check-flagged-apis: remove debug print" into main 2024-04-29 20:29:51 +00:00
Michael Wright
cfbcdc1ec5 Merge changes Ia860d7b0,Ie98db767 into main
* changes:
  check-flagged-apis: allow / chars in Symbol names
  check-flagged-apis: add support for methods (no parameters)
2024-04-29 20:29:35 +00:00
Ted Bauer
d19d351148 Drive instrumentation with build flag
Bug: 328444881
Test: m
Change-Id: Iebb250e8a836c77b14fcc6b9536eba90f9da7a4b
2024-04-29 20:12:27 +00:00
Pawan Wagh
bd2d79d311 Fix dependency of system img on boot_otas
If BOARD_16K_OTA_MOVE_VENDOR := true is set BoardConfig,
there is still dependency of system img on boot otas as it is system ota
paths are being added in default installed modules. Add vendor paths
whenever move vendor is set.

Bug: 335022191
Test: m
Change-Id: I19b41e5b9ade50f3cabf43995af36e66e09c6acf
2024-04-29 19:48:26 +00:00
Wei Li
013330b028 Merge "Add license metadata declarations which are moved from device/google/raviole/Android.mk." into main 2024-04-29 18:19:12 +00:00
Gaurav Johari
0c16cb6a66 Merge "Do not fail cogsetup.sh if repo is not in PATH" into main 2024-04-29 17:09:25 +00:00
Treehugger Robot
80c40c4d91 Merge "FakeFeatureFlagsImpl optionally takes defaults via a FeatureFlags." into main 2024-04-29 16:53:28 +00:00
Ted Bauer
d475818504 Merge "Read from new storage in C++ aconfig codegen" into main 2024-04-29 16:47:45 +00:00
Mårten Kongstad
9aef0d9bda check-flagged-apis: remove debug print
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ida3ba78bc240b5aed2382bf5a0ea12e8d1e1d763
2024-04-29 10:35:28 +02:00
Mårten Kongstad
8d74fd0a31 check-flagged-apis: allow / chars in Symbol names
Allow forward slash characters (/) in Symbol names: when adding support
for method arguments, this will be needed.

The current implementation does not change; forward slash conversions to
dots still happen, but now explicitly at the call site of Symbol.create.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ia860d7b0c8703fcc56fec6ea722cf995ccf20cd0
2024-04-28 00:50:11 +02:00
Jeff DeCew
23fbd1e2f6 FakeFeatureFlagsImpl optionally takes defaults via a FeatureFlags.
Bug: 337449122
Flag: test_only
Test: presubmit
Change-Id: I45e2a523b36a6b14627c89ee7deffda711a32f5e
2024-04-27 18:08:45 +00:00
Zhuoyao Zhang
836b9e1ba9 Merge "Add a Clearcut tool event logger" into main 2024-04-27 02:39:21 +00:00
Zhuoyao Zhang
7b11b7106a Add a Clearcut tool event logger
Implement a binary that logs tool events to Clearcut. The binary is designed to be eventually called by the `run_tool_with_logging` script in the `envsetup.sh` script that sets up the build environment.

Only start and stop events are currently logged for each invocation.

Test: atest tool_event_logger_test
bug: 331638854
Change-Id: I9268e4cb986975ceda171204e6ce8ef1732eaeea
2024-04-27 01:01:50 +00:00
Treehugger Robot
0da2fee848 Merge "Revert "Drop cmdgoals special case from prebuilt selection"" into main 2024-04-27 00:23:56 +00:00
Mårten Kongstad
40da97047c check-flagged-apis: add support for methods (no parameters)
Teach check-flagged-apis to parse methods. The implementation is only
half done: method signatures that accept parameters are ignored. A
follow-up CL will add support for these.

check-flagged-apis treats constructors and regular methods the same.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ie98db767289ac2a35aa85371f60ecb3970170d86
2024-04-27 01:51:08 +02:00
Treehugger Robot
3e2f5a0df8 Merge "Restrict aconfig version script to linux" into main 2024-04-26 23:21:54 +00:00
Spandan Das
4049cdb23a Revert "Drop cmdgoals special case from prebuilt selection"
This reverts commit e18b9fee63.

Reason for revert: Likely causing build failures for go/ab/git_aosp-main-with-phones

Change-Id: If01f58908bd66c7afa42b9c96d048dfcd2d70812
2024-04-26 23:08:10 +00:00
Treehugger Robot
8e7c645476 Merge "Drop cmdgoals special case from prebuilt selection" into main 2024-04-26 22:49:14 +00:00
Spandan Das
e18b9fee63 Drop cmdgoals special case from prebuilt selection
Before trunk stable, this check ensured that `docs` and `sdk` builds
contained all the apis provided by an apex. If source apex was used, it
would use the source java_sdk_library. If prebuilt apex was used, it
would use the prebuilt java_sdk_library.

After trunk stable, all release configurations for platform development
use the everything stubs of source java_sdk_library for javac, and
exportable stubs of source java_sdk_library for sdk/docs. The exportable
stubs is aware of the enabled flags for a specific release
configuration.

Since sdk and docs builds use the exportable stubs, we can drop this
special case to use the prebuilt stubs/srcjar files.

Test: presubmits
Test: in internal, lunch cf_x86_64_phone-next-userdebug (currently uses
bt prebuilts)
Test: m docs
Test: aninja -t path docs
out/soong/.intermediates/packages/modules/Bluetooth/framework/framework-bluetooth.stubs.source/android_common/exportable/framework-bluetooth.stubs.source-stubs.srcjar;
still exists after this cl

Bug: 308188056

Change-Id: I65da9f25634f0e8c3d514a4c175f89c3e5eb9712
2024-04-26 20:50:50 +00:00
Jared Duke
a97d385b69 Restrict aconfig version script to linux
Avoid breakage on other platforms.
Bug: 336657207
Test: m

Change-Id: I167dbbe934a133e8f08f630846707870404f62fd
2024-04-26 20:22:12 +00:00
Spandan Das
b951161773 Merge "Make system_server.zip compatible with prebuilt apex builds" into main 2024-04-26 19:47:16 +00:00
Treehugger Robot
d2469987ce Merge "Use a version script for libaconfig_storage_read_api_cc" into main 2024-04-26 19:35:54 +00:00
Wei Li
4d1491db47 Add license metadata declarations which are moved from device/google/raviole/Android.mk.
Bug: 311522698
Test: CIs
Change-Id: I3350590e626f1d6ffe1767e0c6d39384b63d7ad8
2024-04-26 12:24:35 -07:00
Ted Bauer
8e7cfad672 Read from new storage in C++ aconfig codegen
Read from the new aconfig storage backing in C++ aconfig codegen, for
READ_ONLY flags. Log if there is a match with the legacy storage, or a
mismatch, or a failure.

Only enabled if instrumentation is enabled, which will be enabled by a
build flag in a follow-up CL.

Test: m && cargo t
Bug: 328444881
Change-Id: I691dfad8860d8f917e93c5d56dac19f8791de943
2024-04-26 18:45:31 +00:00
Jeff DeCew
cfd7b0df36 Merge "Generate CustomFeatureFlags" into main 2024-04-26 18:39:43 +00:00
Jared Duke
8782e1e858 Use a version script for libaconfig_storage_read_api_cc
Restrict the set of exported symbols to those in the aconfig_storage
namespace by way of a version script. This shrinks the shared lib size
by ~75%, from ~800KB to <200KB.

Bug: 336657207
Test: m
Change-Id: I56044fe667a713cf1d94f96c992f379a5725850f
2024-04-26 17:43:14 +00:00
Ben Fennema
5e6df98fc3 Merge "Allow setting --boot_variable_file in build-ota-package-target" into main 2024-04-26 16:57:53 +00:00
Spandan Das
d22b1390b9 Make system_server.zip compatible with prebuilt apex builds
This artifact contains the system server jars that were used in the
build. At ToT, this was disabled when prebuilts were enabled to prevent
version skew between the system server jars built from source, and the
system server jars deapexed from the prebuilt apex that was installed
into the system image.

With this CL, this artifact is now compatible with prebuilts. If a
google prebuilt apex is used, system_server.zip will contain the .jar
deapexed from that prebuilt. e.g. if art _and_ btservices prebuilts are
enabled, then system_server.zip will contain the prebuilt jars for those
apexes, and sources for others.

This implementation leverages the fact that soong copies the _selected_
system server jars to out/soong/system_server_dexjars for dex2oat. Soong
is aware of source/prebuilts, and populates this directory with the
correct system server jar.

One side effect of this change is that affects the directory structure
of the zip. Previously, service-art.jar will be present in the zip file
at apex/com.android.art/java/service-art.jar. After this change
service-art.jar will be present in the top-level directory of the zip

Bug: 308188056
Test: the zip is not bit-identical, but I checked that the file contents are indentical (discussed below)
Test: unzip out/target/product/vsoc_x86_64/system_server.zip.before -d system_server.before
Test: unzip out/target/product/vsoc_x86_64/system_server.zip.before -d system_server.after
Test: find system_server.before/ -type f -printf '%s\t%p\n' | sort -n | cut -f2- | xargs cat | shasum
Test: find system_server.after/ -type f -printf '%s\t%p\n' | sort -n | cut -f2- | xargs cat | shasum
Test: the shasums are identical

Test: in internal, lunch cf_x86_64_phone-next-userdebug (next uses bt
prebuilts)
Test: m nothing
Test: aninja -t path out/target/product/vsoc_x86_64/system_server.zip <vendor_dir_path>/BluetoothGooglePrebuilt/com.google.android.btservices.apks; path exists

Change-Id: I213150b7ee2b012fd649b308f3c72bebf5ca7bf8
2024-04-26 16:43:52 +00:00
Ben Fennema
f089d9a587 Allow setting --boot_variable_file in build-ota-package-target
For ota generation via build-ota-package-target, match how
--oem_settings works, but for --boot_variable_file.

Bug: 335732867
Test: Set BOOT_VAR_OTA_CONFIG, make dist, and check ota_metadata
Change-Id: I526e2b280eb288f3abaace2a5daac97a0f7ac6d7
2024-04-26 08:38:08 -07:00
Michael Wright
527363c906 Merge "check-flagged-apis: parse classes" into main 2024-04-26 12:48:21 +00:00