Commit Graph

83404 Commits

Author SHA1 Message Date
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
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
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
Treehugger Robot
0adcc8c83d Merge "Min_sdk_version check for updatable apexes" into main 2024-07-16 19:09:03 +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
mrziwang
1ea01e3c59 Use OutputFilesProvider in module_test
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

Test: CI
Bug: 339477385
Change-Id: Iaf0b039b17d34e1a696f2c87df2f0db39307fc6d
2024-07-12 12:26:34 -07:00
Martin Stjernholm
7559803b12 Add libdexfiled to the stub library multi APEX exception list.
We need to add stubs to it to produce a correct linker config for the
ART debug APEX in eng builds.

We should be able to clean up all the ART exceptions when the debug
APEX is removed. Add a TODO reference to the ticket tracking that.

Test: See the other CL in the topic.
Bug: 349767294
Change-Id: Ida7ea96ccc3e29c2899d5ec12c4e8c8ae983a355
2024-07-12 19:33:43 +01:00
Colin Cross
f52bbd36e6 Add dot files that describe java compilation
Test: N/A
Change-Id: I70897a680377a30e39552bfafc4d17a94837765c
2024-07-11 17:20:22 -07:00
Colin Cross
17f9dc5f76 Remove obsolete rust VariantIsStatic
Rust modules no longer have static variants after
I2925f67f6dc9329dae3dcccafb8560900ac8a6fc, remove the VariantIsStatic
field.

Bug: 254469782
Test: m
Test: m blueprint_tests
Change-Id: Ic63412a27c3a09dec43c4a9064a3e1f4181147db
2024-07-11 16:59:34 -07:00
Colin Cross
77c5e9f9d4 Don't forward apex dependencies to platform when they are added later
IncomingApexTransition normally returns "" for modules that have
no apex variation so that apex variations can depend on non-apex
variations, for example for NDK libraries.

addDependencyOntoApexModulePair uses OtherModuleDependencyVariantExists
to decide whether to add a dependency on a module in an apex.  If
IncomingApexTransition returns "" then OtherModuleDependencyVariantExists
will always return true.  Return the incoming variation when addding
dependencies after the apex transition mutator has already run.

Bug: 319288033
Flag: EXEMPT bugfix
Test: all soong tests pass with later patches applied
Change-Id: Iec40c3be2ed04dca16a9fa6fa0a1c31056b536a8
2024-07-11 16:59:34 -07:00
Colin Cross
e1a8555581 Add IsAddingDependency to IncomingTransitionContext
Add an IsAddingDependency method to IncomingTransitionContext that
returns true if IncomingTransition is called after the transition
has already won while adding a new dependency.  This will be used
as part of the transition mutators to support an apex use case where
incoming dependencies during the initial apex mutator need to be
rewritten onto the platform variant for modules that don't support
the apex, but a later call to OtherModuleDependencyVariantExists
must not rewrite the requested apex variation onto the platform
variant.

This should be used sparingly, all uses will have to be removed in
order to support creating variants on demand.

Bug: 319288033
Test: TestIsAddingDependency
Flag: EXEMPT refactor
Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
2024-07-11 16:59:34 -07:00
Colin Cross
694fced1e3 Don't mutate non-property module fields
Setting sanitize and stl to nil in a mutator isn't valid, if any other
mutator creates a variant then the factory method will be called again
to create the new variants and will reset sanitize and stl to non-nil.
Add a property to sanitize and check it everywhere that checked for
sanitize != nil, and set the Stl property.

Bug: 319288033
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: If99d5fa0f088ee4a73cc7dccdab4268618a6009f
2024-07-11 16:59:33 -07:00
Treehugger Robot
e7485b871a Merge "Pass the --cfg soong flag when building rustdoc" into main 2024-07-11 22:19:19 +00:00
Treehugger Robot
2f867fd9ac Merge "Remove hidden_api_packages as it is no longer needed" into main 2024-07-11 20:59:19 +00:00
Colin Cross
088123934b Merge "Remove test_per_src" into main 2024-07-11 20:32:23 +00:00
Zi Wang
5ab1eb8822 Merge "Update the way to get output files in license_metadata" into main 2024-07-11 18:50:22 +00:00
Chris Wailes
3d211a0567 Pass the --cfg soong flag when building rustdoc
This CL modifies Soong to pass the `--cfg soong` flag to the rustdoc
tool.

Test: m rustdoc
Bug: 303116432
Change-Id: I089edebe3c0450b9f9d4f97404bafb7e90ed1f8a
2024-07-11 11:33:11 -07:00
mrziwang
01201ed2ed Update the way to get output files in license_metadata
The output files from a module is obtained from OutputFilesProvider
instead of from OutputFileProducer, which is going to be
deprecated.

Test: CI
Bug: 339477385
Change-Id: I2a5488653d9ba05c7ebd5a0b452e75fcc676c893
2024-07-11 10:21:57 -07:00
mrziwang
68b2594524 Fix typo in outputFilesForModule error message
Test: CI
Change-Id: I41f28a0412613458a0dad132006adfbc9fbbce2c
2024-07-11 09:58:30 -07:00
Chaitanya Cheemala
50fe598e79 Merge "Revert "Upgrade to clang-r530567"" into main 2024-07-11 14:56:41 +00:00
Paul Duffin
d2adde79aa Remove hidden_api_packages as it is no longer needed
The `--hide-package` option that this uses is being removed from
Metalava. The same functionality can more easily be achieved by simply
creating a `package.html` or preferably `package-info.java` that
contains `@hide` in their `<body>` tag or Javadoc respectively.

Bug: 351991463
Test: m checkapi
Change-Id: If7ea2449d1bddc0df460c285bf7959dbf9409b04
2024-07-11 14:08:19 +01:00
Chaitanya Cheemala
8e2c5c22be Revert "Upgrade to clang-r530567"
This reverts commit b4f05f1a05.

Reason for revert: Likely culprit for b/352459464  - 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: Iaea4511402b2818904f84e512f4f77487d0efafc
2024-07-11 12:48:56 +00:00
ELIYAZ MOMIN
52a4ae5744 Merge "Revert "Upgrade to clang-r530567"" into main 2024-07-11 12:38:30 +00:00
ELIYAZ MOMIN
9d00ea3e95 Revert "Upgrade to clang-r530567"
This reverts commit b4f05f1a05.

Reason for revert: <Potential culprit for b/352458178  - 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: Idf6c69296c6537e8011c2ce5fcbdf45a29154acf
2024-07-11 12:35:41 +00:00