Commit Graph

96972 Commits

Author SHA1 Message Date
Steven Moreland
8907ad66d1 Reland "Consider non-shipping lunch targets to be future."
This reverts commit b5b8777686.

Reason for revert: reverted in b/348090986

Change-Id: I2cc85dc4bdf9ed3dc2fb4ff77d9dffa3c32dda76
2024-06-26 17:18:41 +00:00
Pechetty Sravani
b5b8777686 Revert "Consider non-shipping lunch targets to be future."
This reverts commit 27f601f5d9.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/348090986. Will be verifying through ABTD before submission.

Change-Id: I55e0880741e543309a7b991d49e59e4fa1f62e53
2024-06-19 07:47:32 +00:00
Steven Moreland
27f601f5d9 Consider non-shipping lunch targets to be future.
Many places in the codebase have checks like this:

    if shipping level > X: do cool thing Y

This is great because it reduces the cost to upgrade and test
old Android devices or refactor their code. However, many
targets, such as the NDK, the SDK, mainline modules, and so on
do not set a shipping level, so they don't get to do the cool
thing Y.

In order to resolve this, we could modify every check to check
the default case. However, this is an invasive change, and it
is not maintainable. Instead, consider non-shipping products to
always be in the future.

In general, Android features are required to be backwards
compatible, so this should always work for things like mainline.

Also note, this means when someone adds a new feature Y like this,
they'll clearly see the impact of it being added everywhere, rather
than on such a small selection of newly shipping devices. This
avoids a risk where a change needs to be run on mainline modules (or
other targets) but is not tested in this configuration from the
start.

Future work: many `ifndef` checks can be cleaned up after this,
or if this approach makes sense, they can be cleaned up in this
CL.

Bug: 339026799
Bug: 279808973
Bug: 333908433
Test: builds of:
- errorprone-trunk_staging
- mainline_modules_sdks-trunk_staging-userdebug
- mainline_modules_x86_64-trunk_staging-userdebug
- ndk
- sdk-trunk_staging-userdebug

Test: too large number gives:
  build/make/core/product_config.mk:598: error: integer greater than 10001 is not supported!.

Change-Id: I17c34267f774ea8b9265e1d798a67af7838715c5
2024-05-24 21:59:35 +00:00
Gaurav Sarode
bdb6b87837 Merge "Fix Automotive GSI RRO configuration" into main 2024-05-24 19:15:13 +00:00
Treehugger Robot
078c1c95c9 Merge "Disable zucchini for all OTAs" into main 2024-05-24 19:03:06 +00:00
Treehugger Robot
6d67f4b600 Merge "Update go.mod and go.work for go 1.22" into main 2024-05-24 18:57:09 +00:00
Kelvin Zhang
d4bdbdced6 Disable zucchini for all OTAs
zucchini failure in OTA is observed. To unblock, disable
zucchini first. After the investigation are done and determined
zucchini is safe to enable, we will turn it back on.

Test: th
Bug: 342523982
Change-Id: I79c245356a356389328c788b3b7977b224e1df6a
2024-05-24 11:02:54 -07:00
Cole Faust
9a6e468646 Update go.mod and go.work for go 1.22
Go 1.22 is more strict about GOPROXY=off, so we need to update the
go.work file to point at local copies of dependencies.

Bug: 330574836
Test: Presubmits
Change-Id: I37dbc821f138fe8977636316ebe3e7986ccdfa0e
2024-05-23 16:28:15 -07:00
Julien Desprez
4caa319d36 Merge "Patch zips makefile to properly use private variables" into main 2024-05-23 23:24:28 +00:00
Gaurav Sarode
b25c2dfc61 Fix Automotive GSI RRO configuration
Skipping config based RRO for automotive GSI builds

bug: 323238313
Test: local build
Change-Id: Ie2b6c5e10633cbd2c60b98738ee0676a49a7d21e
2024-05-23 22:49:49 +00:00
Julien Desprez
fdb60734e9 Patch zips makefile to properly use private variables
Test: m device-platinum-tests, m performance-tests
Bug: 341947105
Change-Id: Ic77d0dc71450f7c97717291e0f998dc53fbb31b1
2024-05-23 11:55:47 -07:00
Vilas Bhat
995902c2e5 Merge "ndk: Remove MALLOC_LOW_MEMORY config for the ndk" into main 2024-05-23 18:44:58 +00:00
Vilas Bhat
d98e1a86f3 ndk: Remove MALLOC_LOW_MEMORY config for the ndk
This switches the ndk to using scudo instead of jemalloc.

