Commit Graph

83598 Commits

Author SHA1 Message Date
Zi Wang
f5bf74f35d Merge "Remove unused tagSplitter function" into main 2024-08-06 19:36:03 +00:00
Treehugger Robot
4f18cfdd7d Merge "Revert "Revert "Enable from-text stub generation in non-sdk java..."" into main 2024-08-06 18:50:04 +00:00
Wei Li
b320ab283c Merge "Switch SBOM generation of products to Soong." into main 2024-08-06 18:17:36 +00:00
mrziwang
d9279cd476 Remove unused tagSplitter function
Test: CI
Bug: 357675466
Change-Id: I844476e8afbf9f3cc9f4556ba27ea62f9262cb0c
2024-08-06 10:47:03 -07:00
Treehugger Robot
72ae33f6fa Merge "Disable ResourceProcessorBusyBox in kythe builds" into main 2024-08-06 17:34:36 +00:00
Spandan Das
29207b57cf Move the installation rules of boot images to soong
This CL adds moves the installation rules of boot images to soong. This
will eventually allow us to build devices by skipping `katiBuild` and
moving straight to `katiPackaging`

Details
1. Drop `no_full_install` from dex_bootjars singleton. This ensures that
   the files installed by this singleton module does not get skipped
when generating the soong installs file (out/soong/installs-*)
2. Replace PackageFile with InstallFile. This registers the installation
   rules for both make-built and soong-built images (e.g.
aosp_cf_system_x86_64)
3. Implement `AndroidMkEntries` for dex_bootjars singleton. OutputFile
   needs to be non-nil so that this module does not get elided when
generating out/soong/Android-*. `OutputFile` was abritrarily set to one
of the many files installed by this singleton.

Test: no diff in
target/product/vsoc_x86_64/obj/PACKAGING/system_intermediates/file_list.txt
(top of stack)
Bug: 355700341
Bug: 355703904

Change-Id: I3531defa6bba58ef78f6d66e881502a8222fc229
2024-08-06 02:27:17 +00:00
Treehugger Robot
32b8daff1d Merge "Add system_ext support to build_prop module" into main 2024-08-06 02:00:28 +00:00
Spandan Das
a62d9563b4 Disable ResourceProcessorBusyBox in kythe builds
ResourceProcessorBusyBox generates the R.jar binary from R.txt without
creating an intermediate R.srcjar file. Disable this behavior in kythe
builds (ctx.Config().EmitXrefRules()) to support xrefs to R imports

Test: XREF_CORPUS=$internal_corpus m nothing
Test: aninja -t query out/soong/.intermediates/frameworks/libs/systemui/animationlib/animationlib_tests/android_common/animationlib_tests.kzip
Test: verified that an R.srcjar is present in its deps

Bug: 354854007
Change-Id: I2d63c3393c5bc58103c267c4593172ce77fbc79c
2024-08-06 00:45:49 +00:00
Jihoon Kang
b0f4c0239d Revert "Revert "Enable from-text stub generation in non-sdk java..."
Revert submission 3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI

Reason for revert: Post submit build breakage culprit fixed

Reverted changes: /q/submissionid:3207397-revert-2982300-java_api_library_non_sdk-FIKZOSARQI

Change-Id: Ic79b7fd074f02febba94183cb1479874efe044b5
2024-08-06 00:15:25 +00:00
Treehugger Robot
9b10ca4711 Merge "Hide unflagged mainline prebuilts with missing source." into main 2024-08-05 23:10:53 +00:00
Jihoon Kang
f6d9965cc5 Merge "Revert "Enable from-text stub generation in non-sdk java_sdk_library"" into main 2024-08-05 20:51:31 +00:00
Liana Kazanova
a574cd28a8 Revert "Enable from-text stub generation in non-sdk java_sdk_library"
Revert submission 2982300-java_api_library_non_sdk

Reason for revert: DroidMonitor: Potential culprit for b/357648959 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:2982300-java_api_library_non_sdk

Change-Id: I5ef7afd9ec3e10ea99f82d02172843ad9b2cfda9
2024-08-05 19:45:03 +00:00
Spandan Das
85bd4625ed Hide unflagged mainline prebuilts with missing source.
Partner worksapces contain two versions of mainline prebuilts - BigAndroid
and Go. These two prebuilts export dexpreopt'd system server artifacts
to be installed in system image. Since the install paths are same, we
run into duplicate installation rules issue unless one of them is
hidden.

