Commit Graph

96457 Commits

Author SHA1 Message Date
Mårten Kongstad
36402f1c35 aconfig: move all tests to presubmit
The tests added to TEST_MAPPING in aosp/2870454 have now soaked in
postsubmit long enough to be allowed to advance to presubmit.

Bug: N/A
Test: atest --test-mapping $(gettop)/build/tools/aconfig
Test: Treehugger
Change-Id: Ia75c76ae114c16a57c26aafa159560639baea707
2024-02-06 08:21:32 +01:00
Inseob Kim
5653f37337 Use vFRC version as-is for ToT sepolicy version
Minor version hasn't been used. As we are moving to a new versioning
scheme, removing the minor version and using vFRC version as-is to align
with other vendor interfaces.

Bug: 314010177
Test: build and boot
Change-Id: I138c13c798a15cbb52c45cbad68e5a65cb1d0888
2024-02-06 03:56:49 +00:00
Kiyoung Kim
5e2f044232 Merge "Reapply "Rename LOCAL_USE_VNDK"" into main am: 58fe0a3924
Original change: https://android-review.googlesource.com/c/platform/build/+/2949645

Change-Id: I757412e5acde9b5c32c0c456332e88cf5add150e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 01:19:54 +00:00
Oriol Prieto Gascó
4366c21615 Merge "Set the container field of aconfig flags" into main am: 0151f72e00
Original change: https://android-review.googlesource.com/c/platform/build/+/2947281

Change-Id: I001fc69340fffe757ca402d34189b818d13c0737
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 01:18:55 +00:00
Kiyoung Kim
58fe0a3924 Merge "Reapply "Rename LOCAL_USE_VNDK"" into main 2024-02-06 00:57:21 +00:00
Oriol Prieto Gascó
0151f72e00 Merge "Set the container field of aconfig flags" into main 2024-02-06 00:38:04 +00:00
Nikita Ioffe
40cb5a1d84 Merge "Add service-virtualization.jar to PRODUCT_APEX_SYSTEM_SERVER_JARS" into main am: 65146d24b0
Original change: https://android-review.googlesource.com/c/platform/build/+/2946229

Change-Id: Iacf5799a384d4f6bfeea68905d4416c2a6c789be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 23:10:45 +00:00
Nikita Ioffe
65146d24b0 Merge "Add service-virtualization.jar to PRODUCT_APEX_SYSTEM_SERVER_JARS" into main 2024-02-05 22:36:24 +00:00
Evgenii Stepanov
86df591582 Merge "Add missing linker flags for memtag sanitizers." into main am: f6109a1842
Original change: https://android-review.googlesource.com/c/platform/build/+/2945005

Change-Id: I24376ff3f6cdee586e09a0e9ff7eb00988f5ba54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 21:44:31 +00:00
Evgenii Stepanov
f6109a1842 Merge "Add missing linker flags for memtag sanitizers." into main 2024-02-05 21:04:03 +00:00
Zhi Dou
ca5e39904a Merge "aconfig_proto: add doc in aconfig.proto file" into main am: b7d4bedd99
Original change: https://android-review.googlesource.com/c/platform/build/+/2945156

Change-Id: I8d54529a0f690738a32de9d47806b5aaf1e2f0f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 19:12:01 +00:00
Zhi Dou
b7d4bedd99 Merge "aconfig_proto: add doc in aconfig.proto file" into main 2024-02-05 18:37:29 +00:00
Zhi Dou
d43b446ebb aconfig_proto: add doc in aconfig.proto file
This change adds docs in aconfig.proto file and adds more detail in the
error message for bad package, name and namespace.

Bug: 318759389
Test: atest aconfig.test
Change-Id: I0d45495cd864506b2fcc06ad47e3ffbd6caca9fb
2024-02-05 16:41:56 +00:00
Oriol Prieto Gasco
c6343b169b Set the container field of aconfig flags
Test: atest aconfig.test
Bug: 312769710
Change-Id: Ia4e3f97e23d6113446d567db6bc1410c300ea667
2024-02-05 16:30:04 +00:00
Nikita Ioffe
441d359c7b Add service-virtualization.jar to PRODUCT_APEX_SYSTEM_SERVER_JARS
This jar is part of the com.android.virt non-updatable APEX.

Bug: 323339759
Test: build
Test: boot device
Change-Id: I8090b8bf22d647d5f6c1dd1bf68a6e468b4ac694
2024-02-05 13:15:12 +00:00
Kiyoung Kim
454265c233 Reapply "Rename LOCAL_USE_VNDK"
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I2da2e2027ccabbcfbb444abc6828addeb3b22e13
2024-02-05 11:01:41 +09:00
Ziwei Zhang
614a5aea0e Generate 2.0 config for Mobly test.
- Add `v2` suffix for ATS 2.0 config.
- Update the mobly test config template.

