Commit graph

76633 commits

Author SHA1 Message Date
Spandan Das
8a768e6a5c Merge "Drop runtime apex deps from implicit baselineApexAvailable map" into main 2024-01-16 20:37:00 +00:00
Spandan Das
1d15969595 Drop runtime apex deps from implicit baselineApexAvailable map
The availability of these soong modules to com.android.runtime has
been made explicit in Android.bp files

One exception is libz. Making apex_available explicit has some subtle
implications on stub/impl selection which breaks coverage builds.

Bug: 281077552
Test: m nothing
Change-Id: I6db7db6dfcb5c468ca68c3e166fe79b9356c4fa8
2024-01-16 19:25:21 +00:00
Treehugger Robot
535f739153 Merge "Disable prebuilt apps without an apk later" into main 2024-01-16 18:25:30 +00:00
Treehugger Robot
ce8d254149 Merge "Implicitly bump up Java target to 1.8" into main 2024-01-16 18:09:41 +00:00
Treehugger Robot
e317b15cea Merge "Support converting LOCAL_PROTO_JAVA_OUTPUT_PARAMS" into main 2024-01-16 02:34:12 +00:00
Sorin Basca
d567a514ee Implicitly bump up Java target to 1.8
Bug: 320294595
Test: m
Change-Id: I693e564c67d17254d68f3a9c16664c1da93b9488
2024-01-15 16:38:46 +00:00
David Srbecky
cf33b025d9 Merge "Revert^7 "Enable dex container (DEX v41) for the whole system"" into main 2024-01-15 11:10:45 +00:00
Yanning Jia
43668c6f13 Revert^7 "Enable dex container (DEX v41) for the whole system"
This reverts commit 7022550d0e.

Reason for revert: Breaks app's DRM

Bug: 317744117
Change-Id: I539e6ec037db1c297fe7cf85d294bebe963ab214
2024-01-15 11:09:32 +00:00
Treehugger Robot
dd84d84732 Merge "Denylist com.google.pixel.camera.hal.manifest" into main 2024-01-13 01:39:25 +00:00
Cole Faust
97494b197e Disable prebuilt apps without an apk later
Currently, android_app_import modules get disabled during their load
hook if they don't have a set `apk` property. This causes them to be
disabled before soong config variables can be applied, which would've
set the apk property.

Move the disabling into a DefaultableHook, which will run after the
soong config variables.

Bug: 319897584
Test: m nothing --no-skip-soong-tests
Change-Id: Ia0f6a39c35b3b11249bfa74ad532858189be24b1
2024-01-12 17:02:58 -08:00
Cole Faust
4cb1155368 Denylist com.google.pixel.camera.hal.manifest
This is an internal-only genrule, that was previously included in
a denylist in vendor/google/build. However, not all partners have
that file, so some products ended up setting
BUILD_BROKEN_GENRULE_SANDBOXING when that file didn't exist. Moving
it to the aosp allowlist lets us remove those build broken flags.

I checked with krzysio@ and yromanenko@ and they're ok with putting
this name in aosp.

Bug: 307824623
Test: Presubmits
Change-Id: Ia3f24a5c8c8efc62bdc84435343cafd1dac9afed
2024-01-12 16:23:56 -08:00
Jihoon Kang
7e9343b889 Merge changes from topic "hiddenapi_exportable" into main
* changes:
  Copy exportable artifacts to module sdk snapshot
  Enable hiddenapi check for exportable stubs
  Add defaults support for bootclasspath_fragment module type
2024-01-12 23:50:37 +00:00
Treehugger Robot
404fb4e40b Merge "Allow value variables to set pointer properties" into main 2024-01-12 23:38:04 +00:00
Cole Faust
a03ac3a75a Allow value variables to set pointer properties
Non-null pointers were always leading to an "unsupported property type"
error due to not updating the kind field.