This hiding was previously done by creating a dependendency between
source aosp apex to BA and Go google prebuilts. However, this
implementaion had the unfortunate side effect on the packaging name of
the Google mainline prebuilts - the name becomes the aosp apex name.

Instead of creating the dependency to aosp apex, this CL hides all
mainline apex_set(s) if it has not been flagged using
RELEASE_APEX_CONTRIBUTIONS_*. Since there are some non mainline apex
prebuilts, apex_name will be used to determine whether the prebuilt is a
mainline module.

Test: m nothing --no-skip-soong-tests
Test: In partner workspaces, downloaded the CLs in b/355682304#comment7
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp apexes are not installed, but mainline prebuilts are
installed

Test: unset RELEASE_APEX_CONTRIBUTIONS_ADSERVICES to build from source
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp adservices is installed, and adservices prebuilt is
**not* installed.

Bug: 355682304
Change-Id: Idacb65313553bdea5c0593976694de478034229e
2024-08-05 18:25:37 +00:00
Treehugger Robot
99417ba9ea Merge "Enable from-text stub generation in non-sdk java_sdk_library" into main 2024-08-05 18:25:36 +00:00
Spandan Das
acfa26b5ba Merge "Create an installation rule to copy vdex to common arch device directory" into main 2024-08-05 16:38:53 +00:00
Inseob Kim
acf9174120 Add system_ext support to build_prop module
As some partitions have build.prop under etc/, this change adds
relative_install_path property to build_prop module. Also this change
adds system_ext related Soong variables and system_ext support in
gen_build_prop.py.

Bug: 322090587
Test: build and compare system_ext/etc/build.prop
Change-Id: I416662b8bae09383af0cdd3d8444a5c300006b7b
2024-08-05 12:51:05 +09:00
Spandan Das
715594304d Create an installation rule to copy vdex to common arch device directory
The installation rules for soong built system images are generated by
soong, but the installation rules rules for make built images are still
generated by make in dex_preopt_libart.mk. There is an existing
discrepancy between the two. Make built images generates three
installation rules for
1. system/framework/<primary_arch>/$bootjar.vdex (symlink)
2. system/framework/<secondary_arch>/$bootjar.vdex (symlink)
3. system/framework/$bootjar.vdex (actual file)

Soong copies the file to (1), creates a symlink from (2) to (1) and
skips (3) altogether. This CL makes the Soong installation rules match
Make installation rules. This will eventually allow
us to build devices by skipping `katiBuild` and moving straight to
`katiPackaging`.

Test: no diff in make built installed files
target/product/vsoc_x86_64/obj/PACKAGING/system_intermediates/file_list.txt
(top of stack)

Test: debugfs out/target/product/vsoc_x86_64/system/etc/aosp_cf_system_x86_64.img
verified system/framework/boot-apache-xml.vdex exists
verified system/framework/x86/boot-apache-xml.vdex exists as a symlink
verified system/framework/x86_64/boot-apache-xml.vdex exists as a symlink

Bug: 355700341

Change-Id: I52853c07674b77a984b5a5ac5dcd69236b642b46
2024-08-05 02:18:03 +00:00
Wei Li
b1af36a2a2 Switch SBOM generation of products to Soong.
Also remove the tests in sbom_test.sh for product SBOM generated by Make.

Bug: 324467079
Test: m sbom
Test: m dist
Test: banchan com.android.adbd module_arm64 userdebug && m sbom && m dist
Test: build/soong/tests/sbom_test.sh
Change-Id: Ie3f405f0a09a3b1f1176dba67167773801b9337a
2024-08-02 18:00:38 -07:00
Treehugger Robot
0ca0dd8e1c Merge "Remove HWADDRESS_SANITIZER_GLOBAL_OPTIONS" into main 2024-08-02 02:28:10 +00:00
Cole Faust
3bec2a77a6 Merge "Tag resource_dirs as android:"path"" into main 2024-08-01 17:22:45 +00:00
Inseob Kim
af2994ccb6 Remove HWADDRESS_SANITIZER_GLOBAL_OPTIONS
It doesn't need to be a Makefile variable exported from Soong as it's
hard-coded.

Bug: 353429422
Test: boot shiba with SANITIZE_TARGET=hwaddress
Change-Id: I4a98eaaf1002aa7aba5d5131ff251bdcbdd2e0ef
2024-08-01 10:30:02 +09:00
Jooyung Han
b42b703f53 Merge "apex: respect PRODUCT_COMPRESSED_APEX for prebuilt APEXes" into main 2024-08-01 01:01:41 +00:00
Inseob Kim
81e60c9c0b Merge changes from topic "revert-3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP-XOXPVYPSBJ" into main
* changes:
  Revert^6 "Use Soong-built system/build.prop"
  Revert^6 "Sync gen_build_prop.py to sysprop.mk"
  Revert^2 "Conditionally pass kernel version to build.prop"
  Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert "Revert "Revert^2 "Set output for build_prop even on Soon..."