Test: m CtsBluetoothMultiDevicesTestCases (with `runner = "mobly"`)
Bug: 299850687
Change-Id: Ic95ecb760989818291f0746054e4f68d12359a9f
2024-02-04 03:18:52 +00:00
Joe Onorato
3e3fab510c Merge "Add build/soong/bin to the paths" into main am: 62bc1b46f1
Original change: https://android-review.googlesource.com/c/platform/build/+/2948203

Change-Id: Ia931d32920c435c2b5360175f94cee7c1395ba51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 00:51:59 +00:00
Joe Onorato
62bc1b46f1 Merge "Add build/soong/bin to the paths" into main 2024-02-04 00:19:21 +00:00
Joe Onorato
84e61d0d07 Add build/soong/bin to the paths
This gives us a good place to put scripts on the PATH instead of adding
more functions to envsetup.sh

Test: GENERATE_SOONG_DEBUG=true m nothing ; soongdbg ...
Change-Id: I3c1a80fc8aae8de548bfe9036dc86fa006fc58c6
2024-02-03 14:44:41 -08:00
Treehugger Robot
5c40932a48 Merge "Revert "Rename LOCAL_USE_VNDK"" into main am: 81c7511fed
Original change: https://android-review.googlesource.com/c/platform/build/+/2946128

Change-Id: I8aef8c9cfc738bda1c68d8e3b9f0dae8f6077356
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 11:19:41 +00:00
Treehugger Robot
81c7511fed Merge "Revert "Rename LOCAL_USE_VNDK"" into main 2024-02-02 10:38:49 +00:00
Kiyoung Kim
0bf6c284e0 Revert "Rename LOCAL_USE_VNDK"
Revert submission 2931430-local_use_vndk

Reason for revert: build fails with barbet targets

Reverted changes: /q/submissionid:2931430-local_use_vndk

Change-Id: I40277cfb26bb4da5dc398b99fc4ab009d91405fc
2024-02-02 08:06:57 +00:00
Treehugger Robot
6c4bf6cccd Merge "Determine GC type based on BUILT_KERNEL_VERSION_FILE." into main am: 639fde3a4d
Original change: https://android-review.googlesource.com/c/platform/build/+/2919905

Change-Id: I4ebb913d032ddf721149114875b182e437e7752f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 03:26:26 +00:00
Treehugger Robot
027c34b501 Merge "Rename LOCAL_USE_VNDK" into main am: 5058eac78b
Original change: https://android-review.googlesource.com/c/platform/build/+/2931430

Change-Id: Ie3b6affe1c49b4c7989a0f4fea5d02cd75a8c7e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 03:26:06 +00:00
Treehugger Robot
639fde3a4d Merge "Determine GC type based on BUILT_KERNEL_VERSION_FILE." into main 2024-02-02 03:01:57 +00:00
Treehugger Robot
5058eac78b Merge "Rename LOCAL_USE_VNDK" into main 2024-02-02 02:48:35 +00:00
Paul Scovanner
c268e33ad3 Merge "Update release team OWNERS for SPL updates" into main am: 67f1b704bb
Original change: https://android-review.googlesource.com/c/platform/build/+/2944754

Change-Id: If40b8d3ab4e0602cda5c404f1ff5b18b49f33709
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 00:50:53 +00:00
Paul Scovanner
67f1b704bb Merge "Update release team OWNERS for SPL updates" into main 2024-02-02 00:21:06 +00:00
Paul Scovanner
55b6567017 Update release team OWNERS for SPL updates
Bug: 323384238
Change-Id: I8d9ea3507b21a68ad2c3b61232d5e91d7f720a7f
2024-02-02 00:15:06 +00:00
Evgenii Stepanov
8566eb0ee8 Add missing linker flags for memtag sanitizers.
This fixes a discrepancy between Make and Soong build systems.
Memtag sanitizers rely on the linker to mark the executable as
requesting heap/stack/globals tagging.

Test: readelf -n <binary> | grep .note.android.memtag
Bug: 322107634
Change-Id: I4a25509ff280e25d14576157903a2bbf162a4895
2024-02-01 11:34:59 -08:00
Jiakai Zhang
53dd895407 Determine GC type based on BUILT_KERNEL_VERSION_FILE.
How it works:
1. build/make/core/Makefile generates a txt file with the kernel
   version, which is taken from an explicit BOARD_KERNEL_VERSION value,
   or extracted from the kernel image on the source tree, or extracted
   from the kernel image extracted from the prebuilt boot.img.
   The file is saved at
   $ANDROID_PRODUCT_OUT/obj/PACKAGING/check_vintf_all_intermediates/kernel_version.txt.
