Introduce a new option `--allow-partial-ab` in merge_target_files,
which allows merging a non-AB framework with an AB vendor.
The reason for adding this option is to support merging a real
device framework with a cuttlefish vendor. Cuttlefish enables AB
partition by default; however, some real devices do not.
Bug: 318326532
Test: merge_target_files
Test: atest --host releasetools_test
Change-Id: Iaebd06796153fe82fbf56e86fcc8c500b6d60771
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
This jar is part of the com.android.virt non-updatable APEX.
Bug: 323339759
Test: build
Test: boot device
Change-Id: I8090b8bf22d647d5f6c1dd1bf68a6e468b4ac694
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
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
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
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
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
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
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
This should be used to declare that a release config is an alias for
another one. Aliases have no release config files of their own, and are
primarily used to simplify continuous integration as releases happen.
Bug: None
Test: manual
Change-Id: Ife5eb1f8f4bf8e06832dc55bbc390ce2f741ebb8
When overriding a release config, make sure that the overriden config is
fully present (by processing any of its overrides) before overriding it.
Bug: None
Test: manual
Change-Id: I8d29c7ee7208acf7fe63876f617c5b9e2c26c434
Building device_aconfig_declarations creates simplifies listing all
aconfig flags used on the device by creating a build artifact at:
$(OUT_DIR)/target/product/$(TARGET_PRODUCT)/device_aconfig_declarations.pb
Bug: b/308625757
Test: manual
Change-Id: Ic5eef9c6a26f7893b3f4bdfed2cd4ac82a54a8f9
bucket index currently is a field in PackageTableNode/FlagTableNode, but this is
purely aux info that is never searilized or deserialized. Therefore we
should remove it from the struct definition. Instead aconfig should
define a wrapper struct that wraps around an instance PackageTableNode/FlagTableNode
as well as aux info like bucket_index.
Bug: 321077378
Test: atest aconfig.test && atest aconfig_storage_file.test
Change-Id: I20f2565d20b7feb5d39754e91cd6a9affb1f0e70
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: Icfd1707953eba2e29044468ab6728b39d7998048