Commit graph

81312 commits

Author SHA1 Message Date
Jihoon Kang
5a87a9ac1c Merge "droidstubs depend on the combined last api filegroup modules" into main 2024-03-21 17:34:00 +00:00
Rico Wind
bd71657e91 Merge "Add flag for optimized resource shrinking with R8" into main 2024-03-21 14:45:13 +00:00
Rico Wind
a2fa263786 Add flag for optimized resource shrinking with R8
If the flag is set we will:
 - pass --optimized-resource-shrinking to the r8 invocation
 - use non final fields for the generated R classes
 - not pass the aapt2 generated proguard rules, R8 will do the tracing of xml files

Bug: 325905703
Test: This is simply passing the flag through to R8, this is off by default
Change-Id: Ib2043f3201578c3bcd39c1de9a524fd78f6d795c
2024-03-21 12:33:53 +01:00
Treehugger Robot
b291690bc4 Merge "Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType" into main 2024-03-21 02:47:59 +00:00
Cole Faust
e6ea0399a9 Merge "Add more specific partition visibility rules" into main 2024-03-20 21:50:26 +00:00
Spandan Das
159b264873 Export JavaBootLibsSdkMemberType and JavaSystemserverLibsSdkMemberType
build/soong/sdk will use these tags to differentiate the sdk and non-sdk
contents of bootclasspath and systemserverclasspath fragments.

Test: go build ./java
Bug: 326246905

Change-Id: Ia8352c09fcbbca06988eb57153e5986801eb45a5
2024-03-20 21:41:49 +00:00
Jihoon Kang
748a24dd6e droidstubs depend on the combined last api filegroup modules
This change creates a "combined" filegroup module, which will contain
all api files of the subset api scopes in the followup change. In this
change, the "combined" filegroup is identical to the currently existing
last api filegroup module in that it only contains the api file /
removed api file of the specific api scope.

This change also passes the "combined" filegroup to the droidstubs
module generated from the sdk_library modules, but this currently does
not lead to any functional changes as the "combined" filegroup is
identical to the currently existing last api filegroup.

Test: m nothing --no-skip-soong-tests
Bug: 321827591
Change-Id: If73a7229f2f970f7e74cd010a8b4808dc9018344
2024-03-20 21:29:39 +00:00
Treehugger Robot
f586a2582d Merge "[cc:riscv64] Do not pass -mno-strict-align while linking" into main 2024-03-20 20:29:20 +00:00
Yu Liu
8426848ade Merge "Pass "--container" to aconfig create-cache" into main 2024-03-20 18:29:45 +00:00
Cole Faust
9a24d90936 Add more specific partition visibility rules
//visibility:any_system_partition, //visibility:any_vendor_partition,
etc.

Then, if a partition visibility rule is not specificed, but the module
is installed on a non-system partition via the `vendor: true` or other
properties, the visibility rule for that partition will be added by
default.

This is so that "any_partition" doesn't imply that modules could be put
on the vendor partition when they weren't designed for that, and so that
modules that do need to go on the vendor partition don't need to specify
both vendor: true and visibility:any_vendor_partition.

Eventually, the partition properties should be deprecated, and replaced
with just these visibility rules.

Bug: 321000103
Test: go tests
Change-Id: I24dba36bbc20921941f892480bf7c050e93827c6
2024-03-20 10:55:05 -07:00
Pirama Arumuga Nainar
950e8c97fe [cc:riscv64] Do not pass -mno-strict-align while linking
Bug: http://b/327307773

Newer clang rejects this flag as unsupported.  It is not necessary while linking because the flag is passed as an IR feature.

Change-Id: I781afd913be7c07612196e736c3ae58773791071
2024-03-20 17:25:20 +00:00
Elliott Hughes
bc7c97b15b Merge "Defer to clang for --hash-style." into main 2024-03-20 16:47:40 +00:00
Elliott Hughes
b48fb83936 Defer to clang for --hash-style.
We fixed the clang driver to "do the right thing" based on target api level years ago, but these manual workarounds predate that (or were copy & pasted from places that predated that). We don't need them any more.

