Commit graph

81347 commits

Author SHA1 Message Date
Gina Ko
465549b579 Revert "Migrate buildinfo.sh script into Soong"
Revert submission 3004875-buildinfo_prop_soong

Reason for revert: DroidMonitor-triggered revert due to breakage b/331462869

Reverted changes: /q/submissionid:3004875-buildinfo_prop_soong

Bug: 331462869
Change-Id: Ib8bbbad29a4ad7b800e6bd1a67a401c2225b78cb
2024-03-26 22:46:11 +00:00
Inseob Kim
5baf2cbcb6 Migrate buildinfo.sh script into Soong
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.

Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Icaa7e1fdab2a8c169ac00949d3aaf6c8212a1872
2024-03-26 05:55:49 +00:00
Colin Cross
9dcc3676a9 Merge changes from topic "revert-3010297-revert-3008874-OJOKRLYEZJ-YRWACROLKC" into main
* changes:
  Revert^2 "Support static_libs for java_import modules"
  Revert "Revert "Support transitive dependencies through android_..."
2024-03-26 00:11:02 +00:00
Yi Kong
949157d582 Merge "Remove ThinLTO workaround for VNDK" into main 2024-03-25 07:14:29 +00:00
Treehugger Robot
e58af3da5a Merge "Add required, host_required, and target_required as dependencies" into main 2024-03-25 04:10:50 +00:00
Colin Cross
dad2a361ef Revert^2 "Support static_libs for java_import modules"
c6c9c7354b

Change-Id: Id011aca133d7bb45023a63c0f53d84a4d694cc2f
2024-03-23 04:43:41 +00:00
Colin Cross
9055e21914 Revert "Revert "Support transitive dependencies through android_..."
Revert submission 3010297-revert-3008874-OJOKRLYEZJ

Reverted changes: /q/submissionid:3010297-revert-3008874-OJOKRLYEZJ

Change-Id: I885a449ddc284052f9d4ec0c030d5fc61247b522
2024-03-23 04:43:41 +00:00
Jiyong Park
74ff1f80bc Merge "Ensure that genrule's host tool deps are for host" into main 2024-03-22 23:33:48 +00:00
Colin Cross
567b9d707b Merge changes from topic "revert-3008874-OJOKRLYEZJ" into main
* changes:
  Revert "Support transitive dependencies through android_libary_i..."
  Revert "Support static_libs for java_import modules"
2024-03-22 18:25:30 +00:00
Colin Cross
44841aada3 Revert "Support transitive dependencies through android_libary_i..."
Revert submission 3008874

Reason for revert: b/330903911
Reverted changes: /q/submissionid:3008874

Change-Id: Ie056a7f90803ab2d8e39e07eddf6c9c68e41ff3d
2024-03-22 18:16:57 +00:00
Colin Cross
c6c9c7354b Revert "Support static_libs for java_import modules"
Revert submission 3008874

Reason for revert: b/330903911
Reverted changes: /q/submissionid:3008874

Change-Id: I34cca9d021d9c806e28bb6a6a6da78efd61cde27
2024-03-22 18:17:00 +00:00
Elliott Hughes
34c93d8e15 Merge "We have a prebuilt getopt now." into main 2024-03-22 17:33:47 +00:00
Colin Cross
77be51bcab Merge changes from topic "no_more_nodeps" into main
* changes:
  Support static_libs for java_import modules
  Support transitive dependencies through android_libary_import modules
2024-03-22 16:55:47 +00:00
Elliott Hughes
4e0ccf4f59 We have a prebuilt getopt now.
getopt doesn't appear to be used any more, but we've added the prebuilt anyway. Update soong's $PATH allowlist correspondingly.

Change-Id: Id416703697f464f4a3b73771611e087d2ec265d1
2024-03-22 16:08:21 +00:00
Ivan Lozano
aad0b20d2b Merge "rust: Add export_include_dirs property to rust_ffi" into main 2024-03-22 12:59:06 +00:00
Treehugger Robot
bfa7f261d1 Merge "Revert "Enable full LTO optimization by default"" into main 2024-03-22 09:01:23 +00:00
Ting-Hsin Chen
8d98a99ad7 Merge "Revert "Convert BuildIgnoreApexContritbutions variable to a boolean"" into main 2024-03-22 06:20:17 +00:00
Android Culprit Assistant
d4afe20481 Revert "Convert BuildIgnoreApexContritbutions variable to a boolean"
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
2024-03-22 06:15:51 +00:00
Yi Kong
55019c43f4 Revert "Enable full LTO optimization by default"
Revert submission 2988057-default-full-lto

Reason for revert: broken test

Reverted changes: /q/submissionid:2988057-default-full-lto
Bug: 330811070

Change-Id: I46487ad92d25741347c7f30e944a5794941d5d69
2024-03-22 05:51:09 +00:00
Spandan Das
73d566156e Merge "Convert BuildIgnoreApexContritbutions variable to a boolean" into main 2024-03-22 02:32:45 +00:00
Yi Kong
2703b42ccb Merge "Enable full LTO optimization by default" into main 2024-03-22 02:15:46 +00:00
Thiébaud Weksteen
d3348dbaaa Merge "Support multiple sources for prebuilt_etc" into main 2024-03-21 23:14:48 +00:00
Colin Cross
a174d2e987 Support static_libs for java_import modules
Remove the need to wrap java_import modules with a java_library
just to include static dependencies.

