Commit graph

81288 commits

Author SHA1 Message Date
Treehugger Robot
ac45b4bc63 Merge "Move ELF build-id reader into a separate library." into main 2024-03-20 00:13:10 +00:00
Jihoon Kang
6e739b9b4d Merge "Propagate intermediateCacheFiles in java modules and filegroup" into main 2024-03-20 00:08:50 +00:00
Spandan Das
a8ad9bbd4f Merge "Use RELEASE_DISABLE_VERIFY_OVERLAPS_CHECK to disable verify_overlaps" into main 2024-03-19 23:23:53 +00:00
Spandan Das
07145109ff Use RELEASE_DISABLE_VERIFY_OVERLAPS_CHECK to disable verify_overlaps
This build flag will be used to disable the check when prebuilts are
used in internal main. For backwards compatibilty,
RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE can also be used to disable
this check.

Test: m nothing
Bug: 328200369
Change-Id: I710811995723e75bea9de1ce5c77504f66cbcf45
2024-03-19 21:32:19 +00:00
Jihoon Kang
705e63e362 Propagate intermediateCacheFiles in java modules and filegroup
This change propagates the intermediateCacheFiles generated by the
aconfig_declarations to the static rdeps that are java modules or the
rdeps that are filegroups.

Test: m nothing
Bug: 329284345
Change-Id: I02431336c1aa0378d03248f3bb6edf2f57ec3b7f
2024-03-19 20:54:05 +00:00
Treehugger Robot
97409cd9a2 Merge changes I7a102fa1,Ic3156e53 into main
* changes:
  [cc:riscv64] change -munaligned-access to -mno-strict-align
  Fully document all the riscv64 flags.
2024-03-19 17:42:45 +00:00
Cole Faust
3e8bd45638 Merge "Handles if a space is encountered while parsing the rule" into main 2024-03-19 17:21:02 +00:00
Pirama Arumuga Nainar
0593537f58 [cc:riscv64] change -munaligned-access to -mno-strict-align
Bug: http://b/327307773

cd071253c7 removed -munaligned-access

Change-Id: I7a102fa1cdc49564cb0b724e6f177d33b3636f55
Test: presubmit
2024-03-19 16:28:31 +00:00
Treehugger Robot
84fedd36a4 Merge "Revert^9 "Enable dex container (DEX v41) for the whole system"" into main 2024-03-19 01:20:15 +00:00
Treehugger Robot
e430878f48 Merge "Generate wrapper lib.rs with one module per sysprop file." into main 2024-03-18 22:41:05 +00:00
Yu Liu
73cf0e87b4 Merge "Support rust in aconfig mode validation." into main 2024-03-18 20:49:35 +00:00
Elliott Hughes
c2600464c7 Fully document all the riscv64 flags.
In particular, make it clearer when/how we can remove each of them.

Change-Id: Ic3156e53ea56479324781fea737390588bc086b5
2024-03-18 19:37:13 +00:00
Andrew Walbran
acd75d2b50 Generate wrapper lib.rs with one module per sysprop file.
This required moving to a SourceProvider for the Rust library. With the
previous approach only the first input file was being used.

Bug: 270547306
Test: Built libplatformproperties_rust, looked at output
Change-Id: I1070655abc071e099a42bc4be61cc080902e31c1
2024-03-18 19:02:04 +00:00
Yuncheol Heo
113654faca Revert^9 "Enable dex container (DEX v41) for the whole system"
This reverts commit b92a4e1ca9.

Reason for revert: tracking the test failure b/329907267

Change-Id: Id3fa8471f073e0ec705fd0aba653b032ff82f9ad
2024-03-18 17:41:12 +00:00
Spandan Das
c36d579c2b Merge "Support mechanism to select a specific version of module sdk prebuilt" into main 2024-03-18 15:55:51 +00:00
Spandan Das
e4c911e6fc Support mechanism to select a specific version of module sdk prebuilt
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
2024-03-16 01:41:12 +00:00
Peter Collingbourne
941ff1dbc7 Move ELF build-id reader into a separate library.
Bug: 328702178
Change-Id: I188a8d20d22e67e4f0c7e3441e3781fff369c828
2024-03-15 17:07:36 -07:00
Treehugger Robot
ce1b16313e Merge "Create rule to generate the exportable api files when checkapi is disabled" into main 2024-03-15 23:58:13 +00:00
Jihoon Kang
36c3d96b65 Create rule to generate the exportable api files when checkapi is disabled
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
2024-03-15 22:30:56 +00:00
Cole Faust
718804dd84 Merge "Remove SandboxingDenyPathList" into main 2024-03-15 21:35:36 +00:00
Treehugger Robot
f7db7153a3 Merge "rustc-1.76.0 Build 11569723" into main 2024-03-15 20:36:23 +00:00
Cole Faust
e762b94fe7 Remove SandboxingDenyPathList
It's no longer used.

