This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/53721efb-c49e-4ce8-b96c-fd03598b4202).
Change-Id: I197b03b650bc6c22ff3c5eb9605522fd9650e98f
The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored
Bug: 308187268
Test: m nothing on aosp,google and google_fullmte devices
Ignore-AOSP-first: CL topic does a cleanup of an internal only denylist
Change-Id: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
Merged-In: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
(cherry picked from commit f3df7305d653471c70d131177e773b4723247e3a)
This CL is the platform_compat_config equivalent of aosp/2928483.
{prebuilt_}_platform_compat_config are collated by
`global_compat_config` via a singleton. The collated data is then used
in some CTS tests. At ToT, we ensure that the collation ignores the
platform_compat_config of prebuilt when source is selected, and vice
versa.
With trunk stable, multiple versions of prebuilt apexes and prebuilt
platform compat configs might exist in the tree. This CL uses
`Source_module_name` to hide the platform compat configs of the
unselected prebuilt apexes.
Bug: 322175508
Test: Added a unit test
Change-Id: Iafdde8fc0458b37b3ccde25433070936f144915c
WITHOUT_CHECK_API environment variable enables the checkapi to be
removed from the critical path. The variable is rarely used within AOSP,
but the downstream vendors may depend on it, in order to improve the
build performance given that the api signature file through metalava is
a resource costly task.
Currently, the exportable api files / removed api files are not
generated when checkapi is disabled, but a module may depend on the
exportable api files when a checkapi is disabled. In order to prevent
the missing build rules error in this case, generate the rule to copy
the checked in api file / removed api file to the exportable api file /
removed api file to prevent build errors.
This change also fixes the error message when the OutputFiles(string)
api file is null, to correctly inform the user the error.
Test: m BUILD_FROM_SOURCE_STUB=true WITHOUT_CHECK_API=true && inspect ninja path and verify that "non-updatable-exportable-current.txt" depends on the generated exportable api file.
Bug: 329374072
Change-Id: I24f88d450fb46b6ea9d5920d83617d8228edd34b
Files in this directory aren't exposed to the rest of the build, so
deleting them saves some space. The `jmod create` command was also
producing non-deterministic files, which are not relevant because
they're not used anywhere else, but it makes it easier to find
non-determinism that matters if we delete them.
Test: Presubmits
Change-Id: I5d57826b438368f24a7a2a7ab1ccd6c16f240124
If `include_make_built_files` is set to the name of a partition, the
make-built files from that partition will be incorperated into this
soong module. This is to ease the transition to soong built filesystems.
If any files are present in both the soong-built file list and the
make-built one, the soong ones will be preferred.
Bug: 329146343
Test: go test
Change-Id: I456b283e1189116e699ed75357cc056f5d217688
The end result is a directory that's passed to build_image, so zipping
and then unzipping image contents will unnecessarily slow things down.
Bug: 329146343
Test: m microdroid --no-skip-soong-tests
Change-Id: I98223c60e8144d6c707832fcc03ba8fe94467e7b
This is a followup to aosp/2999198 and adds information about apps.
Each app will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional
Implementation details
- Move prebuiltInfoProvider out of build/soong/apex to
build/soong/android. This allows build/soong/java to use it.
- Introduce a new `prebuilt_info` prop to `android_app_set` and
`android_app_import`
- All app module types will set a prebuiltInfoProvider in
GenerateAndroidBuildActions, including the source app module types
Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 317K Mar 11 23:46 out/soong/prebuilt_info.json
Test: #modified trunk_staging.locally to select prebuilts of some
mainline apps. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately
Bug: 327480225
Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
We want LLNDK symbols to be explicitly marked with llndk tag to
handle LLNDK freezing which happens before SDK freezing. If symbols
need to be frozen as LLNDK, those symbols must be marked explicitly with
correct vFRC version.
In the following example,
LIBFOO { # introduced=35
foo;
bar;
bar; # llndk=202404
baz; # llndk=202404
qux; # llndk=202505
};
NDK libfoo will have foo and bar while LLNDK libfoo stub will have bar
and baz for 202404.
Bug: 329012338
Test: test_ndkstubgen test_symbolfile
Change-Id: I384f589b240fa047e8871964bf9550f426024dfc
To suport >4KB page sizes, the loader may extend LOAD segment mappings
to be contiguous in the virtual address space. This is done in order to
reduce the use of unreclaimable kernel slab memory for the otherwise
necessary gap VMAs (when the runtime-page-size < ELF-segment-p_align).
Such mappings may beyond the end of the backing file when extended;
which breaks the common userspace assumption that file memory maps are
entirely backed by the underlying file.
Existing apps (not yet updated for larger page size support) may
encounter breakages if they parse /proc/self/[s]maps and use the
[start, end] addresses to operate on system libraries that have
crt_pad_segment optimization (VMA extension) [1].
In order to avoid breaking exisiting apps, update the build system to
ensure the platform ELFs' segments are entirely backed by the file
even when the VMA is extended to be contiguous with the subsequent
segment's. This is achieved using the linker flag
-z separate-loadable-segments, which inserts enough padding (zeros)
to also align each segment's offset on file by it's p_align
(max-page-size).
Although laying out the ELF segments on disk to respect the p_align
causes an increase in the file's apparent size (i_size), on Android the
actual disk usage increase is not significant due to most of the padding
being zero blocks which don't get alloacted in the read-only partitions.
The following results were obtained on an ARM64 device on a recent
git_main build:
No Separate Separate Delta Delta % Partition
Loadable Loadable
Segments Segments
4208.90MB 4214.6MB 5.70MB 0.14% All RO Partitions
Note: The overhead of -z separate-loadable-segments is minimized by the
fact that ARM64 android already builds with -z separate-code. [2]
[1] https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/arch-common/bionic/crt_pad_segment.S
[2] 733198152d:build/soong/cc/config/arm64_device.go;l=53
Bug: 328797737
Test: Manually test previously crashing application
Change-Id: Icb14ad10b5c9282855d54c7945b065b7b4184163
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
out/soong/prebuilt_info.json will contain information about whether
source or prebuilt of an apex was used. If prebuilt is used, it will
print the path to its prebuilt_info file. This file will be
used to pick a matching set of MTS test prebuilts.
Each apex will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional
Implementation details
- Introduce a new `prebuilt_info` prop to `apex_set` and `prebuilt_apex`
- All apex module types will set a prebuiltInfoProvider in
GenerateAndroidBuildActions, including the source apex module types
- Create a `apex_prebuiltinfo_singleton` that visits all apex modules.
It uses `IsHideFromMake` to filter out the unselected variants of a
specific apex. This new singleton will create prebuilt_info.json
- Dist prebuilt_info.json for droidcore
Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 25K Mar 11 23:46 out/soong/prebuilt_info.json
Test: #modified trunk_staging.locally to select prebuilts of some
mainline modules. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately
Bug: 327480225
Change-Id: I65c73010142b034ad1d2b3d05ef493be034e8d74
So far we created {"", "current"} stubs for LLNDK modules. But we don't
need "current" because "" itself is a stub.
This change only removes unused LLNDK stub modules with "current"
version, which aren't used at all.
Bug: 329183083
Test: m blueprint_tests
Change-Id: Ib8e880b6d88952b489657ea1ac557a48afe562a4
Header ABI checker dumps the ABI from core variants and filters it by
version scripts. Ideally it should load different version scripts for
LLNDK, NDK, APEX, etc, but the build rules have not been completed. The
current solution is to load core variants' version scripts. It works
for every existing library because a library's variants share one
version script.
Test: make
Bug: 329078703
Change-Id: I4e26275e24daf93c7d3bb7e70b542a1197ae2129
This reverts commit 90c2af97ed.
Reason for revert: Includes too many flags. The on-device copy of aconfig declarations must be **only** those that are used by code on the device. `all_aconfig_declarations` is every aconfig flag in the source tree, and cannot be placed on the device.
Change-Id: Id7ac61c0805825b4ca27fffe84a48f95e3c682b2
This reverts commit b832ae19d8.
Reason for revert: Reland Switch to JDK 21 when related issues are resolved.
Bug: 313924276
Change-Id: Ibb5031d9892d1ddc5bc4d2af9885c3192b8ac8ad
Test: TH
This rule should be able to work with OUT_DIR set as absolute path,
which is used in "development/tools/ndk/update_ndk_abi.sh".
The problem appears if sysprop file itself is generated and
"syspropFile.String()" returns an absolute path, which is not accepted
as path component for "PathForModuleGen".
The fix is to use "android.GenPathWithExt" like in "syspropJavaGenRule".
Fixes: 328506541
Test: TreeHugger
Test: development/tools/ndk/update_ndk_abi.sh
Change-Id: Ia1e9a0ad51ebd957be97c48f5e1cf0e06a0da0ee