Commit Graph

83625 Commits

Author SHA1 Message Date
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
Taylor Santiago
3c16e61c57 Add ABFS (Android Build Filesystem) configuration option to Soong
Change-Id: Ibbe81004adc67b1212d7e619a35f7425bfee0d72
2024-07-17 14:50:25 -07: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
Chaitanya Cheemala
78fccd9380 Revert^11 "Enable dex container (DEX v41) for the whole system"
This reverts commit d4f7316224.

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

Change-Id: I187b9787d0b3f39c1d67c0e5a16930bee2af951d
2024-07-16 11:47:47 +00:00
Nikita Putikhin
5f23bc98ed Switch rust test install base to /data/local/tmp for consistency with cc
Previously this code was not doing anything because the template used
for rust did not use the template string that gets replaced with the
folder coming from this code. So all tests were getting deployed into
/data/local/tmp regardless of being vendor tests.

The other change in the chain adds the template string, so this code
starts working and system and vendor tests start being deployed into
different folders.

We want to keep the system test folder as before to avoid potential
problems with tests (see b/350479879#comment9).

Bug: 347370677
Test: presubmit
Change-Id: I93d5a8db3470d1603e26f9cf5d12249f29141a19
2024-07-16 13:29:31 +02:00
Herbert Xue
38178329e5 Support more variables for "debuggable".
Enhance bp feature to support
"product_variables.debuggable.exclude_static_libs" and
"product_variables.debuggable.jni_libs".

Bug: 325857852
Test: lunch akita-trunk_staging-userdebug && m ConnectivityMonitor
Change-Id: Iae843af2d41ec7754812a0b89a7ebc791c58e099
2024-07-16 17:29:27 +08:00
Ulya Trofimovich
acd022514c Merge "Revert^10 "Enable dex container (DEX v41) for the whole system"" into main 2024-07-16 07:38:16 +00:00
Inseob Kim
0c71fa987f Merge changes from topic "cf_system_root_files" into main
* changes:
  Add support installing to root of filesystem image
  Add install_in_root to prebuilt_root module
2024-07-16 04:52:08 +00:00
Treehugger Robot
9678733731 Merge changes I861a60e1,I01bf99fa,I9d16dfec into main
* changes:
  Add util method HasIntersection(...)
  Implement InstallableModule for Java modules
  Collect container informations
2024-07-16 00:43:04 +00:00
Jihoon Kang
b7e1a48376 Add util method HasIntersection(...)
Introduces a util method `HasIntersection(...)`, which returns true if
the two input lists have non-empty intersection.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I861a60e1973c92a773c127dfc595ad7514d7972f
2024-07-15 23:46:45 +00:00
Jihoon Kang
f86fe9a876 Implement InstallableModule for Java modules
This change enables the container information to be collected for Java
modules.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I01bf99fa274275a608601ad6248d577ae8f6dffc
2024-07-15 23:46:01 +00:00
Jihoon Kang
c3d4e115af Collect container informations
This change introduces a method to collect the information of what
containers (i.e. api domain, partition, or any custom defined boundaries
of interest) the module belongs to. The method is called in
`ModuleBase.GenerateBuildActions`.

Each container objects defines the following:
- name of the container
- list of "restrictions", which are the containers that a module that
  belongs to this container is not allowed to depend on. Each
  "restrictions" also defines custom rules which allow bypassing the
  restricted dependency. Each rules are an enum that are mapped to a
  function, given that functions are not hashable and thus cannot be set
  as a value in a provider.

Note that this change is a no-op, as the container information is only
collected for modules that implement the "InstallableModule" interface,
which is not implemented by any other module types in this change. This
will be utilized in the follow-up changes.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I9d16dfec0dcf06da464aa49ee7b23f46f1da236a
2024-07-15 23:43:36 +00:00
Priyanka Advani
45d61d8b11 Merge "Revert "Switch host native tests to -Og"" into main 2024-07-15 23:06:52 +00:00
Liana Kazanova
b88279f3b8 Revert "Switch host native tests to -Og"
Revert submission 2695387-host-tests-Og

Reason for revert: Droidmonitor triggered revert due to build breakage in b/353353713. Will be verifying through ABTD before submission.


Reverted changes: /q/submissionid:2695387-host-tests-Og

Change-Id: Ia8c75f9476f52dfce959c424bdf6b483bdf95c9f
2024-07-15 23:04:09 +00:00
Treehugger Robot
9408e95521 Merge "Fix asan build for Macos" into main 2024-07-15 22:24:54 +00:00
mrziwang
d38e63d474 Remove OutputFileProducer
All the module types that were using OutputFileProducer
are using OutputFilesProvider now. This CL removes the
remaining OutputFileProducer code.

Test: CI
Bug: 339477385
Change-Id: I3c29785a59b907117b16ca2d0e56ef846adfb228
2024-07-15 13:50:18 -07:00
Fabien Sanglard
4eea1b8e92 Fix asan build for Macos
Test: Continuous build once aosp/3169208 is merged again
Fixes: 349869396
Fixes: 349870640
Change-Id: I1d000aac10ce9842a1cd1c6d9eda0e02874f4d8a
2024-07-15 13:19:43 -07:00
Colin Cross
397db9d336 Merge "Add dot files that describe java compilation" into main 2024-07-15 19:51:45 +00:00
LaMont Jones
8e5dbdb93b Merge "release_config: add value_directories to artifact" into main 2024-07-15 18:40:15 +00:00
Inseob Kim
33f95a959d Add support installing to root of filesystem image
If the partition of a spec is "root", that spec will be installed to
root instead. Normally that spec will be from prebuilt_root module with
install_in_root property.

Bug: 351258461
Test: USE_SOONG_DEFINED_SYSTEM_IMAGE=true m && cvd start
Change-Id: Iaaa9c2fb8a81fe0ba4710c641e1b65c5b71ad4a4
2024-07-15 17:39:44 +09:00
Inseob Kim
be6a66d54b Add install_in_root to prebuilt_root module
This is to support installing to real root "/", not a root of partition
(e.g. "/system/").

Bug: 351258461
Test: build
Change-Id: I56993aceddfd988d2d10040f50f838b89c9bdc67
2024-07-15 17:39:09 +09:00
Yi Kong
b3769fcd23 Merge "Switch host native tests to -Og" into main 2024-07-15 08:11:55 +00:00
LaMont Jones
9877b7e627 release_config: add value_directories to artifact
release_config_artifact.directories contains the ordered list of
release config map directories that contributed flag declarations and/or
flag values to the release config (ignoring inheritance).

release_config_artifact.value_directories contains the ordered list of
release config map directories where we found a release_config message
for this release config.

Also, improve various error messages.

Bug: None
Test: manual, TH
Change-Id: Ifb67e80fc8746ae466f2e3515c5b0c3ba07a291d
2024-07-12 14:47:52 -07:00
Zi Wang
2dbf71fed8 Merge "Use OutputFilesProvider in module_test" into main 2024-07-12 20:39:09 +00:00