Bug: 288358614
Test: TestJavaImport
Change-Id: I888aecc6c0efc696a397fc1dd5d0ef5fd644bebc
2024-03-21 15:36:01 -07:00
Treehugger Robot
7f75245402 Merge "Add aconfig flag support for runtime_resource_overlay" into main 2024-03-21 19:03:24 +00:00
Spandan Das
2722cc194a Merge "Add an apex_contributions_defaults module to module sdk" into main 2024-03-21 18:07:10 +00:00
Spandan Das
aa1b7c9124 Convert BuildIgnoreApexContritbutions variable to a boolean
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)
2024-03-21 18:04:53 +00:00
Ivan Lozano
f033ca61a2 rust: Add export_include_dirs property to rust_ffi
The cc property include_dirs is neverallowed in certain paths since it
has been deprecated. The property in rust_ffi modules with the same name  functionally works the same way as the CC property export_include_dirs.

To reduce confusion, and avoid triggering the neverallow rule, deprecate
include_dirs and create an export_include_dirs property which does the
same thing. This brings rust module properties into better alignment
with cc module property as well, reducing confusion.

Bug: 330736943
Test: New Soong test
Change-Id: Ib2020a22e6747ac690c46dbff84e38744f93ed15
2024-03-21 17:53:19 +00:00
Jihoon Kang
5a87a9ac1c Merge "droidstubs depend on the combined last api filegroup modules" into main 2024-03-21 17:34:00 +00:00
Yi Kong
e022cf58dd Remove ThinLTO workaround for VNDK
VNDK is deprecated. The build is passing without the workaround.

Test: presubmit
Bug: 169217596
Change-Id: I7cf2c33984c50d06f3e69ebc916ce6a89468204a
2024-03-21 16:34:56 +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
Thiébaud Weksteen
00e8b31ee6 Support multiple sources for prebuilt_etc
Keep the Src attribute for compatibility. The new attribute (Srcs) is
mutually exclusive with Src.

Keep SourceFilePath and OutputFile for compatibility with other modules.
These can be removed in a follow up change.

Bug: 328313691
Test: presubmit
Test: m blueprint_tests
Test: prebuilts/build-tools/build-prebuilts.sh (on build-tools branch)
Change-Id: I5d5b2657715a7180a829c7ed0f501872d561b662
2024-03-21 11:30:15 +11:00
Colin Cross
8179496764 Support transitive dependencies through android_libary_import modules
Fix dependencies of android_library_import modules so that the -nodeps
modules created by pom2bp are no longer necessary.  Provide transitive
manifests (b/288358614), combine static dependencies into the output
jars, and propagate uses_libraries and optional_uses_libraries from
dependencies.

Bug: 288358614
Test: TestManifestMerger
Test: TestAndroidResourceProcessor
Change-Id: Ief45169d04217826fbb21ba283602b38ef0dd3f6
2024-03-20 16:09:14 -07:00
Jihoon Kang
9f442dc5d4 Add aconfig flag support for runtime_resource_overlay
This change adds the support that was added to android_app in
https://r.android.com/2854663 for runtime_resource_overlay modules.

Implementation details:
- Add flags_packages as dependencies of runtime_resouce_overlay modules
- Pass the collected aconfig intermediate cache files to the
  aconfigBuildActionOptions.

Test: m nothing --no-skip-soong-tests
Bug: 330222981
Change-Id: I3e20f18e58be689ca32852f7bf0b7ea16024856b
2024-03-20 22:18:17 +00:00
Cole Faust
e6ea0399a9 Merge "Add more specific partition visibility rules" into main 2024-03-20 21:50:26 +00:00
Spandan Das
a5e26d3cd6 Add an apex_contributions_defaults module to module sdk
This metadata module will contain a flattened list of all the soong
modules contributed by this module to the rest of the build. This is
supported in V and above.

Bug: 326246905
Test: m art-module-host-exports
Test: unzip -p out/soong/mainline-sdks/art-module-host-exports-current.zip Android.bp | grep -A 15 apex_contributions_defaults
apex_contributions_defaults {
    name: "art-module-host-exports.contributions",
    contents: [
        "prebuilt_art.module.api.annotations",
        "prebuilt_dex2oat",
        "prebuilt_dex2oatd",
        "prebuilt_dexdump",
        "prebuilt_hiddenapi",
        "prebuilt_oatdump",
        "prebuilt_profman",
        "prebuilt_veridex",
        "prebuilt_libartpalette",
        "prebuilt_libartbase",
    ],
}

Change-Id: Iba43a9da5430adfc0a5fd9b5dc27b5d89c5eacb8
2024-03-20 21:41:57 +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
Jiyong Park
8bcf3c64f1 Add required, host_required, and target_required as dependencies
So far, the installation of required modules were handled by Make. This
prevents us from implementing the module installation and packaging
entirely in Soong.

This CL is the first step towards that goal. Soong now correctly tracks
the dependencies and they are correctly returned by
TransitivePackagingSpecs(), which is used by packaging modules like
android_system_image.

Bug: 321626681
Test: build
Change-Id: I9192b5333ceaa0b7d1c5c4abeec2af62febcd976
2024-03-20 17:05:17 +09: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
Jiyong Park
8fb0e9734c Ensure that genrule's host tool deps are for host
Previously, when gathering transitive dependencies of genrule's host
tool, TransitivePackagingSpecs() was used if available. However, when
using this, it didn't check whether the dependencies are for host or not
(i.e. device). This was fine because host module can only depend on host
modules.

However, this is preventing Soong from implementing the installation of
the required modules by itself. Then a host module may depend on a
device module or vice versa (because that's the symantics of the
property).

To prevent the issue, check the partition of the transitive dependencies
of the host tool and filter out ones whose partition is not "" (which
means host).

Bug: 321626681
Test: builds
Change-Id: I296a920b3b88e7601315a4e1768af9727d0061e6
2024-03-20 16:17:21 +09:00