Bug: 319897584
Test: Presubmits
Change-Id: I058ab8d153d9507f9037d699acf6e1fe4f08f538
2024-01-12 14:28:53 -08:00
Jihoon Kang
f55a5f7b37 Copy exportable artifacts to module sdk snapshot
This change modifies the copy rules of the sdk_library when generating
the module sdk snapshots so that the exportable artifacts (annotations
zip, api file, removed api file, srcjar file) are copied instead of the
everything artifacts.

In order to satisfy the prebuilts compatibility, this feature is flag
guarded by the build flag "RELEASE_HIDDEN_API_EXPORTABLE_STUBS"

Test: m --no-skip-soong-tests
Bug: 315027929
Change-Id: I8bf5bb1f196aa9b5db78ba4677caa5f4337e3021
2024-01-12 01:50:19 +00:00
Jihoon Kang
bd093457e2 Enable hiddenapi check for exportable stubs
This change modifies the dependencies of the hiddenapi to always depend
on the exportable stubs, instead of the currently utilized everything
stubs.

To support this, the full api surface exportable stubs are defined in a
separate change at the `frameworks/base` project. Note that the full api
surface exportable stubs are only used for the hiddenapi purpose, and
`sdk_version` continues to utilize the currently existing everything
stubs.

Currently, this feature is hidden behind the build flag
"RELEASE_HIDDEN_API_EXPORTABLE_STUBS". This feature will be fully
enabled once metalava fully supports handling of the flagged apis.

Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 317426356
Change-Id: I109b7cd27b20ceffcdf1766ab8106b0c276be2b3
2024-01-12 01:03:10 +00:00
Jihoon Kang
9272dccb1e Add defaults support for bootclasspath_fragment module type
This change transforms the bootclsspath_fragment module into a
defaultable module, in order to modify the "art-bootclasspath-fragment"
module definition based on the build flag in
https://r.android.com/2897389

Test: m nothing
Bug: 315027929
Change-Id: I01ba7b15e4fcdea9bd31c369110a3c9ee38bc9f6
2024-01-12 01:02:45 +00:00
Wei Li
a292446604 Update Android.mk denylist to only block the following directories in kernel/.
kernel/configs/
kernel/prebuilts/
kernel/tests/

Bug: 319658303
Test: CIs
Change-Id: I2f70ac856ec6fcf0a969aeae25eb55a730057e05
2024-01-11 23:51:42 +00:00
Treehugger Robot
744a2a6b7d Merge "Handle installation rules for co-existing prebuilts" into main 2024-01-11 18:46:58 +00:00
Colin Cross
4593e41ba6 Merge "Improve soong stuck ninja detection output" into main 2024-01-11 18:01:57 +00:00
Yu Liu
e92e561460 Merge "Add container to the path of the merged aconfig files." into main 2024-01-11 17:04:19 +00:00
Herbert Xue
5418340dc7 Support converting LOCAL_PROTO_JAVA_OUTPUT_PARAMS
LOCAL_PROTO_JAVA_OUTPUT_PARAMS can be converted as "proto.output_params"
in androidmk. The "," will be filtered out.

Bug: 314862115
Test: m androidmk
Change-Id: If784e7fd38e2b729272414afab186be027d3b225
2024-01-11 15:20:54 +08:00
JaeMan Park
1c4cc3d40e Merge "Disable tidy checks for generated code" into main 2024-01-11 02:18:21 +00:00
Spandan Das
3576e769a4 Handle installation rules for co-existing prebuilts
Every module belonging to a single mainline module family will be
hidden from make, except the one which has been flagged using
apex_contributions

Details
- Introduce a new `source_apex_name` property to prebuilt_apex and
  override_apex. This property will be used to identify the source
  equivalent of a prebuilt soong apex module.
- Create an N-ary tree from source to prebuilt(s). The tree wil be
  rooted at the source module.
- In a subsequent mutator, visit every node in the tree(s). Query
  apex_contributions and store the handle of the node which is "active"
  (if any)
- In the same mutator, do another pass over the tree. Invoke
  `HideFromMake` on every node which is not "active". The two-pass
  approach is needed PrebuiltSelectionInfoProvider does not know about
  the inter source-prebuilt dependency, this dependency can only be
  known by doing a graph walk of the N-ary tree.

