Commit Graph

83458 Commits

Author SHA1 Message Date
Treehugger Robot
b137e55a39 Merge "Specify Is_stubs_module property in top level sdk library" into main 2024-07-23 19:42:06 +00:00
Treehugger Robot
b359e61d2a Merge "Pass config files to metalava" into main 2024-07-23 19:38:09 +00:00
Yabin Cui
44ee7a690e Merge "Update Bindgen clang to clang-r530567" into main 2024-07-23 17:53:55 +00:00
Treehugger Robot
9a2f01b762 Merge "Drop module sdk MakeUninstallable special case" into main 2024-07-23 16:23:45 +00:00
Paul Duffin
278193669e Pass config files to metalava
Adds a filegroup "metalava-config-files" whose contents are passed to
Metalava using the `--config-file` option.

Bug: 354699349
Test: m checkapi
Change-Id: I1e246517c2ef678e41214c975aecee97f9faca67
2024-07-23 10:38:01 +01:00
Jiyong Park
c25dea9d73 Merge "Update visibility according to the change AVF directories layout" into main 2024-07-23 07:21:23 +00:00
Spandan Das
2f68f1903a Drop module sdk MakeUninstallable special case
Platform variants of module sdk libraries were marked as uninstallable
originally in https://r.android.com/1974259. This special case is no
longer necesssary - android.MutateApexTransition will call
MakeUninstallable on the platform variant on both the source and
prebuilt soong modules when the following conditions are met
- //apex_available:platform is not listed in apex_available (explicitly
  or via the default implicit)
- the soong module is included in an apex that exists in the tree
  (listed in native_shared_libs)

Since MakeUninstallable is set by apex specific mutators, the relevant
unit test has been moved to the apex package. The Android.bp of the test
has also been extended with an apex that includes the shared library.

Test: m nothing --no-skip-soong-tests
Test: no diff in out/soong/Android-$product.mk
Test: added prebuilt_libdexfile to art's apex_contributions locally, no
diff in out/soong/Android-$product.mk

Bug: 220898484
Change-Id: I43a324882d486451bb921028853508d7ec3d76bf
2024-07-22 23:13:20 +00:00
Jihoon Kang
e4a9017327 Specify Is_stubs_module property in top level sdk library
java_sdk_library's "magic" will always resolve to stubs when either of
the following conditions are met:
- the module sets `api_only` property to "true": this signifies that
  the module does not create an implementation library, thus the "magic"
  always returns stubs
- the module sets `default_to_stubs` property set to "true": this
  signifies that the reverse dependencies outside of the same apex will
  always get the stubs, even when the rdep does not specify the
  sdk_version.

This change utilize this information and mark the top level sdk_library
as a stubs module when any of the above conditions are met, in order to
minimize the false positives in container violation errors.

Test: Run container enforcement and observe results
Bug: 354029496
Change-Id: I04b52c5662f635ab1837eb33a39f187ae8998238
2024-07-22 22:31:50 +00:00
Yabin Cui
aca752647e Update Bindgen clang to clang-r530567
Bug: 342023558
Test: presubmit
Change-Id: I9ff1ee32f99728a982f4982121f86e94d4d98f91
2024-07-22 13:45:46 -07:00
Treehugger Robot
39d3883500 Merge "Fix afind command" into main 2024-07-22 14:05:18 +00:00
Treehugger Robot
e69b3218f3 Merge "Add jarjar_rename property to java modules." into main 2024-07-22 14:04:06 +00:00
Jiyong Park
f6736c714f Update visibility according to the change AVF directories layout
Bug: 352458998
Test: m nothing
Change-Id: I594301a48ad224d10ee0f3030f4c7dbd179b82ba
2024-07-22 11:22:35 +09:00
Joe Onorato
451ceec4dd Fix afind command
afind "*.foo" didn't work because "*.foo" got expanded inside afind