Bug: 337242400
Test:
Built NDK and tested lldb-server on both 4k and 16k devices
```
$ cd aosp && mkdir ndk_prebuilts
$ export OUT_DIR=ndk_prebuilts
$ ./build/soong/scripts/build-ndk-prebuilts.sh
$ cp -r ~/aosp/ndk_prebuilts/soong/ndk/sysroot/*
~/llvm-project/toolchain/prebuilts/ndk/releases/r27/toolchains/llvm/prebuilt/linux-x86_64/sysroot/
$ cd ../llvm-project
$ python3 toolchain/llvm_android/build.py
$ adb push out/stage2-install/runtimes_ndk_cxx/aarch64/lldb-server /data/local/tmp/
$ adb shell "getconf PAGE_SIZE"
16384
$ adb shell "strace /data/local/tmp/lldb-server"
<output trimmed>
mprotect(<address redacted>, 16384, PROT_READ) = 0
exit_group(0)                           = ?
+++ exited with 0 +++
```
Change-Id: I982595278d70cb39b9f6c7c8e9b95f12723fc5bf
2024-05-23 18:43:57 +00:00
Dennis Shen
25889d80af Merge "aconfig: remove read api lib's dependency on libbase and liblog" into main 2024-05-23 15:27:16 +00:00
Dennis Shen
a0624828b2 aconfig: remove read api lib's dependency on libbase and liblog
Bug: b/321077378
Test: atest -c
Change-Id: I0bc7780de2123021e1cc9f7a29ca3f7dabebcd40
2024-05-23 12:30:31 +00:00
Treehugger Robot
cfceeceb3a Merge "Remove no-op config." into main 2024-05-22 21:53:02 +00:00
Dennis Shen
7b09e95c89 Merge "aconfig: update storage read api" into main 2024-05-22 20:52:40 +00:00
Dennis Shen
96c8bec5a4 Merge "aconfig: update storage read api" into main 2024-05-22 20:52:40 +00:00
Dan Albert
e35bb7c9b3 Remove no-op config.
This was copied over from when Soong required us to define it in the
properties file, but this is the default and we also don't care.

Bug: None
Test: None
Change-Id: I35311093c83fddcb7c413535fbb50a126b615036
2024-05-22 20:49:53 +00:00
Dennis Shen
70208daaaa aconfig: update storage read api
Bug: b/321077378
Test atest -c

Change-Id: I53fe6c34466f32d5283d0bdbf4736c8ecd20ef99
2024-05-22 19:25:35 +00:00
Dennis Shen
5590478580 aconfig: update storage read api
Update storage read api to not find storage file location from a pb
file, instead directly read from /metadata copy. Previously for
package.map and flag.map, we are reading from the respective RO
partition. Now we are reading from /metadata/maps dir. This has a few
advantages:

1, early flag availability, since /metadata can be mounted much earlier
than mainline modules, so it would make mainline flags availabile even
before mainline modules are mounted.

2, we no longer need to read from a pb file to find where package.map
and flag.map are. Thus the read api can be further simplified and
downsized. With this change, we are able to shrink the cc flag read api
lib size from 171k to 120k.

Bug: b/321077378
Test atest -c

Change-Id: Ic9086fe4c49c139a4d1c66a8d472023a88c9dd17
2024-05-22 19:25:17 +00:00
Cole Faust
22135a0b0c Merge "Show release-config's stderr" into main 2024-05-22 16:58:35 +00:00
Treehugger Robot
802de330d3 Merge "add csv output to format_benchmarks" into main 2024-05-22 16:49:27 +00:00
Treehugger Robot
fe822ece0d Merge "check-flagged-apis: make interfaces inherit from java/lang/Object" into main 2024-05-22 14:18:48 +00:00
Mårten Kongstad
aa41dac8d8 check-flagged-apis: make interfaces inherit from java/lang/Object
When parsing API signature files, check-flagged-apis relies on
ClassItem.superClass to get the parent class of a class or interface.
That method always returns null for interfaces.

When generating api-versions.xml, metalava marks interface classes as
inheriting from java/lang/Object:

  <class name="android/os/Parcelable" since="1">
    <extends name="java/lang/Object"/>
    [...]
  </class>

This confuses check-flagged-apis when comparing data parsed from both
sources, as the symbol signatures will be identical, but the superclass
entries differ. Work around this by explicitly marking all interfaces
as inheriting from java/lang/Object when parsing API signature files.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Icbb8f7d4c3d4232a083289a778b347e33a0856ab
2024-05-22 15:13:54 +02:00
Treehugger Robot
0ea5497ce4 Merge "Export release flag types to soong" into main 2024-05-22 02:26:01 +00:00
Cole Faust
50dc47d13a Show release-config's stderr
Currently, both stdout and stderr are redirected to a file. We want
stderr to be visible on the terminal in case the release config
fails.

Test: m nothing
Change-Id: I1337718fe8f9394be3017cc8b6d76f8dc1a94ef0
2024-05-21 18:16:21 -07:00
Cole Faust
a1848c3833 Export release flag types to soong
Bug: 323382414
Test: Presubmits
Change-Id: I8f91dfe84f9606a8cdbd2ca04013b1c10a146962
2024-05-21 16:53:55 -07:00
Zhuoyao Zhang
1c51c14142 Merge "Fix a bug in run_tool_with_logging script" into main 2024-05-21 20:14:05 +00:00
Treehugger Robot
5b0dfe41b8 Merge "16k: build: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on the ndk target" into main 2024-05-21 18:26:27 +00:00
Zhuoyao Zhang
dfdf19f225 Fix a bug in run_tool_with_logging script
Fix the case when call a tool with run_tool_with_logging with a single
arg start with -- (e.g. adb --help), make sure when we pass that arg
to the logger, it treat it as the value for the --tool_args option
instead of a separate option