Some tangential implementation details
- Each prebuilt apex has an internal deapxer module that is responsible
  for generating the deapex ninja rules. The name of this internal
  module uses the BaseModuleName (without the prebuilt_ prefix). Since
  we can have multiple prebuilt soong modules in trunk stable, change
  this to follow the name of the prebuilt module in order to avoid name
  collisions. Update existing unit tests accordingly

Bug: 316179314
Test: go test ./apex -run TestInstallationRulesForMultipleApexPrebuilts
Test: m nothing --no-skip-soong-tests
Test: presubmits

Change-Id: I58aa99d5e6a9859954614e6db9a8e9e2e581642d
2024-01-11 02:02:59 +00:00
Hsin-Yi Chen
1c683b372d Merge "Do not build ABI dumps for VNDK" into main 2024-01-11 02:00:45 +00:00
Seungjae Yoo
91ef5bb8a7 Merge "[apex] Add support for prebuilt_etc types in ApexNativeDependencies" into main 2024-01-11 01:09:26 +00:00
Yu Liu
edeadbfdcf Add container to the path of the merged aconfig files.
Bug: 312769710
Test: CI
Change-Id: I4b8a71cf86a3bcefc4a41360a241aa14b798f6e8
2024-01-10 23:38:09 +00:00
Colin Cross
a9aa35c252 Improve soong stuck ninja detection output
Add -T to the pstree command so that it doesn't print the threads of
the running processes, the thread information hasn't been useful for
debugging any previous instances of stuck processes.

Log that there are stuck processes to stdout with a pointer to look
in soong.log.

Test: manual
Change-Id: I6459f2887a7e79591e8c451d06969f8709db3393
2024-01-10 14:43:30 -08:00
Treehugger Robot
ee18a66643 Merge "Drop wifi apex deps from implicit baselineApexAvailable map" into main 2024-01-10 20:50:25 +00:00
Spandan Das
1050adad02 Drop wifi apex deps from implicit baselineApexAvailable map
The availability of these soong modules to com.android.wifi has
been made explicit in Android.bp files

Bug: 281077552
Test: m nothing
Change-Id: I6ac447ffe4b477a49064ed0ec4081e087f0edf9d
2024-01-10 19:46:28 +00:00
LaMont Jones
15b031e10e Merge changes Iaf6d45a4,Ic56e8ef3,I11f0a0b5 into main
* changes:
  Propagate aconfig providers for more modules.
  move SetAconfigFileMkEntries to android
  aconfig: harden dependency collection
2024-01-10 18:54:30 +00:00
Dennis Shen
c6dc551097 do not include sever_configurable_flags dependency when in
force-read-only-mode

Bug: b/316932568
Test: m --no-skip-soong-tests nothing
Change-Id: I02a7925dd6b5b33107dae1507447f8e7a1991795
2024-01-10 14:07:35 +00:00
LaMont Jones
afe7baf47d Propagate aconfig providers for more modules.
Bug: 308625757
Test: manual
Change-Id: Iaf6d45a4259f1c6c34476c34c431344283ae2830
2024-01-10 14:03:30 +00:00
LaMont Jones
acae2d7656 move SetAconfigFileMkEntries to android
This will need to be called by some modules handled in android.

Bug: 308625757
Test: manual
Change-Id: Ic56e8ef3a453c59866aab6d39a21108cf8536b56
2024-01-10 14:03:29 +00:00
LaMont Jones
1e0a69a02e aconfig: harden dependency collection
To prevent errors, when we collect dependencies for a module, walk the
blueprint modules, and ignore blueprint and disabled modules.

This avoids errors in validateAndroidModule when a android.Module (such
as a genrule) depends on a blueprint.Module, and strict checking is
enabled.

Bug: 308625757
Test: manual

Change-Id: I11f0a0b504aa18d6d786cc91319b9d1d9497c04f
2024-01-10 14:02:47 +00:00
Dennis Shen
2127887e32 Merge "Enforce one aconfig_declaration per aconfig package" into main 2024-01-10 12:46:06 +00:00
JaeMan Park
3dba4d2c60 Disable tidy checks for generated code
Generated codes like cpp code from *.ll for *.yy files always run
clang-tidy, when generated code has warning, where is no way to fix it.