2024-08-01 00:02:58 +00:00
Inseob Kim
9e51973c13 Merge "Fix build thumbprint in gen_build_prop.py" into main 2024-08-01 00:02:58 +00:00
Cole Faust
d65add2253 Tag resource_dirs as android:"path"
Resource_dirs is queried using PathsWithOptionalDefaultForModuleSrc,
which includes all the infrastructure to resolve module references,
but needs to be tagged android:"path" to be able to add the module
references as dependencies.

Test: Manually
Change-Id: Ie3f75332c9a4cc0ee4b4c93268188440ff7ce249
2024-07-31 16:42:33 -07:00
Yu Liu
2800675b31 Rename ModuleId to ModuleCacheKey and call the same named method on moduleInfo
Bug: 335718784
Test: local manual tests
Change-Id: I364cd20281e52a1682f14a43c41bfe9993f04477
2024-07-31 21:38:15 +00:00
Jihoon Kang
7eaa83707e Merge "Convert imageMutator to TransitionMutator" into main 2024-07-31 20:39:16 +00:00
Treehugger Robot
043503e6aa Merge "fix soongdbg missing args" into main 2024-07-31 19:02:09 +00:00
Jihoon Kang
5402bbd8d7 Convert imageMutator to TransitionMutator
Replace android.imageMutator with a TransitionMutator

Test: diff out/soong/Android-<product>.mk
Bug: 319288033
Change-Id: Id6a50a2aacb32ecfadf7e45ada4956e85b55fef2
2024-07-31 18:53:06 +00:00
Taylor Santiago
60fa202bb5 Merge "Use consistent directory for source and output inside the build sandbox for ABFS." into main 2024-07-31 17:55:41 +00:00
Treehugger Robot
3cc8933133 Merge "Fix RBE tmp dir" into main 2024-07-31 15:28:12 +00:00
Jerome Gaillard
6524e1d51c Merge "Handle missing dependencies in ravenwood.go" into main 2024-07-31 11:02:10 +00:00
Jooyung Han
26ec8484e4 apex: respect PRODUCT_COMPRESSED_APEX for prebuilt APEXes
If a prebuilt APEX is compressed, it's installed without decompression
even when PRODUCT_COMPRESSED_APEX is false.

This change decompresses the prebuilt/compressed APEX.

Bug: 356533488
Test: OVERRIDE_PRODUCT_COMPRESSED_APEX=false m
Change-Id: Ifdde074e383837df92d172bc483bfca9a97cb6f8
2024-07-31 15:04:05 +09:00
Zijun
09fdda5b3b Turn on relaxed-template-template-args as a workaround
Update compiler to r536225 and the error: argument '-fno-relaxed-template-template-args' is deprecated arises.

Bug: b/341084395
Test: presubmit
Change-Id: If714f96e4537b5f8d695cd7c0d1cd0a8ddcbb96e
2024-07-31 05:12:41 +00:00
Maciej Żenczykowski
469b5a1236 Merge "Soong: BPF: Cflag and btf defaults" into main 2024-07-31 03:35:33 +00:00
Inseob Kim
bc4ef22b9b Revert^6 "Use Soong-built system/build.prop"
d5a12721b5

Change-Id: I6f4bf3043e73763b047bec3303f1547ec647d12b
2024-07-31 02:18:22 +00:00
Inseob Kim
2887482f0f Revert^6 "Sync gen_build_prop.py to sysprop.mk"
This reverts commit 7b7593968b.

Reason for revert: fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I83a4cb1a39bce1a1da8fabd49c6c895862a6c686
2024-07-31 02:18:07 +00:00
Inseob Kim
6bd92d5924 Revert^2 "Conditionally pass kernel version to build.prop"
This reverts commit 29fed1efe8.

Reason for revert: Fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I207abd188636673250eb9a070be95db0b82f39e7
2024-07-31 02:17:49 +00:00
Inseob Kim
d8538e5db0 Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
530c32acbe

Change-Id: I9dc817855e3db7b96320a977b24b84d72e762893
2024-07-31 02:17:39 +00:00
Inseob Kim
88b109e6b4 Revert "Revert "Revert^2 "Set output for build_prop even on Soon..."
Revert submission 3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP

