Commit Graph

83625 Commits

Author SHA1 Message Date
Kiyoung Kim
ef693fc9bc Remove host_snapshot module
Remove host_snapshot implementation which is no longer in use.

Bug: 332986564
Test: soong build succeeded
Change-Id: I96ee4eb319f380d9f85de7f9716e63513838624c
2024-08-09 07:16:03 +00:00
Jooyung Han
f826c99ec2 Merge "apex: rm $out before decompressing an apex." into main 2024-08-09 01:33:04 +00:00
Priyanka Advani (xWF)
d882a0c92d Merge "Revert "Verify that ndk_headers headers are valid C."" into main 2024-08-08 23:29:41 +00:00
Priyanka Advani (xWF)
181934cc26 Revert "Verify that ndk_headers headers are valid C."
Revert submission 3207854-ensure-c-ndk-headers

Reason for revert: Droidmonitor created revert due to b/358445530.

Reverted changes: /q/submissionid:3207854-ensure-c-ndk-headers

Change-Id: I649941a4d063d76a1c6a8e58fb885da2c44331c0
2024-08-08 22:49:18 +00:00
Treehugger Robot
894a93840d Merge "Verify that ndk_headers headers are valid C." into main 2024-08-08 21:37:29 +00:00
Colin Cross
82201c2db1 Merge changes Ib238a83a,I9ed6a649 into main
* changes:
  Use rsp for kotlin classpath
  Move kotlin stdlib after javac jars
2024-08-08 18:11:59 +00:00
Yi Kong
9b94da79cd Re-enable -Wformat warning
Change-Id: I9af8606a1e782dfb809d7f4df7b043d53ea7ba9f
Test: presubmit
Bug: 315250603
2024-08-08 15:12:42 +09:00
Yi Kong
375aba8cf1 Merge "Do not enable AFDO for coverage builds" into main 2024-08-08 06:10:33 +00:00
Jooyung Han
8fa6116aca apex: rm $out before decompressing an apex.
Otherwise, incremental build fails with "already exists".

Bug: 357916000
Test: incremental build with PRODUCT_COMPRESSED_APEX=false and prebuilt
  compressed APEXes
Change-Id: If2a0be735e3710afd1d40b16b43608028eb95c5a
2024-08-08 10:45:48 +09:00
Treehugger Robot
edcbad4054 Merge changes Ifc905b14,I62166c6d into main
* changes:
  Fix IDEInfo for java_import
  Add IdeInfo for android_library_import
2024-08-08 01:24:10 +00:00
Spandan Das
6d26f80c6c Fix IDEInfo for java_import
`Jars` property in module_bp_java_deps.json should be relative to the
android build top, and not relative to the Android.bp file

Bug: 356572093
Test: m out/soong/module_bp_java_deps.json and verified that `jars` in
an arbitrary java_import module is relative to android top

Change-Id: Ifc905b14500dfa4254b27505fcc8af8f18349587
2024-08-08 00:06:29 +00:00
Spandan Das
b08bf77438 Add IdeInfo for android_library_import
The information will be used for IDE autocompletion.

Test: {
  "jars": [
    "out/soong/.intermediates/prebuilts/misc/common/androidx-test/androidx.test.core-nodeps/android_common/turbine-combined/androidx.test.core-nodeps.jar",
    "out/soong/.intermediates/prebuilts/misc/common/androidx-test/androidx.test.core-nodeps/android_common/busybox/R.jar"
  ],
  "path": [
    "prebuilts/misc/common/androidx-test"
  ]
}

Bug: 356572093

Change-Id: I62166c6d5cfa1cf0c49adf42d5d8b4ca40ab5a11
2024-08-08 00:06:23 +00:00
Colin Cross
8c844e0b8f Merge changes I2b182cd3,Ibf6d9b79 into main
* changes:
  Split jarjarIfNecessary out of compileJavaHeader
  Convert JavaInfoProvider to *JavaInfo
2024-08-07 23:48:01 +00:00
Ronald Braunstein
79a10d90a3 Merge "Add some verification on test_suite for test_module_config" into main 2024-08-07 22:45:44 +00:00
Ronald Braunstein
a186ac04bb Add some verification on test_suite for test_module_config
During some migration, I created some modules where the derived module
and base module were in different suites (one was in general-tests, one
was in base-tests).
This had the potential to create dangling symlinks for partial downloads
from the test suites in tradefed.

Bug: b/357880359
Test: go test ./
Test: m nothing
Test: modified a Android.bp with test_module_config to change the suite
to "device-tests" from "general-tests" and got the error as expected:
   error: cts/tests/libcore/luni/Android.bp:70:1: module "CtsLibcoreTestCases_dalvik_system" variant "android_common": Suite: [device-tests] listed but does not exist in base module: CtsLibcoreTestCases