Test: atest run_tool_with_logging_test
Test: manually run source build/envsetup.sh and run adb --help and check
the event log is sent to clearcut. Tested with both bash and zsh
Bug: 341382247

Change-Id: I1e09907f267b453cb62876e171064daa021e3d91
2024-05-21 18:10:01 +00:00
Julien Desprez
250a70d366 Merge "Add a new device-platinum-tests zip" into main 2024-05-21 17:15:38 +00:00
Vilas Bhat
2c51ebf669 16k: build: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on the ndk target
Test: Presubmit and manual testing
Bug: 337242400
Change-Id: I89f91566ebe7dcaf8056859549d5769d2f5e936e
2024-05-21 16:33:04 +00:00
Julien Desprez
73378355fa Merge "Add a performance-tests zips for perf tests" into main 2024-05-21 02:57:06 +00:00
Julien Desprez
e28650f4b0 Add a new device-platinum-tests zip
This is meant for platinum tests that require device
signing. They will be migrated out of device-tests.zip

Test: presubmit
Bug: 341719739
Change-Id: Ie30c4bedc2edf4f537deb49099d0e23b4eec2626
2024-05-20 22:58:37 +00:00
Julien Desprez
100f641823 Add a performance-tests zips for perf tests
Test: presubmit, m performance-tests
Bug: 341719739
Change-Id: Ieb3798cf7ded6d8e669ae7cef0ef3e5bf03415b7
2024-05-20 22:57:31 +00:00
Treehugger Robot
d429640373 Merge "Make side of converting refreshmod to a shell script" into main 2024-05-20 22:38:13 +00:00
Treehugger Robot
9f94972ab0 Merge "Clean cruft out of envsetup.sh" into main 2024-05-20 22:38:09 +00:00
Joe Onorato
b9ff8e4205 add csv output to format_benchmarks
Test: format_benchmarks --csv
Bug: 316189534
Change-Id: I9a19861ed1ca6249c6e6ddbed0fcf9574f871d93
2024-05-20 14:23:00 -07:00
Joe Onorato
143f9e0b72 Make side of converting refreshmod to a shell script
Bug: 340648588
Test: refreshmod
Change-Id: Iedbdd31f9a58cb609a826dfe8066c9eff8aa5904
2024-05-20 14:22:20 -07:00
Joe Onorato
1b9ab2903c Clean cruft out of envsetup.sh
Most if it moved to build/soong/bin as standalone scripts

Bug: 340648588
Test: ran the scripts
Change-Id: I69bff94a2293e2563d58d29b12f7926a9229f9d4
2024-05-20 14:22:20 -07:00
Treehugger Robot
49809a3fb0 Merge "Dump the required modules into module-info.json" into main 2024-05-20 17:55:15 +00:00
Hugo Drumond Jacob
faf9b0128c Dump the required modules into module-info.json
Certain applications, like tracking the dependency chain of modules,
knowing the "required" dependencies is required.

In this context, "required" here means the `required` field in
Android.bp files.

Bug: 339193439
Test: Inspect module-info.json for the `required` field
Change-Id: I09977bf71a0a0ae46ea9268ce1faa5c90673bb7a
2024-05-20 18:35:24 +02:00
Joe Onorato
7963591826 Merge "The lunch benchmarks don't have targets, so don't fail." into main 2024-05-20 15:07:04 +00:00
Joe Onorato
159cc8c594 The lunch benchmarks don't have targets, so don't fail.
Bug: 316189534
Test: format_benchmarks
Change-Id: I5b37a99624801a9c8d5f43ded788c8f0721b45f8
2024-05-18 07:58:24 -07:00
Pawan Wagh
c75b3e352b Merge "Add PRODUCT_16K_DEVELOPER_OPTION to product.mk" into main 2024-05-17 22:46:58 +00:00
Treehugger Robot
baf2c6bff2 Merge "Don't reference target-specific variable from dependency list" into main 2024-05-17 21:58:12 +00:00
Pawan Wagh
ea2121dc56 Add PRODUCT_16K_DEVELOPER_OPTION to product.mk
Test: m
Bug: 295035851
Change-Id: I5c7474efe873eca5369790a564ee483967541f6b
2024-05-17 21:41:32 +00:00
Cole Faust
bb1d4a431d Don't reference target-specific variable from dependency list
Apprently target-specific variables are only valid for the body of
the target, not its dependency list, so the dependency on the zip file
wasn't being added.

Bug: 340392832
Test: m, rm file_list.txt and the zip file, m again, and ensure we don't get an error that the zip file doesn't exist
Change-Id: Idaca6606ff24055aa98c78ca1206b587cc1df4d2
2024-05-17 13:56:27 -07:00
Treehugger Robot
a8bb538db6 Merge "Document that ro.dalvik.vm.enable_uffd_gc has a limited lifetime." into main 2024-05-17 20:04:50 +00:00