Change-Id: Ia479ed6e50e64fe2ffdf1983050a6da91d6a06f0
2024-07-20 17:46:15 -07:00
Joe Onorato
a5d171773d Add jarjar_rename property to java modules.
It's the same mechanism that aconfig uses, but now it's exposed directly
to Android.bp files.  (I had wanted to test it out there before making
it a property just in case it didn't work well)

Bug: 352385368
Test: go test -v -run TestJarJar.*
Change-Id: I72d797d08a250be93779ee4b038a1b8fc62123b7
2024-07-20 17:46:15 -07:00
Elliott Hughes
081aaa9571 Remove armv7-a.
Non-neon armv7 hasn't been supported for OS builds for many years now.

Change-Id: I230cd0b20cc166a59b622c9cd82b7f06ef3ca3b0
2024-07-19 20:49:08 +00:00
Treehugger Robot
dd9b0c1be8 Merge "Remove allowlist for updatable modules with current min_sdk_version" into main 2024-07-19 17:04:57 +00:00
Spandan Das
ad2aa3d220 Merge "Add all compile deps to module_bp_java_deps.json" into main 2024-07-19 16:22:57 +00:00
Treehugger Robot
00abdc02de Merge "Add 'use_debug_art' to product_variable" into main 2024-07-19 03:21:23 +00:00
Treehugger Robot
66884937f8 Merge "Fix DISPLAY_BUILD_NUMBER" into main 2024-07-19 01:25:17 +00:00
Spandan Das
8aac993b94 Add all compile deps to module_bp_java_deps.json
`Dependencies` in module_bp_java_deps.json currently only contains the
`libs` and `static_libs` of the corresponding module. This is only a
subset of the dependencies which are required to compile the java
module. Most notably, the SDK deps (determined using `sdk_version`) are
missing.

This CL adds all the compile dependencies to the json file. Implementation
details:
1. Add a `compileDepNames` to java.Module in base.go. Almost all the
   module types in java package are composed with the java.Module
struct.
2. Populate this property in java.Module.collectDeps. This function is
   used by java.Module.compile to determine the classpath used for
compilation.
3. Return `compileDepNames` in java.Module.CompilerDeps.

Since `compileDepNames` is populated in `GenerateAndroidBuildActions`,
update existing unit tests that check for correctness of IDEInfo.Deps

Bug: 353811607
Test: m nothing --no-skip-soong-tests
Test: cat out/soong/module_bp_java_deps.json | jq '."DebuggingRestrictionController".dependencies'
[
  "android_system_stubs_current", <-- missing previously
  "core-lambda-stubs", <-- missing previously
  "core-public-stubs-system-modules", <-- missing previously
  "com.google.android.material_material",
  ...
  ...
]

Change-Id: I166c0eaf6e87ca7adc98bb4e21447cf82612d103
2024-07-19 01:03:27 +00:00
Inseob Kim
51d3a6d2d3 Fix DISPLAY_BUILD_NUMBER
The dot was accidentally removed.

Bug: 353425495
Test: build
Change-Id: Id0c08f3c98d5b2f56e49180baf98bb8847f6bebd
2024-07-19 09:26:36 +09:00
Atneya Nair
8a66409462 Merge "dirmods: Update to take absolute paths" into main 2024-07-18 23:27:17 +00:00
Treehugger Robot
bd3fd1daca Merge "Populate java_api_libray's IDEInfo" into main 2024-07-18 22:29:17 +00:00
Spandan Das
4ae68018a0 Populate java_api_libray's IDEInfo
Adding the srcjar to module_bp_java_deps.json is useful for IDE
autocompletion of rdeps.

Bug: 353806911
Test: cat out/soong/module_bp_java_deps.json | jq '."core.current.stubs.from-text"'
{
  "dependencies": [
    "stub-annotations"
  ],
  "srcjars": [
    "out/soong/.intermediates/build/soong/java/core-libraries/core.current.stubs.from-text/android_common/metalava/core.current.stubs.from-text-stubs.srcjar"
  ],
  "path": [
    "build/soong/java/core-libraries"
  ],
  "libs": [
    "stub-annotations"
  ]
}

Change-Id: Ie4ad985a7da40b478453735dfdb10d0ac63ab8f4
2024-07-18 21:35:28 +00:00
Treehugger Robot
c7eb3bdae7 Merge "Highlight build failures in soong output" into main 2024-07-18 20:13:15 +00:00
Atneya Nair
30f3662693 dirmods: Update to take absolute paths
Dirmods currently expects a path relative to the top of the build. If
an abs path is passed, it will never match anything.

Modify so that if path is absolute, we fix-up the path relative to
ANDROID_BUILD_TOP.

Test: manual
Bug: trivial
Change-Id: Iad99228078dc693ab5f7957e007fe1bd5cea07d2
2024-07-18 12:28:11 -07:00
Treehugger Robot
c003b63aa1 Merge "Document how resources are built with and without resource processor" into main 2024-07-18 18:05:15 +00:00
Colin Cross
ea1b3b78b8 Merge changes from topic "elide_empty_variants" into main
* changes:
  Convert sdk mutator to TransitionMutator
  Convert link mutator to TransitionMutator
  Convert version mutator to TransitionMutator
  Convert python_version mutator to TransitionMutator
  Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
2024-07-18 17:37:38 +00:00
Ivan Lozano
e9871abe44 Merge "android: Use slices.DeleteFunc for filtering" into main 2024-07-18 17:27:34 +00:00
Treehugger Robot
16afb50a6a Merge "Update run-ckati.sh to use JDK 21" into main 2024-07-18 16:45:03 +00:00
Devin Moore
aa4f1c20c2 Merge "Support phony_output as a BuildParam Arg in RuleBuilder" into main 2024-07-18 15:21:12 +00:00
Ivan Lozano
03b717d3f1 android: Use slices.DeleteFunc for filtering
Clean-up two filters in arch.go by using slices.DeleteFunc

Bug: 353739440
Test: m blueprint_tests
Change-Id: I3738bb7961830e2c287257cceb64194f048514d3
2024-07-18 15:13:50 +00:00
Ivan Lozano
a0258d8b3f Merge "android: Add host_cross_supported prop" into main 2024-07-18 14:31:02 +00:00
Ivan Lozano
c7eafa7a41 android: Add host_cross_supported prop
Some modules are only intended to be build for the build host,
e.g. rust_library modules only used in rust_proc_macro or
code generators.

These should not be expected to be built for or supported on non-build
host platforms. Thus, add a host_cross_supported property to disable
the HostCross target.

Test: m blueprint_tests
Test: Modules with host_cross_supported: false don't build for HostCross
Change-Id: Ia15f55776e04d86aee19bb0dd0d27e1b985b2b75
2024-07-18 13:28:27 +00:00
Sorin Basca
6b805b9384 Update run-ckati.sh to use JDK 21
Bug: 342332820
Change-Id: Id6dd630a78ac790e682f6c839b6ab26cc3a5671b
Test: TH
2024-07-18 09:39:00 +00:00
Kiyoung Kim
881e465fda Add 'use_debug_art' to product_variable
Add 'use_debug_art' property to product_variable so it can be checked
from Android.bp whether ART debug APEX or ART APEX should be used.

Bug: 351698657
Test: AOSP CF eng build succeeded
Test: AOSP CF userdebug build succeeded
Change-Id: I01cd80f0d899c55828ecb05fdafdc9bb05fd8200
2024-07-18 13:25:18 +09:00
Treehugger Robot
2484be669a Merge "Support aapt2 resources flagging" into main 2024-07-18 01:37:24 +00:00
Colin Cross
c56c3f7485 Document how resources are built with and without resource processor
In preparation for switching the default of use_resource_processor
to true document how Soong compiles resources with and without
resource processor.

Bug: 294256649
Test: documentation only
Flag: EXEMPT documentation
Change-Id: I7d5f90c70925138d7c142832423103e6e6840d60
2024-07-17 16:59:11 -07:00
Treehugger Robot
c404b2b4d1 Merge "release-config: disallow new duplicate flag declarations" into main 2024-07-17 23:39:22 +00:00
Zi Wang
c7dc585ff2 Merge "Return error for unsupported context in outputFilesForModuleFromProvider" into main 2024-07-17 23:33:55 +00:00
Treehugger Robot
865b877027 Merge "Generate .build-id directory tree after every build." into main 2024-07-17 23:13:24 +00:00
Colin Cross
ac57a6c6df Convert sdk mutator to TransitionMutator
Replace cc.sdkMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: If9034ff73e02f1e6ee08bc3afc9a0576e0641651
2024-07-17 15:50:36 -07:00
Colin Cross
767819fede Convert link mutator to TransitionMutator
Replace cc.linkageMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: I776515ab58a35c4a0a8e06cb9d0a256f8fb2ac5e
2024-07-17 15:50:36 -07:00
Colin Cross
add04a8c94 Convert version mutator to TransitionMutator
Replace cc.versionMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: Idfd4157115d6f03997a339b43b3da9c2dfe2418d
2024-07-17 15:50:36 -07:00
Colin Cross
e0771288c1 Convert python_version mutator to TransitionMutator
Replace python.versionMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: I12eafbe0563b202db8cadf69cbacdf39ce6f11b5
2024-07-17 15:50:36 -07:00
Colin Cross
8a49a3dd76 Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
Replace rust.LibraryMutator and rust.LibstdMutator with
TransitionMutators.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Test: no change to build.ninja
Change-Id: Ia24a582119d39889279d7b93bac9259685153619
2024-07-17 15:50:36 -07:00
LaMont Jones
cba2330e84 release-config: disallow new duplicate flag declarations
Flags must only be declared in one place in the tree.  This change
prevents new ones from being added while we fix the bad flags already
present.

Bug: 352105274
Test: manual
Merged-In: I8c4bf2b2852685e84177500f28fe8908016082b9
Change-Id: I8c4bf2b2852685e84177500f28fe8908016082b9
2024-07-17 15:48:10 -07:00
Sean Hua
cd5c7d757a Merge "Use default fallback when generating cc deps" into main 2024-07-17 22:44:19 +00:00
Spandan Das
32c93a3f3c Remove allowlist for updatable modules with current min_sdk_version
All existing violations have been cleaned up.

Bug: 221087384
Test: presbumits
Change-Id: Iefe318d9372d4078f21b03e0d9003609cca069ab
2024-07-17 20:31:58 +00:00
mrziwang
7a47bd3a81 Return error for unsupported context in outputFilesForModuleFromProvider
Test: CI
Change-Id: I42d2341ea2613a28d403615f3ebccd0067d5501f
2024-07-17 11:11:05 -07:00