Reason for revert: fixed breakage with aosp/3200730, verified with ABTD

Reverted changes: /q/submissionid:3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP

Change-Id: If9e6841bb915a79d9817838a1657017ddee9c1a7
2024-07-31 02:16:54 +00:00
Liana Kazanova
530c32acbe Revert^5 "Add TARGET_SYSTEM_PROP to system build.prop"
26756a86c1

Change-Id: Iad186b283ea78477c33bfc4519b9a27395557b55
2024-07-31 08:26:38 +09:00
Liana Kazanova
7b7593968b Revert^5 "Sync gen_build_prop.py to sysprop.mk"
2c7e13ea37

Change-Id: Ic1fd9ec4d65b657fb80a3849539e286934111d3c
2024-07-30 23:23:28 +00:00
Liana Kazanova
d5a12721b5 Revert^5 "Use Soong-built system/build.prop"
45ed4c2f9c

Change-Id: I574f29539d58239cd3f0e1ba6ae86e1b5d0f55ea
2024-07-30 23:22:51 +00:00
Liana Kazanova
a11ab980b8 Revert "Revert^2 "Set output for build_prop even on Soong only b..."
Revert submission 3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA

Reason for revert: DroidMonitor: Potential culprit for b/356297315 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA

Change-Id: I40f63fdc0c25c37a7193ec09407498e707a55a37
2024-07-31 08:08:55 +09:00
Inseob Kim
60f2636903 Fix build thumbprint in gen_build_prop.py
Bug: 356297315
Test: TH and ABTD
Change-Id: I28bccbbafbf9bcdf45a58361e37435b8d74d7464
2024-07-31 08:00:34 +09:00
Liana Kazanova
2426d49060 Merge "Revert "Conditionally pass kernel version to build.prop"" into main 2024-07-30 22:53:16 +00:00
Jihoon Kang
062eb663c5 Enable from-text stub generation in non-sdk java_sdk_library
This change allows from-text stubs to be generated for all
java_sdk_library modules, unlike how it is currently limited to the
modules that contribute to the api surfaces (i.e. the SDK).

This change accomplish this by modifying the dependency of the
from-text stubs generation, so that the sdk_library generated from-text
stubs generating java_api_library modules no longer depend on the full
api surface stubs, but generate the stubs in the module level, and
combined later to generate the full api surface stubs.

This change also removes the java_api_library modules defined in
core-libraries/Android.bp, which are passed to generate the system
modules. Given that the from-text vs from-source toggle is done within
the java_sdk_library stubs level, these modules no longer need to exist.

Implementation details:
- Allow sdk_version to be specified in java_api_library modules. For
  java_sdk_library-generated java_api_library modules, they inherit that
  of the sdk_library module. Some java_sdk_library modules that do not
  contribute to the api surface are allowed to set sdk_version to
  something other than "none" or "core".
- Implement java_api_library to implement `SdkContext`. This allows
  java_api_library to collect required deps from sdk_version (classpath,
  bootclasspath, system modules), and pass the collected jars when
  generating the stubs srcjar in metalava and compiling the stubs srcjar
  in javac.
- Remove hardcoded list of sdk_library modules that are allowed to
  genereate stubs from the api signature files, and allow from-text
  stubs generation by default. Modules that are not able to generate
  stubs from the api signature files are specified by setting the newly
  introduced `Build_from_text_stubs` property to `false`.

Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 327507877
Change-Id: Ia35d2f3cf9fae48fc8c4bd99a84ae18d7c0e7bee
2024-07-30 22:35:06 +00:00
Yu Liu
8975548e9c Merge "Only add darwin specific rules/variables when building on mac." into main 2024-07-30 22:18:01 +00:00
Neill Kapron
50a7bf8610 Soong: BPF: Cflag and btf defaults
Currently, all bpf programs require a cflags field which defines -Wall
and -Werror. This change enables this by default, and also enables
-Wextra. This removes boilerplate required for every bpf program, and
improves code quality.

Additionally, this change enables the default of 'btf: true' further
reducing the boilerplate required for most bpf programs in their
Android.bp file. BTF should be enabled by default, with only limited
mainlined bpf programs requiring BTF being disabled for compatibility
with older bpfloader releases.

Test: Treehugger
Change-Id: I8efd0f63115030d40c0ff7fe81d5345ff3436e5a
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-07-30 22:03:27 +00:00
Treehugger Robot
6ae6f35d6c Merge "Make the prefer property configurable" into main 2024-07-30 21:46:07 +00:00