Commit Graph

83370 Commits

Author SHA1 Message Date
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
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
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
Pechetty Sravani
45ca89a4a2 Merge "Revert "Enable -Wfortify-source"" into main 2024-07-11 09:55:12 +00:00
Ulya Trofimovich
59514dc77c Merge "Add property No_dex_container to dexProperies." into main 2024-07-11 08:48:54 +00:00
Ulya Trafimovich
c8160584f3 Add property No_dex_container to dexProperies.
This is needed to allow individual apps disable dex container (also
known as "multi-dex") once it has been enabled globally. This property
does not translate to D8 options, it is used only in the build system.

Bug: 341652226
Bug: 329907267
Test: atest CarLauncherTests -- --abi x86_64
Change-Id: I3afda554af93dbb35bb2f4a8032ac0f5ed1df40d
2024-07-11 08:47:54 +01:00
Yabin Cui
295306f5f2 Merge "Upgrade to clang-r530567" into main 2024-07-11 04:01:25 +00:00
Zi Wang
256772f02c Merge "Use OutputFilesProvider on java modules" into main 2024-07-11 01:24:10 +00:00
Liana Kazanova
852a98fd8c Revert "Enable -Wfortify-source"
This reverts commit cbf426fa50.

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

Change-Id: I214aa6e2a707ed22aac901db988a33affc37e269
2024-07-10 22:10:08 +00:00
Aditya Kumar
05f3927c09 Merge "Enable -Wfortify-source" into main 2024-07-10 21:07:26 +00:00
Colin Cross
06c0a03bbe Merge "Support defaults for gensrcs modules" into main 2024-07-10 20:42:54 +00:00
LaMont Jones
1ff11b5159 Merge "Allow n2 as a replacement for ninja in builds" into main 2024-07-10 19:39:23 +00:00
Cole Faust
bee030d36b Allow n2 as a replacement for ninja in builds
If `SOONG_USE_N2=true` is set in the environment, then n2 is used in
place of ninja.  Some ninja features are not available in n2 at this
time, but this enables bringup efforts to happen in parallel.

Bug: 352368206
Test: manual
Change-Id: I8455cb24eb640a4651782ee76e48a7d3a9932b93
2024-07-10 12:35:32 -07:00
Colin Cross
9e47dcc597 Merge "Add oryon to arm64 cpu variants" into main 2024-07-10 19:26:24 +00:00
mrziwang
9f7b9f4a9a Use OutputFilesProvider on java modules
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: I3c9f0b766325dd490bc903dc65259c3953d34606
2024-07-10 12:18:06 -07:00
Roopesh Nataraja
826912e7d4 Add oryon to arm64 cpu variants
Bug: 350058746
Test: builds
Change-Id: I717e035165a7529629061cbfcb076b168dc031d6
2024-07-10 10:24:04 -07:00
Treehugger Robot
9ed8aff5e3 Merge "Support for prebuilt_avb in Soong" into main 2024-07-10 01:54:31 +00:00
Nelson Li
1fb94b2245 Support for prebuilt_avb in Soong
Generally, the `root` directories for `prebuilt_etc` and
`prebuilt_root` are <partitions>. And <partitions> default to false
for InstallInRoot(), they always create a "system" subdirectory.
(See android/paths.go:modulePartition())

However, avb keys like `q-developer-gsi.avbpubkey` are installed by
default in the `avb` subdirectory under the `root directory` of the
<partition>. Therefore, it is necessary to create `prebuilt_avb` in
Soong and force the installation directory to be the `avb` subdirectory
under the `root directory` of the <partition> to meet the requirements.

