aboutsummaryrefslogtreecommitdiff
path: root/apex
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-14.0.0_r50' of ↵George Zacharia2024-06-3014-583/+1374
|\ | | | | | | | | | | https://android.googlesource.com/platform/build/soong into u14.0 Android 14.0.0 Release 50 (AP2A.240605.024)
| * Fix non-determinism in prebuilt selection am: f2c1057586 am: d1816e09f0Spandan Das2024-03-041-2/+2
| |\ | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984036 Change-Id: I6062c3ccd1e864bd2d5cd7790957db99b6a76f63 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Fix non-determinism in prebuilt selectionSpandan Das2024-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This relands aosp/2978137 with acknowledgement of soong namespaces. If multiple versions of the prebuilt module sdk share the same soong config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of those prebuilts in a non-deterministic way. This CL uses apex_contributions to make this deterministic. Multiple prebuilts will not be allowed to have their prefer evaluate to true. If this happens, one of the prebuilts must be explicitly declared in apex_contributions. This CL also fixes the special-casing of the top-level java_sdk_library_import in ReplaceDirectDependencies. For framework-foo.v2, it will use BaseModuleName framework-foo instead of SdkLibraryName framework-foo.v2 to determine if the source module has been selected. Test: ran the previously failing cmd of b/327552112 Test: Added a unit test Test: aninja -t query out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar | grep module_sdk is empty (should not cause a regression for 323454855) Change-Id: Id484a41192085c50b7e34ad415c6e195edb0d006
| * | Merge "Some tweaks to the aconfig flag collection logic" into main am: ↵Yu Liu2024-02-293-16/+29
| |\| | | | | | | | | | | | | | | | | | | | | | | | | 6c2cd90232 am: 4782aa50bf Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2983533 Change-Id: I91948e96a5df217441135f631040e80a060197d7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Some tweaks to the aconfig flag collection logicYu Liu2024-02-283-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Output the aconfig flags pb and storage files to /etc 2. Fix a bug where aconfig flags were not collected for java_sdk_library Bug: None Test: manual and unit tests. Change-Id: I0896e91918c1b53c98ac9dc0f4a636f158200891
| * | Merge "Revert "Fix non-determinism in prebuilt selection"" into main am: ↵Spandan Das2024-02-291-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5354483c12 am: 1e9810748e Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984372 Change-Id: Ied7c0c39b23d6187523b31a92c0851c43349149a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Revert "Fix non-determinism in prebuilt selection"Spandan Das2024-02-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2d8884a37757edc6b984e1e073ab5a9e4a85f778. Reason for revert: Build breakage https://groups.google.com/a/google.com/g/android-build-police-core/c/00mM-B9unVg/m/0FxBxpMbAwAJ. The validation does not check for namespace isolation which breaks libtonemap Change-Id: Ieb4d3bc4f3ade856877ebb62a567620f5a1ed08c
| * | | Fix non-determinism in prebuilt selection am: 2d8884a377 am: abd735bb6cSpandan Das2024-02-291-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978137 Change-Id: I460c2a2fbc0b083f95117265eb1addde08d67c8a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Fix non-determinism in prebuilt selectionSpandan Das2024-02-291-2/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If multiple versions of the prebuilt module sdk share the same soong config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of those prebuilts in a non-deterministic way. This CL uses apex_contributions to make this deterministic. Multiple prebuilts will not be allowed to have their prefer evaluate to true. If this happens, one of the prebuilts must be explicitly declared in apex_contributions. This CL also fixes the special-casing of the top-level java_sdk_library_import in ReplaceDirectDependencies. For framework-foo.v2, it will use BaseModuleName framework-foo instead of SdkLibraryName framework-foo.v2 to determine if the source module has been selected. Test: Added a unit test Test: aninja -t query out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar | grep module_sdk is empty (should not cause a regression for 323454855) Bug: TODO Change-Id: I7191200c330c5bcb9d5532006d3c573a60db61cc
| * | Merge "Add sh_binary dependencies to primary abi of the target" into main ↵Riya Thakur2024-02-282-4/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | am: 88c21f567f am: 54905d0584 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2977494 Change-Id: Id1e9d3f6173cc58909fa210138c01483e19ef83a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Add sh_binary dependencies to primary abi of the targetRiya Thakur2024-02-272-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If compile_multilib is set to 'both' for an apex having a sh_binary dependency for which compile_multilib is not set, then the sh_binary dependency should be added for the primary ABI of the target Bug: 325628733,326985291 Test: m Change-Id: Ie9cd12d49f6854c33af3724cb8e2fc3d8b7627a0
| * | Merge "Support aconfig stoage files for apex." into main am: 864fd2f1f5 am: ↵Yu Liu2024-02-212-46/+84
| |\| | | | | | | | | | | | | | | | | | | | | | | | | cd72a6387a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2966056 Change-Id: I86d77269802f6e3f4ef548bc53352edd99acb7f1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Support aconfig stoage files for apex.Yu Liu2024-02-172-46/+84
| | | | | | | | | | | | | | | | | | Bug: 323071835 Test: unit tests and manual build test. Change-Id: I4a1a05b3afdf88058a970040b3f176f36c5c8037
| * | Do not allow to link libbinder from Vendor APEXKiyoung Kim2024-02-201-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libbinder was temporarily allowed to be linked from Vendor APEXes before all other modules are ready to use libbinder_ndk instead. This should be removed before VNDK deprecation. Bug: 301378087 Test: Husky build and boot succeeded Ignore-AOSP-First: Build fix required from plus aosp branch Change-Id: Id32868489a1a5dd0337aa6bdb773d93bc4e5a921
| * | Merge "Add profiling to skip strict updatability allowlist" into main am: ↵Yisroel Forta2024-02-131-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | 9923e80b3d am: 726076e80c Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2960066 Change-Id: Id603a840351953aa01439be9e5bc76d1c2049d2b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Add profiling to skip strict updatability allowlistYisroel Forta2024-02-131-0/+1
| | | | | | | | | | | | | | | | | | Test: presubmit Bug: b/293957254 Change-Id: I9d53f3237ff5f076b8299138e02d991f8881e06f
| * | Merge "Restrict verify_overlaps to pre S modules" into main am: 2dc86ebd3e ↵Spandan Das2024-02-131-5/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | am: 59bb373c64 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2958292 Change-Id: I600d9363357424da25fca6c9280edc593144225b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * Merge "Restrict verify_overlaps to pre S modules" into mainSpandan Das2024-02-131-5/+7
| | |\
| | | * Restrict verify_overlaps to pre S modulesSpandan Das2024-02-131-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The runtime in S and above does not have the same constraints that require the hiddenapi flags to be generated in a monolithic manner. This CL restricts the verify_overlaps to pre S modules. This will filter out hiddenapi signature discrepancies that do not require any action. Test: verify_overlaps diff with this change https://diff.googleplex.com/#key=xxB0ky93hZRn Test: presubmits Bug: 313672880 Change-Id: Ie626a6779fc924563bec90b6c1ab0c7e8b4b23c2
| * | | Merge "Add environment variable UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA" ↵Jihoon Kang2024-02-132-6/+81
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into main am: a0ccab683b am: 4e0e9d3108 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2952892 Change-Id: I58583de88c9363c44b31d6c92c08aa05ef7557b3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Merge "Add environment variable UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA" ↵Jihoon Kang2024-02-132-6/+81
| | |\ \ | | | |/ | | |/| | | | | into main
| | | * Add environment variable UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHAJihoon Kang2024-02-122-6/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA enables user to specify ${codename}.${sha} as min_sdk_version and target_sdk_version in order to support mainline train building into android build. Test: TH Bug: 295905124 Change-Id: I032d464aaa7314520f98b8eafa53d962940075ce
| * | | Merge "apex: skip apex_sepolicy_tests for test apex" into main am: ↵Jooyung Han2024-02-081-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 47f87dddb3 am: ca4c122503 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2954769 Change-Id: Ib98ee2e87450995c8c5c95b558e5ec0e51c24e62 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | apex: skip apex_sepolicy_tests for test apexJooyung Han2024-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test apexes are often configured incorrectly intentionally. Bug: 324005965 Test: m Change-Id: Ifddbca71b46a42cffa9923b0dd66cd5e2d8024e4
| * | | Merge changes Ia899d75e,I9f885ffa into main am: f8c004263a am: 715a3892e1Spandan Das2024-02-071-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2951496 Change-Id: Ic8722106b2013f3d3c9e44a9eac83f28554d8ea5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Use source_module_name to determine the contents of prebuilt apexesSpandan Das2024-02-061-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of instances in apex/ and java/ that rely on the naming convention that the jars exported by prebuilt apexes follow the name of the java_sdk_library_import, minus the prebuilt_ prefix. With muliple module sdk prebuilts in trunk stable, this naming convention might not be valid. Use `source_module_name` instead. ``` prebuilt_sscp_fragment {name: "", contents: ["service-foo.v2"]} java_import {name: "service-foo.v2", source_module_name: "service-foo"}, ``` We should use service-foo and not service-foo.v2 because 1. The prebuilt apex contains service-foo.dex 2. PRODUCT_*JARS will contain service-foo and not service-foo.v2 For clarity, this CL does not drop the current mechanism where prebuilt bcp fragments create a dependency edge to prebuilt java or java_sdk_library imports. There is still some discussion around whether we can remove that completely (b/320711431). If we were to do that, then the Android.bp files will become ``` prebuilt_sscp_fragment {name: "", contents: ["service-foo"]} ``` Bug: 322175508 Test: Added a unit test Test: In internal, lunch cf_x86_64_only_phone-next-userdebug && m nothing # .ninja files identical Test: In internal, created a parallel set of v2 prebuilts of java_sdk_library_import and prebuilt_bcp_fragments for adservices && m nothing # build passes Change-Id: Ia899d75e826fa1a559368d706eaa65835f748d40
| * | Merge "Revert "Print the modules that had strict_updatability_linting set"" ↵Liana Kazanova2024-02-051-2/+1
| |\ \ | | | | | | | | | | | | into main
| | * | Revert "Print the modules that had strict_updatability_linting set"Cole Faust2024-02-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ada543ed86dc4828cecdb937844c6468c872d3e3. Reason for revert: b/323773738 Change-Id: Iaddd35b275392c8d0eb7ce1cc65523467462d7b3
| * | | Merge "Print the modules that had strict_updatability_linting set" into mainCole Faust2024-02-041-1/+2
| |\| |
| | * | Print the modules that had strict_updatability_linting setCole Faust2024-02-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict_updatability_linting imposes requirements on all of a module's transitive dependencies. So you may start getting errors on a module due to some random other module that is hard to track down. Print out the modules that caused the current module to use strict updatability linting so that these errors are easier to debug. Ignore-AOSP-First: The lint code in internal has diverged from AOSP quite a bit now Bug: 323366771 Test: m lint-check Change-Id: I43f2b1adb1ffa5b6e9516694c2bb87c7f94fed7d
| * | | Merge "Determine GC type based on BUILT_KERNEL_VERSION_FILE." into main am: ↵Treehugger Robot2024-02-021-0/+2
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | d8cb9505f8 am: caf3676945 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2919746 Change-Id: Ia47b99536c2198b166ba1b24b7b075069284c044 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Merge "Determine GC type based on BUILT_KERNEL_VERSION_FILE." into mainTreehugger Robot2024-02-021-0/+2
| | |\ \
| | | * | Determine GC type based on BUILT_KERNEL_VERSION_FILE.Jiakai Zhang2024-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: I035ad32233e49e2a30ce11f6c7c318a648511ef8
| * | | | Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into main ↵Treehugger Robot2024-02-022-67/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b370adbdcc am: 4db5f221cc Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2938002 Change-Id: I7b5aea36a8326ffe1a229517fcdafe1229c77d64 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | | Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into mainTreehugger Robot2024-02-022-67/+0
| | |\ \ \
| | | * | | Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSIONKiyoung Kim2024-02-012-67/+0
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current VNDK prebuilts are disabled if BOARD_VNDK_VERSION is not set, but VNDK prebuilts should be enabled even BOARD_VNDK_VERSION is not set because VNDK APEXes should be available from VNDK deprecation. This change removes some restrictions on VNDK prebuilts to enable those from VNDK deprecation. Bug: 316829758 Test: AOSP Cuttlefish build succeeded without BOARD_VNDK_VERSION Change-Id: Id780811dab26f2125097c3efc5b2b4a59416b826
| * | | / soong: Add crt_pad_segment to .so's am: f4ffe0a026 am: dc0e1130acKalesh Singh2024-02-011-0/+4
| |\| | | | | |_|/ | |/| | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2933932 Change-Id: Ic2fc4f3cd8e351e4614d1886df194f2ff3c5b329 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | soong: Add crt_pad_segment to .so'sKalesh Singh2024-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crt_pad_segment adds a NOTE to the ELF which is used by the binoic loader to determine whether it should pad segments when mapping them into the virtual address space, such that there are no gaps between mappings of consecutive segments. This avoids an increase in unreclaimable kernel slab memory usage for VMAs on devices where the runtime-page-size > elf-segment-p_align. Since -fandroid-pad-segment [1] respects -nostdlib used in android platform builds, soong must link in crt_pad_segment to platform shared libraries. For simplicity, link crt_pad_segment everywhere that crtend_so is applicable, ignoring nocrt property, as there is no other reason to track these separately. Example: ❯ readelf -WS /system/lib64/libc++.so [Output simplified] ... Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al ... [ 2] .note.android.pad_segment NOTE 0000000000000288 000288 000018 00 A 0 0 4 ... [1] https://github.com/llvm/llvm-project/pull/77244 Bug: 316403210 Test: readelf -WS <lib>.so Change-Id: Icc06611376cfd5ee4de7281b4134f9f8ffe7ca60 Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
| * | | Merge "Propagate profile_guided requirement of imports to top-level apex" ↵Spandan Das2024-01-313-10/+26
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into main am: f3c63e6743 am: e0d8cb2569 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929189 Change-Id: I995aeca38f5691d58330e2bb99d202946a3e7540 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Merge "Propagate profile_guided requirement of imports to top-level apex" ↵Spandan Das2024-01-303-10/+26
| | |\ \ | | | |/ | | |/| | | | | into main
| | | * Propagate profile_guided requirement of imports to top-level apexSpandan Das2024-01-303-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For prebuilts, the dexpreopt rules of system server jars are now generated from the context of the top-level prebuilt apex and not in the context of the shim java_import modules. Since `dex_preopt.profile_guided` property is defined in java_import, this needs to be bubbled up to the top-level apex. This will be done using deapxerInfo. If profile_guided of a transitive java_import is true, the deapexed .prof file will be set as dexreopter.inputProfilePathOnHost before invoking dexpreopter.dexpreopt. This ensures that only that java_import undergoes profile guided dexpreopt, and not every other transitive java_import Test: go test ./apex -run TestPrebuiltStandaloneSystemserverclasspathFragmentContents Test: lunch cf_x86_64_only_phone-next-userdebug && m $ANDROID_PRODUCT_OUT/system/framework/oat/x86_64/apex@com.android.art@javalib@service-art.jar@classes.odex Test: du -sh $ANDROID_PRODUCT_OUT/system/framework/oat/x86_64/apex@com.android.art@javalib@service-art.jar@classes.odex 24K Bug: 308790457 Change-Id: Ibf46ecb400b3f126b243fc8d27b08d9a1aa4cc97
| * | | Merge "Fix the args used to dexpreopt system server jars in prebuilt apexes" ↵Treehugger Robot2024-01-263-0/+13
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into main am: 5a48d4fe3d am: 33605c3fab Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2925197 Change-Id: I1d676c37a8e8f611d612d00d68dab2dda8db0f50 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Merge "Fix the args used to dexpreopt system server jars in prebuilt apexes" ↵Treehugger Robot2024-01-263-0/+13
| | |\| | | | | | | | | | | | | into main
| | | * Fix the args used to dexpreopt system server jars in prebuilt apexesSpandan Das2024-01-263-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For prebuilts, java.dexpreopt gets called twice 1. in the context of the top-level prebuilt apex 2. in the context of the java_library shim Only the artifacts of (1) get installed. The artifacts generated by 2) are unused. However the args used to generate the artifacts of (1) are incorrect. It uses moduleName(ctx) to do special-handling of apex system server jars. This special-handling does not happen in (1), so although dexpreopt artficats get generated, they get generated with the wrong args. To fix this, add an additional parameter in java.dexpreopt to pass the libraryName explicitly. Details - Delete moduleName function. This was used to determine the java library name, which is no longer safe - Add a libraryName parameter to java.dexpreopt - Most module types will use j.Name() as libraryName - prebuilt_apex and apex_set will iterate over its `contents` and use each element as libraryName when invoking java.dexpreopt With the correct args passed from (1), we can drop j.dexpreopt from (2) completely. Dropping (2) also breaks profile guided dexpreopt tests. These currently operate on (2). They will be moved to (1) in the next CL of this stack. Test: presubmits Test: lunch cf_x86_64_auto-trunk_staging-userdebug && m nothing (this was a postsubmit failure with aosp/2923733) Test: art_standalone_dexpreopt_tests on next https://android-build.corp.google.com/builds/abtd/run/L86000030001579256 Test: art-gtest on git_master-art-host https://android-build.corp.google.com/builds/abtd/run/L07800030001550262 Bug: 308790457 Bug: 322255144 Change-Id: I8eb604c82f1fa5289d3cd1a20084d56e4d7485e3
| * | | Merge "Move ApexBundleInfoProvider from apex/ to android/" into main am: ↵Spandan Das2024-01-262-11/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8ed589800c am: fb5d0ea59f Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929188 Change-Id: I0dc2d6e2f2a9eab5aebecc04bd151de0ca78e7b8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Merge "Move ApexBundleInfoProvider from apex/ to android/" into mainSpandan Das2024-01-252-11/+5
| | |\|
| | | * Move ApexBundleInfoProvider from apex/ to android/Spandan Das2024-01-252-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provider contains information about the contents of an apex and is set during the post deps phase of top-level source and prebuilt apexes. java.dexpreoptDisabled needs to distinguish between platform and apex variants of a library to prevent creating duplicate ninja rules. It does so by looking at ApexInfoProvider. This provider gets set on the ctx of the java_library being dexpreopted. In case of prebuilts, these rules are being moved to the top-level prebuilt apexes. Move ApexInfoBundleProvider from apex to android so that java.dexpreoptDisabled can consume this provider without running into a golang circular dependency. (java.dexpreoptDisabled will use this provider in the next CL of this stack). Test: go build ./android ./apex Change-Id: I665abd9d0591eeb17b273cc822beb20690e6af09
| * | | Merge "Convert coverageMutator to a TransitionMutator" into main am: ↵Colin Cross2024-01-251-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e28cdf362e am: b45435793a Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923152 Change-Id: I33c91aad017a54b077582b7c836b97b86d6091fe Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| | * | Merge "Convert coverageMutator to a TransitionMutator" into mainColin Cross2024-01-251-1/+1
| | |\ \
| | | * | Convert coverageMutator to a TransitionMutatorColin Cross2024-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert coverageMutator to a TransitionMutator as a step towards variants-on-demand. Bug: 319288033 Test: coverage_test.go Test: treehugger coverage builds Change-Id: Ic50c0040dea8b42c36b5d784221daa00b7b0d379