Commit Graph

83380 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Yi Kong
12bebf9567 Switch host native tests to -Og
This helps to reduce build artifact size significantly, by 1.33GB for
`m cts` in the `out` directory on aosp-main. This should also make them
a lot faster to run.

Also turns off unused-result warning. This analysis is not run on -O0,
leaving behind a ton of code that triggers this warning. Since it is not
an important warning for tests anyway, turn it off by default for tests.

Right now, -Og is just an alias for -O1 in Clang. If the debuggability
is affected due to this change, we can identify and disable the relevant
optimization pass in -Og.

Change-Id: I84383cbc05a53d89c322ecb3679320f1338542e6
Bug: 294796809
Test: presubmit
2024-07-10 12:33:46 +00: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