Bug: 347636127
Test: go test -run TestPrebuiltAvbInstallDirPath
Change-Id: I0ee08492da9a96a567700a7285c527b280dcd5db
2024-07-10 08:43:53 +08:00
Treehugger Robot
60cb3a6dce Merge "Properly package JNI libs in Robo tests" into main 2024-07-09 23:10:30 +00:00
Zi Wang
8dfc2bf163 Merge "Use OutputFilesProvider on Import, AARImport and AndroidAppImport" into main 2024-07-09 21:28:55 +00:00
Zi Wang
e020ba9ce0 Merge "Use OutputFilesProvider on droidstubs" into main 2024-07-09 20:38:54 +00:00
Zi Wang
aee299e9f3 Merge "Remove OutputFiles method from llndk_libraries_txt and sanitizer_libraries_txt" into main 2024-07-09 19:30:39 +00:00
mrziwang
39e68fff47 Use OutputFilesProvider on droidstubs
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: I8ea7463cfc3881d800255aa99147897eeba85b04
2024-07-09 10:57:54 -07:00
mrziwang
68786d81de Use OutputFilesProvider on Import, AARImport and AndroidAppImport
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: I51ccf59f97cb8a790642cb4463c479feaf18058a
2024-07-09 10:41:55 -07:00
Ivan Lozano
dc554b218d Merge "Disable dsymutil usage on Darwin host" into main 2024-07-09 17:35:14 +00:00
LaMont Jones
ad111586a7 Merge "Avoid C++ naming error" into main 2024-07-09 12:49:29 +00:00
Jamie Garside
56f2b7000c Properly package JNI libs in Robo tests
Previously, the jni_libs property was ignored when packaging
robolectric-tests.zip, meaning that tests sometimes couldn't find native
libraries. This change causes any native libs that tests use to be
written alongside the .jar/.apk for Robolectric tests.

99% of this code is just stolen from the Ravenwood tests, as they work
in this area. In short though, any native libs will be built for the
host arch and put in the correct place.

Tests are a little lacking (just testing the new functionality), but I'm
not 100% sure how to test the rest of the Robolectric file.

Bug: 340801983
Test: Manually verified, `go test` in java/
Change-Id: I4ef28b1cbc4675fc329dc8fcab06d055d6538e60
2024-07-09 11:04:29 +00:00
Alyssa Ketpreechasawat
40ca9c933b Merge "Add option to override defaultManifestVersion for app." into main 2024-07-09 09:33:48 +00:00
Alyssa Ketpreechasawat
ee8b44e72a Add option to override defaultManifestVersion for app.
Add an option to override defaultManifestVersion using environment
variable. With this environment variable, the mainline developer will be able to locally customize the app version to higher version and install it to target devices. This is also helpful as a workaround to adjust app/apex version for coverage build (e.g. 3520 to 3500) and allow the installation of app/apex from mainline release branch (e.g. 3508) onto it. This functionality already existed for apex, so we are extending to the app.

Test: 347735412
Bug: 350986287
Bug: 347735412
Test: OVERRIDE_APEX_MANIFEST_DEFAULT_VERSION=990090000 m
Test: adb shell pm list packages --show-versioncode
Change-Id: I58259fe781ca121ba4067f308f1744d80c1c2d48
2024-07-09 09:32:48 +00:00
Treehugger Robot
72be248e10 Merge "cc_cmake_snapshot: drop Modules field" into main 2024-07-09 01:01:44 +00:00
Treehugger Robot
88af056544 Merge "LLNDK libraries can also provide libraries" into main 2024-07-09 00:51:45 +00:00
Nathan Egge
c41630c249 Merge "Add LEX to the list of env variables to unset." into main 2024-07-09 00:15:53 +00:00
Treehugger Robot
8359e6e0c3 Merge "Relax cflag checks for -Xclang and -target*" into main 2024-07-09 00:05:44 +00:00
Nathan Egge
978c934dd9 Add LEX to the list of env variables to unset.
Some linux environments export LEX and this variable must be unset to
 ensure Soong and Make LEX values match.

Change-Id: I8ff2b62a49e0108575ff88b1a88a83d650fc3768
2024-07-08 20:53:46 +00:00