2. If PRODUCT_ENABLE_UFFD_GC is "default", meaning the GC type needs to
   be determined by the kernel version, build/make/core/Makefile copies
   kernel_version.txt to
   out/soong/dexpreopt/kernel_version_for_uffd_gc.txt.
3. build/soong/dexpreopt/config.go writes the the UFFD GC flag to
   out/soong/dexpreopt/uffd_gc_flag.txt. The flag is determined by an
   explicit PRODUCT_ENABLE_UFFD_GC value or by contruct_uffd_gc_flag.py,
   which reads kernel_version_for_uffd_gc.txt and determines the flag
   accordingly.
4. dex2oat takes the UFFD GC flag from uffd_gc_flag.txt.
5. post_process_props.py mangles ro.dalvik.vm.enable_uffd_gc based on
   the same logic.

Bug: 321751629
Bug: 319554951
Bug: 318763448
Bug: 319648491
Test: m --no-skip-soong-tests nothing
Test: atest uffd_gc_utils_test
Test: Build with `OVERRIDE_ENABLE_UFFD_GC=default m` for device with no
  UFFD support -
  1. Check the existence of `-Xgc:CMC` in
     out/soong/dexpreopt_arm64/dex_bootjars/android/system/framework/arm64/boot.invocation
     (dex2oat invocation for a boot image)
  2. Check the existence of `-Xgc:CMC` in
     out/soong/.intermediates/packages/apps/Settings/Settings/android_common/dexpreopt/Settings/oat/arm64/package.invocation
     (dex2oat invocation for an app defined in .bp)
  3. Check the existence of `-Xgc:CMC` in
     $ANDROID_PRODUCT_OUT/obj/APPS/Dialer_intermediates/oat/arm64/package.invocation
     (dex2oat invocation for an app defined in .mk)
  4. Check the value of ro.dalvik.vm.enable_uffd_gc in
     $ANDROID_PRODUCT_OUT/product/etc/build.prop
Test: Build with `OVERRIDE_ENABLE_UFFD_GC=default m` for device with
  UFFD support, and do the steps above.
Test: Build with `OVERRIDE_ENABLE_UFFD_GC=true m`, and do the steps
  above.
Test: Build with `OVERRIDE_ENABLE_UFFD_GC=false m`, and do the steps
  above.

Change-Id: I8df6e5be1644da05d2d5c57b3520f29601dfd7a4
2024-02-01 22:10:33 +08:00
LaMont Jones
4e10abf2f0 Merge changes Ife5eb1f8,I8d29c7ee into main am: 7ba1e17dcc
Original change: https://android-review.googlesource.com/c/platform/build/+/2938283

Change-Id: I35544b38eee0c94d4679759137c4db29ea113000
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 00:30:09 +00:00
LaMont Jones
7ba1e17dcc Merge changes Ife5eb1f8,I8d29c7ee into main
* changes:
  Add alias-release-config function
  Override release configs in depth
2024-01-31 23:45:13 +00:00
Liz Kammer
79effa56c5 Fix cogsetup.sh to work from non-root dirs
Test: source make/envsetup.sh
Change-Id: I36de407dbbb0cf266f1701d0895ba71d3ad41dba
2024-01-31 17:20:13 -05:00
Dennis Shen
06ee44cbd4 Merge "aconfig: update mapped_file" into main am: 0a45b9e89f
Original change: https://android-review.googlesource.com/c/platform/build/+/2940825

Change-Id: I97cdb6da8af0d8417827208d9c4c6fb1556e3471
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 21:20:16 +00:00
Dennis Shen
0a45b9e89f Merge "aconfig: update mapped_file" into main 2024-01-31 20:32:28 +00:00
Treehugger Robot
0d3c6b45d7 Merge "Store metrics for each run of a benchmark." into main am: 0296ef0081
Original change: https://android-review.googlesource.com/c/platform/build/+/2933374

Change-Id: I09dc713074a47e8d672af40238f431d92472f1e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 19:16:57 +00:00
Treehugger Robot
e063d96aeb Merge "Add benchmarks for lunch" into main am: 9918afcb1d
Original change: https://android-review.googlesource.com/c/platform/build/+/2933373

