Commit Graph

83445 Commits

Author SHA1 Message Date
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
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
LaMont Jones
92b54c4907 Add more guardrails to release config compilation
Throw an error if a release config dir appears to contribute flagging
overrides to a release config without actually doing so (by having
release_configs/{name}.textproto).

Bug: None
Test: manual, TH
Change-Id: Ie71cd6898bda4b8da8d58c3e23fb89ed17ebebd1
2024-07-17 16:19:18 +00:00
Yabin Cui
96fbf8ba93 Merge "Reapply "Upgrade to clang-r530567"" into main 2024-07-17 16:13:19 +00:00
Treehugger Robot
6485cf11dc Merge "Add libdexfiled to the stub library multi APEX exception list." into main 2024-07-17 13:35:50 +00:00
Nikita Putikhin
291dc55e66 Merge "Switch rust test install base to /data/local/tmp for consistency with cc" into main 2024-07-17 11:34:28 +00:00
Treehugger Robot
7d45f55991 Merge "Support more variables for "debuggable"." into main 2024-07-17 01:56:59 +00:00
Sean Hua
e783ed59a5 Use default fallback when generating cc deps
The current logic enforces a device arch match and omits a module
altogether if none is found. To collect a more comprehensive list
of cc deps for IDE (ASfP) project setup, we introduce a fallback
that defaults to an arbitrary (first-processed) variant.

Bug: 322369312
Test: refreshmod
Change-Id: Ic5e1fd39e569735ff90b5c71ab1395632cca9af7
2024-07-16 23:28:14 +00:00
Yabin Cui
8c69b7852b Reapply "Upgrade to clang-r530567"
Reapply after fixing existing build and test failures.
This reverts commit 8e2c5c22be.

Bug: 342023558
Test: presubmit
Change-Id: I4d36bab7015f401e7580c6287b7f94ffa25c74fc
2024-07-16 16:15:26 -07:00
Jihoon Kang
98ea83687f Support aapt2 resources flagging
This change modifies the aconfig and aapt2 build rules to support
resources flagging in aapt2.

Implementation details:
- Modify the aconfig text rule to include flag permission in the output
  text file
- Pass the `--flags-packages` argument to `aapt2 compile` command,
  similar to what is currently being done in the `aapt2 link` command

Bug: 344979955
Test: m nothing --no-skip-soong-tests
Change-Id: I3b0b1fd6dcd691b7cc50ba3d081ecafd82c2c904
2024-07-16 19:41:31 +00:00
Treehugger Robot
0adcc8c83d Merge "Min_sdk_version check for updatable apexes" into main 2024-07-16 19:09:03 +00:00
cherokeeMeta
f7119b57ac Highlight build failures in soong output
Summary: When build failures occur, it can be hard to find where the error message begins. We now highlight "FAILURE" in red to make it easier to see what exactly has failed in the output.

Test: execute automated tests with m nothing --no-skip-soong-tests, can also manually test with a build failure and observe red text in the output

Change-Id: Iad3b94cc1c385f0afdebdf12c44843db04ff2bdc
Signed-off-by: Cherokee Toole <cherokee@meta.com>
2024-07-16 18:18:33 +00:00
Devin Moore
b6cc64ffc4 Support phony_output as a BuildParam Arg in RuleBuilder
This allows a build rule to set the phony_output argument to ninja.
It's used to get ninja to ignore output files similar to .PHONY for
make.
It will cause the build rule to be run every time regardless of if or
when the output file was created.

Test: m android.hardware.bluetooth.audio-update-api &&
      git restore bluetooth/audio/aidl/aidl_api/* &&
      m android.hardware.bluetooth.audio-update-api
Bug: 353287999

Change-Id: I47b0b9e3ce2d8cb637b0102031193c81de24a680
2024-07-16 17:23:42 +00:00
Zi Wang
03b228e725 Merge "Remove OutputFileProducer" into main 2024-07-16 15:58:46 +00:00
Chaitanya Cheemala
e952680e35 Merge "Revert^11 "Enable dex container (DEX v41) for the whole system"" into main 2024-07-16 12:41:17 +00:00