So, disable clang-tidy for generated code.

Bug: 162909698
Test: go test android/soong/cc
Change-Id: I0fee137d6170ef4bf6cf641abad572e448aceaa1
2024-01-10 16:29:51 +09:00
Jim Tang
82403f0f6e Merge "Ignore LOCAL_XTS_TEST_PACKAGE translation" into main 2024-01-10 04:11:36 +00:00
Treehugger Robot
395c47f635 Merge "Generate VNDK independent image variant with cc genrule" into main 2024-01-10 02:51:34 +00:00
Treehugger Robot
d06bdb0310 Merge "Update released flagged apis rule" into main 2024-01-10 02:00:54 +00:00
Dennis Shen
4e7773d81e Enforce one aconfig_declaration per aconfig package
Bug: b/319121098
Change-Id: Ibe3f1587ed7754f00f464cf385ce51ee9a142412
2024-01-10 01:53:49 +00:00
Kiyoung Kim
4c41458f9c Merge "Split usage of UseVndk" into main 2024-01-10 01:15:45 +00:00
Kiyoung Kim
853e391eca Generate VNDK independent image variant with cc genrule
Image variants for CC modules were covered to work without VNDK version
from previous commit, but CC genrule has its own image variant rule, so
it should be also updated to generate vendor / product image variant
without VNDK version.

Bug: 316829758
Test: m nothing --no-skip-soong-tests passed
Test: AOSP cuttlefish build succeeded

Change-Id: I425dd425efcc57c7ff8f9964b303ad6f539c3b57
2024-01-10 10:13:31 +09:00
Jihoon Kang
125b0a7639 Update released flagged apis rule
The aconfig command has been recently updated to fully specify the
output format instead of passing the keyword format (e.g., bool). This
change reflects the change in the aconfig tool.

Test: m art.module.public.api && inspect the generate released-flagged-apis-exportable.txt output
Change-Id: I620b7f34c346288ca87342448f50a0e90813304f
2024-01-10 00:59:12 +00:00
Treehugger Robot
ec3887ad2f Merge "Replace panic with ModuleErrorf" into main 2024-01-10 00:16:52 +00:00
Treehugger Robot
b087a04583 Merge ""master" was renamed "main"." into main 2024-01-09 23:06:36 +00:00
Spandan Das
59a4a2b8d2 Replace panic with ModuleErrorf
This is a followup cleanup for aosp/2876754 and replaces panic with
ctx.ModuleErrorf. The latter creates a more expressive build error.

Implementation details
- export moduleErrorf interface from build/soong/android. This minimal
  interface will be used as a parameter for `DexJarBuildPath`
- Add ModuleErrorf to the function signature of DexJarBuildPath. This
  parameter only gets used for Import and SdkLibraryImport structs.
  These two can have duplicate deapexer definitions, and ModuleErrorf
  will be used to report that error
- Create a minimal implementation of `ModuleErrorf` in tests of java and
  apex

Test: m nothing --no-skip-soong-tests
Change-Id: I0febec651f40c3f04deb957e64133c94b80fbd78
2024-01-09 22:53:52 +00:00
Elliott Hughes
10363161e7 "master" was renamed "main".
Test: N/A
Change-Id: I86d5578eaac260e55a9583db7ab49812b4ba1f5d
2024-01-09 22:09:07 +00:00
Treehugger Robot
8f17189ced Merge "Fix the static rule for generating the revert annotations" into main 2024-01-09 20:24:32 +00:00
Jihoon Kang
150d87fce0 Fix the static rule for generating the revert annotations
While the static rule depends on the keep-flagged-apis binary, the
command deps was mistakenly not specified. This change fixes the rule.

Test: m
Change-Id: I4875ac516e0e03389eb6a09d720c94f28710fbc9
2024-01-09 19:23:36 +00:00