Change-Id: I839067c766ceee24a70dce409c3ef23ea177df2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 19:16:45 +00:00
Dennis Shen
7bb9cda6c4 aconfig: update mapped_file
Minor change to mapped_file module, create utility function to verify
file is readonly and map. Also, update the unit test to create temp pb
file instead of writing to the test dir.

Bug: 321077378
Test: atest aconfig_storage_file.test
Change-Id: Id903ed458613e4aac8d2cbb1664fd8293de1a494
2024-01-31 19:01:56 +00:00
Treehugger Robot
0296ef0081 Merge "Store metrics for each run of a benchmark." into main 2024-01-31 18:44:16 +00:00
Treehugger Robot
9918afcb1d Merge "Add benchmarks for lunch" into main 2024-01-31 18:44:16 +00:00
Dennis Shen
d9e109ee9f Merge "aconfig: create memory map file module" into main am: c4cb665612
Original change: https://android-review.googlesource.com/c/platform/build/+/2933375

Change-Id: Ic72a3a4012ae83ff9e966b15fa9043b74940542d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 17:48:45 +00:00
Dennis Shen
c4cb665612 Merge "aconfig: create memory map file module" into main 2024-01-31 17:10:35 +00:00
Liz Kammer
b9c27853fd Merge "Update benchmarks to handle cog workflows" into main am: 898efbfb78
Original change: https://android-review.googlesource.com/c/platform/build/+/2933372

Change-Id: Ic5a96fb6fb3e1270075e38a6250e724e9b448089
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 15:22:37 +00:00
Liz Kammer
0b7bdeeb9b Store metrics for each run of a benchmark.
Enables a breakdown to understand where time is being spent on each CUJ.

Test: run ./build/make/tools/perf/benchmarks --store-metrics
Change-Id: I28f3f62b2b2c1fd810ecce9238c7177c1eb382d7
2024-01-31 09:49:47 -05:00
Liz Kammer
efb6650d45 Add benchmarks for lunch
Test: ./benchmarks --benchmark full_lunch
Change-Id: Id6be3b41a518d4ca9cad882a913f1dcc59f0d01a
2024-01-31 09:46:05 -05:00
Liz Kammer
898efbfb78 Merge "Update benchmarks to handle cog workflows" into main 2024-01-31 14:35:03 +00:00
Treehugger Robot
73752e933c Merge "aconfig: fix formatting warnings" into main am: 675aef236a
Original change: https://android-review.googlesource.com/c/platform/build/+/2936110

Change-Id: If6dbb38451369fcae3063f983101d8aa7d90f6a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 14:18:33 +00:00
Dennis Shen
19370a0a31 aconfig: create memory map file module
This module is repsonsible for finding the storage file location based on a
pb file and then map these storage files into memory using memmap2
crate. The mapped files are cached in a static hashmap in this module.

Note that memmap2 crate has not been introduced to AOSP yet as a 3p
crate. It is in the process of importing to AOSP ATM. So in src/lib.rs,
we only include this module if we are building the target using cargo.

Also, the test storage files: package.map, flag.map and flag.val are
generated based on the storage test aconfig files in
aconfig/aconfig/tests dir. With aconfig create-cache command first to
produce cache files, and then aconfig create-storage command to create
each storage file.

aconfig create-cache --package com.android.aconfig.storage.test_1 --container system --declarations ./storage_test_1.aconfig --cache com.android.aconfig.storage.test_1.cache

aconfig create-cache --package com.android.aconfig.storage.test_2 --container system --declarations ./storage_test_2.aconfig --cache com.android.aconfig.storage.test_2.cache

aconfig create-cache --package com.android.aconfig.storage.test_4 --container system --declarations ./storage_test_4.aconfig --cache com.android.aconfig.storage.test_4.cache

aconfig create-storage --container system  --cache ./com.android.aconfig.storage.test_1.cache --cache ./com.android.aconfig.storage.test_2.cache --cache ./com.android.aconfig.storage.test_4.cache --file flag_val --out ./flag.value

aconfig create-storage --container system  --cache ./com.android.aconfig.storage.test_1.cache --cache ./com.android.aconfig.storage.test_2.cache --cache ./com.android.aconfig.storage.test_4.cache --file package_map --out ./package.map

aconfig create-storage --container system  --cache ./com.android.aconfig.storage.test_1.cache --cache ./com.android.aconfig.storage.test_2.cache --cache ./com.android.aconfig.storage.test_4.cache --file flag_map --out ./flag.map

Bug: 321077378
Test: atest aconfig_storage_file.test
Change-Id: Id4bd26ce1a2513cdda201b479cec2b8c04faabfe
2024-01-31 13:54:16 +00:00