Bug: 307824623
Test: m nothing --no-skip-soong-tests
Change-Id: I181de9d852f4025c6c5829cc4941ffb705f7cb50
2024-03-15 19:50:03 +00:00
Yu Liu
c888460e5d Support rust in aconfig mode validation.
Bug: 323071835
Test: Unit tests
Change-Id: I6de2a6fe1618e21c9aab728e6d77c6b0c6ce33df
2024-03-15 18:48:38 +00:00
Cole Faust
b9ae285b55 Merge changes from topic "import_make_staging_dir" into main
* changes:
  Add include_make_built_files
  Don't use zip files when creating filesystems
2024-03-15 17:34:26 +00:00
David Srbecky
d10d54af71 Merge "Revert^8 "Enable dex container (DEX v41) for the whole system"" into main 2024-03-15 15:42:48 +00:00
Jeongik Cha
8b0192d031 Merge "//visibility:any_partition can be used with another visibility field" into main 2024-03-15 02:51:00 +00:00
Treehugger Robot
f34748af55 Merge "Delete jmod workDir" into main 2024-03-15 02:35:04 +00:00
Jeongik Cha
31be352612 //visibility:any_partition can be used with another visibility field
Bug: 321000103
Test: m nothing
Change-Id: I2f65ff4d51c65f974e2dc79c94dfefe180ddbfe4
2024-03-15 10:19:23 +09:00
Cole Faust
7ef61d76f8 Delete jmod workDir
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
2024-03-14 18:15:28 -07:00
Treehugger Robot
f1ffd090e7 Merge "Make select statements work on path properties" into main 2024-03-14 23:52:24 +00:00
Cole Faust
4a2a7c98f6 Add include_make_built_files
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
2024-03-14 16:40:42 -07:00
Cole Faust
3b806d3b88 Don't use zip files when creating filesystems
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
2024-03-14 16:40:30 -07:00
Cole Faust
bdd8aeeb58 Make select statements work on path properties
Fixes: 329711542
Test: go test
Change-Id: I71f489c26c535174e226e4a9ab449cc2b4bee83a
2024-03-14 15:24:09 -07:00
Treehugger Robot
4e4939665e Merge "Generate info about the selected app variant in platform builds" into main 2024-03-14 22:05:43 +00:00
Treehugger Robot
f11f786571 Merge "Add exports for JDK 21 to Kythe extractor" into main 2024-03-14 18:43:02 +00:00
Yu Liu
f509eba41d Merge "Validate aconfig libs are built with the correct modes." into main 2024-03-14 18:39:12 +00:00
Spandan Das
3490dfd23f Generate info about the selected app variant in platform builds
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
2024-03-14 18:12:30 +00:00
Treehugger Robot
119bb1b21d Merge "gen_parsers_and_formatters.rs is no longer generated." into main 2024-03-14 17:40:47 +00:00
Sorin Basca
79b7ca1e7a Add exports for JDK 21 to Kythe extractor
Change-Id: Ie977f08f8aee59ea21dcbfe7c9c07dc0dc535775
Fixes: 328877412
Test: TH
2024-03-14 16:59:49 +00:00
Jooyung Han
ed9005b556 Merge "Clean up LLNDK stubs" into main 2024-03-14 03:58:14 +00:00
Jooyung Han
2b8b2b2064 Merge "ndkstubgen: use llndk=<version> for new llndk stub" into main 2024-03-14 01:48:36 +00:00
Jooyung Han
33eb615eb0 ndkstubgen: use llndk=<version> for new llndk stub
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
2024-03-14 06:06:26 +09:00
James Farrell
e288cdeda1 rustc-1.76.0 Build 11569723
Bug: https://issuetracker.google.com/issues/327204642
Test: m rust
Change-Id: I3b39a12d1379a9193d348b364897d7df9de16330
2024-03-13 19:47:51 +00:00
David Srbecky
b92a4e1ca9 Revert^8 "Enable dex container (DEX v41) for the whole system"
This reverts commit 43668c6f13.

Reason for revert: Reland

Bug: 317744117
Bug: 329465418
Test: Device boots
Change-Id: I4b0478030c6a4980f33087ec5764018295691bac
2024-03-13 18:49:34 +00:00
Kalesh Singh
9f38694fc3 Merge "soong: ldflags: Add separate-loadable-segments" into main 2024-03-13 18:41:14 +00:00
Yu Liu
ee37914529 Merge "Store the changed_inputs field in build.trace." into main 2024-03-13 15:54:13 +00:00
Treehugger Robot
eb0f771676 Merge "Let header ABI checker load core variants' version scripts" into main 2024-03-13 02:09:59 +00:00
Spandan Das
86cc1e896b Merge "Generate info about the selected apex variant in platform builds" into main 2024-03-13 01:13:21 +00:00
Kalesh Singh
fa1ebf5943 soong: ldflags: Add separate-loadable-segments
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>
2024-03-12 17:04:50 -07:00
Treehugger Robot
66e8a75700 Merge "Add defaults support for apex_contributions module type" into main 2024-03-12 20:35:12 +00:00