See https://github.com/android/ndk/issues/2005 for more detail.

Change-Id: I995741b8606e389e8de8272f1cc532624516245a
2024-03-20 14:50:26 +00:00
Treehugger Robot
1845175d61 Merge "Add aliases property for renaming Rust dependencies." into main 2024-03-20 12:27:53 +00:00
Treehugger Robot
bd339315ca Merge "Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag" into main 2024-03-20 11:33:11 +00:00
Jihoon Kang
0216805aae Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag
Currently, the "exportable" stubs and the api files are copied to the
dist directory during SDK builds regardless of the value of the
RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag. This change modifies
such behavior that the "exportable" artifacts are copied to the dist
directory only when the RELEASE_HIDDEN_API_EXPORTABLE_STUBS flag value
is set to true.

Test: lunch aosp_arm-trunk_staging-eng && m sdk dist and inspect ninja graph to verify that the "everything" artifacts are copied to the dist directory
Bug: 330417789
Change-Id: I3b83375610eb172d7b9da7ea831a74cd427b696c
2024-03-20 07:45:29 +00:00
Treehugger Robot
1f4ffda2ed Merge "Support multilib property for cc_genrule" into main 2024-03-20 02:38:30 +00:00
kellyhung
750334a0c0 Support multilib property for cc_genrule
Change genrule Out to `android:"arch_variant"` for supporting
multilib variants.

Bug: 323295272
Test: go test -run TestMultilibGenruleOut

Change-Id: I102d64b45a5a2a5193f813001fc32da0d1fe9d36
2024-03-20 09:25:41 +08:00
Treehugger Robot
5c0a491e0a Merge "Add aconfig flag support for android_library" into main 2024-03-20 01:23:50 +00:00
Treehugger Robot
064b145365 Merge "Change java stem attribute for both device and host" into main 2024-03-20 01:05:50 +00:00
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
Jihoon Kang
9049c2725a Add aconfig flag support for android_library
This change adds the support that was added to android_app in
https://r.android.com/2854663 for android_library modules.

Implementation details:
- Move `Flags_packages` to aaptProperties, so that it can be utilized
  for both android_app and android_library.
- Wrap `VisitDirectDeps` of aconfig_declarations to a function that
  takes a ModuleContext as an input, so that it can be utilized in the
  `GenerateAndroidBuildActions` of both android_app and android_library.

Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I8a755f5ca615c8a1651afcd2ec441fc9fbd82c61
2024-03-20 00:06:05 +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
Yu Liu
eeff222655 Pass "--container" to aconfig create-cache
Bug: 328823994
Test: unit tests and manual tests locally.

Ignore-AOSP-First: It is easier to detect all the mismatch in internal
master.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b75ed0f2d8c4d13924573fd065c9706475aac17b)
Merged-In: I096877015b78786639376b279a9be5d07594d92e
Change-Id: I096877015b78786639376b279a9be5d07594d92e
2024-03-19 23:07:34 +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
Andrew Walbran
52533237ef Add aliases property for renaming Rust dependencies.
This is equivalent to specifying a dependency name different to the
package name in cargo, which some external crates do.

Bug: 308790322
Test: Built libgrpcio with aliases for protobuf
Change-Id: I2801222051fdd962460cc7f4900cec357f63b974
2024-03-19 17:27:46 +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
yangbill
2af0b6edd7 Change java stem attribute for both device and host
Bug: 329762127
Test: cd build/soong/java ; go test -run TestJavaLibHostWithStem
Test: cd build/soong/java ; go test -run TestAppStem
Test: cd build/soong/java ; go test -run TestAndroidAppImport_ArchVariants
Test: cd build/soong/java ; go test -run TestOverrideAndroidAppStem
Test: cd build/soong/java ; go test -run TestOverrideAndroidApp
Test: cd build/soong/java ; go test -run TestPackageNameOverride

Change-Id: I8fbdc82116f9a0c68121fbbeb1ef4f78f2b6fea3
2024-03-19 09:11:59 +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