Change-Id: Ia8fa991914a47336fc2d0148f066824433db2ecd
2024-08-07 14:41:02 -07:00
Colin Cross
1f75cdf980 Use rsp for kotlin classpath
Support long classpaths by passing the classpath in a file to the script
that generates build.xml.

Bug: 308016794
Test: builds
Flag: EXEMPT refactor
Change-Id: Ib238a83a26acba7ede8e55298397dbeb9a57a866
2024-08-07 14:11:43 -07:00
Colin Cross
edec77c453 Split jarjarIfNecessary out of compileJavaHeader
A future CL is going to change transitive classpath behavior when
jarjar is enabled.  In preparation, split the jarjar rules out
of compileJavaHeader into a separate jarjarIfNecessary method, and
use it on the classes and resource jars too.

Also tweak the naming of the output files in repackageFlagsIfNecessary
to be prettier.

Bug: 308016794
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: I2b182cd30631f2bd7925341b9171e6b3c0e8d450
2024-08-07 14:11:43 -07:00
Colin Cross
d1d8f17e9e Move kotlin stdlib after javac jars
A future CL is going to treat local jars separately from dependency
jars.  Rearrange the order of the kotlin standard library jars to
come after the local jars produced by javac, which will better match
the future ordering and ease ninja file comparisions.

Bug: 308016794
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: I9ed6a649350451bf1788077752db5222f50c0247
2024-08-07 14:11:43 -07:00
Colin Cross
7727c7f096 Convert JavaInfoProvider to *JavaInfo
Convert JavaInfoProvider to return a *JavaInfo instead of a JavaInfo.
This will reduce copying when reading the provider, and also allows
JavaInfo to recursively contain a depset of JavaInfos from
dependencies.

Bug: 308016794
Test: go test ./java/...
Flag: EXEMPT refactor
Change-Id: Ibf6d9b797f760ad1fe815d59839839fdfad91733
2024-08-07 14:11:43 -07:00
Treehugger Robot
d40aac1340 Merge "Don't hold on to WritablePath" into main 2024-08-07 20:48:50 +00:00
Treehugger Robot
d6358b6a9b Merge "Remove the hardcoded list of api libraries" into main 2024-08-06 23:37:54 +00:00
Jihoon Kang
463893917c Remove the hardcoded list of api libraries
The list no longer need to be maintained given that `java_sdk_library` modules generate from-text stubs by default.

Change-Id: I18c94731d0a337c8815fd589868377fc8933437c
Test: m nothing
Bug: 276958307
2024-08-06 22:39:16 +00:00
Treehugger Robot
6fb39c1fce Merge "Annotate Set property as android:Path" into main 2024-08-06 22:37:14 +00:00
Spandan Das
7811e46669 Annotate Set property as android:Path
This allows use of filegroups as inputs.

Test: go build ./java
Change-Id: Ibe8634b49c30dcf62f80dfa89875c43ad741eaff
2024-08-06 21:28:33 +00:00
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
Dan Albert
a866829885 Verify that ndk_headers headers are valid C.
https://github.com/android/ndk/issues/1920 recently reported a handful
of NDK headers where C-incompatible syntax had slipped in which wasn't
caught by review. This is also something that we often manually catch
in API review, but the manual inspection is, as can be seen from that
bug, error prone.

This check is pretty stupid. I've tried on other occasions to do a
more thorough check that would build each header using the same flags
as cc_library or similar would, but was never able to get that
working. This isn't as thorough, but that's maybe not such a bad
thing, since it saves on build time to only check on variant. In
practice the rudimentary approach I've taken here would have caught
every instance reported in the bug above, and probably all the other
cases that we'd previously caught in API review as well, so it's
definitely a step in the right direction if not good enough forever.

Bug: http://b/113359184
Test: m ndk
Change-Id: Id4e8cc511413acc61c4f625f25c3004d7439263c
2024-08-06 00:10:17 +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
Yi Kong
3d9bed9204 Do not enable AFDO for coverage builds
This works around an incompatibility between coverage and the
-fdebug-info-for-profiling flag.

also moved -fdebug-info-for-profiling flag so that it is only applied to
the libraries that enabled AFDO.

Test: gzip -cd out/verbose.log.gz | grep debug-info-for-profiling
Bug: 345593672
Change-Id: I68493511da1e61091209d0ed1b2c86c7ba0e21f4
2024-08-05 07:07:09 +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