Commit graph

81859 commits

Author SHA1 Message Date
Paul Duffin
375acd8def Correct lint error when it cannot find api_versions_* module
Also, fixes the error when it cannot find a module containing the
`annotations.zip` file.

Bug: 336993217
Test: change `apiVersionsModule` setting in `lint.go` to refer to
      a non-existent module and then run `m nothing` to see the
      error message correctly lists the module name.
Change-Id: I84a9e241d1c3bedebc26e119bd4b9861664c43c1
2024-05-03 09:37:42 +01:00
Inseob Kim
364740b4a4 Merge "Merge logtags from cc modules too" into main 2024-05-03 05:10:22 +00:00
Jooyung Han
4191da7292 .capex is a container
.capex should be handled as a container when generating NOTICE.

Bug: n/a
Test: Presubmits
Change-Id: Ief4b0a8d18d52ff6510521e0a2b1f4588e259a75
2024-05-03 11:41:11 +09:00
Florian Mayer
37d17209b2 Merge "Make memtag_stack a variant" into main 2024-05-03 00:20:37 +00:00
Treehugger Robot
0cc2749a4f Merge "release-config: use ${TARGET_RELEASE} for output" into main 2024-05-02 23:24:32 +00:00
Colin Cross
814e80038b Merge changes from topic "replace_dependencies" into main
* changes:
  Only update DebugMutator and DebugVariation for non-empty transition variations
  Update docs for ReplaceDependencies[If]
  Raise test timeout when running soong tests with race detector
2024-05-02 22:50:28 +00:00
Cole Faust
a963b94cde Make the enabled property configurable
This allows using select statements with it.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-02 15:41:24 -07:00
Colin Cross
49be24b833 Convert overrides to a TransitionMutator
Replace the performOverrideMutator with a TransitionMutator.

Bug: 319288033
Flag: NONE
Test: all soong tests pass
Test: no change to build.ninja
Change-Id: I358f260f1bcd894d7803036ce77ba666c0429355
2024-05-02 15:31:58 -07:00
LaMont Jones
897ab4e087 release-config: use ${TARGET_RELEASE} for output
When the passed release name is an alias, write
release_config-PRODUCT-RELEASE.mk using the alias, since that is where
core/release_config.mk is going to look for it.

Bug: 328495189
Test: manual
Change-Id: I4e6909f43bf136974323754e06fa538e39e0faab
2024-05-02 15:19:18 -07:00
Colin Cross
888046f053 Only update DebugMutator and DebugVariation for non-empty transition variations
Non-transition mutators that don't create a variant for a given module
cause no change to DebugMutator and DebugVariation.  TransitionMutators
don't have a concept of skipping a module, so Mutate is called on
every module.  This causes extra entries in DebugMutator and DebugVariation,
which will confuse error message around missing variations, and require
updating variant strings in some tests.

Skip updating DebugMutator and DebugVariation for empty transition
mutator variations.  This isn't entirely correct, but transition mutators
don't currently have a concept of an unaffected module.

Bug: 319288033
Test: all soong tests pass
Flag: NONE
Change-Id: Ia4e659b1e90ffe4320074c9b49528d00fa302c6a
2024-05-02 14:39:40 -07:00
Colin Cross
86771326fe Update docs for ReplaceDependencies[If]
Update docs for ReplaceDependencies[If] to match changes in blueprint.

Bug: 319288033
Flag: NONE
Test: all soong tests pass
Change-Id: I7c79d3ac8dd80946760eb89b6577dc9965cb1541
2024-05-02 14:39:40 -07:00
LaMont Jones
01bd5b1ddf Merge changes from topic "lamont-flagging-flags" into main
* changes:
  RELEASE_ACONFIG_VALUE_SETS is a reserved flag
  Guard with RELEASE_BUILD_FLAGS_IN_PROTOBUF
2024-05-02 19:51:00 +00:00
Treehugger Robot
a73c4021ec Merge changes I439179a9,I8ad68f0d into main
* changes:
  Add pattern to match android-plus-updatable.jar
  Clean up apiLevelsGenerationFlags deps gathering
2024-05-02 18:17:08 +00:00
Aditya Kumar
c9b4d4c584 Merge "IsEnvTrue and IsEnvFalse should take True and False as valid values respectively." into main 2024-05-02 18:14:59 +00:00
Cole Faust
dbd91b0323 Merge "cc: Remove exclude_header_libs from export_header_lib_headers" into main 2024-05-02 17:58:59 +00:00
Cole Faust
bf67b542aa Merge "Add aosp-first preupload hook to soong" into main 2024-05-02 17:28:44 +00:00
Paul Duffin
5a195f40a0 Add pattern to match android-plus-updatable.jar
Change https://r.android.com/3068903 adds some extra
`android-plus-updatable.jar` files in `module-lib` and `system-server`
directories of API versions 30 through 34 in `prebuilts/sdk`. This
change modifies the build to pass those files, along with appropriate
`--android-jar-pattern` options to Metalava so it can use them when
generating `api-versions.xml` files for the different API surfaces.

The extra patterns are only passed when `extension_info_file` is
specified as there is no point in including the updatable modules that
contribute to SDK extensions without providing information about the
SDK extensions as well.

Bug: 337836752
Test: See https://r.android.com/3068903
Change-Id: I439179a9d35a4bb677e3bf87a3aea4a983724534
2024-05-02 17:33:02 +01:00
Paul Duffin
2ced2eb07f Clean up apiLevelsGenerationFlags deps gathering
Restructures the code a little to make it clear that extensions
directories are distinct from dessert release directories.

Bug: 337836752
Test: m --no-skip-soong-tests nothing
Change-Id: I8ad68f0d112e62f8f1ddda1b6718119fe18eb8a9
2024-05-02 08:30:27 +01:00
Inseob Kim
b7b8457a60 Add logtags support to filesystem module
If build_logtags is set to true, etc/event-log-tags will be built by
collecting all logtags files from all dependencies.

Note that this is different from Makefile's current behavior that
collects all logtags files, including ones from uninstalled modules. But
the behavior is probably unintended, and ideally each partition image
should have its own logtags, rather than putting all tags to /system.

Bug: 336189540
Test: m aosp_cf_system_x86_64
Change-Id: I72b384cbb65e812af909eacd18799bd86f1dab13
2024-05-02 13:52:43 +09:00
Treehugger Robot
512b52f759 Merge "Add a new property trim_extension for gensrcs" into main 2024-05-02 01:43:26 +00:00
Treehugger Robot
5197e880d9 Merge "Add support for keyboard prebuilt module type" into main 2024-05-02 01:08:04 +00:00
Cole Faust
30b11224de Add aosp-first preupload hook to soong
To give an earlier warning than the ayeaye warning in gerrit.

Test: Presubmits
Change-Id: Ic1bf8ab34cb76313dc53833600ea9ceaddb045c5
2024-05-01 17:54:59 -07:00
Kiyoung Kim
3a7caee04b Merge "Move LLNDK related logic to llndk_library" into main 2024-05-02 00:46:11 +00:00
Inseob Kim
7cadaf6708 Merge "Install classpath protobuf files" into main 2024-05-01 23:58:38 +00:00
Colin Cross
55f169abaa Raise test timeout when running soong tests with race detector
The apex tests sometimes hit the default 10 minute timeout when running
with the race detector enabled in the aosp-build-tools builds.

Test: treehugger
Flag: NONE
Change-Id: I6092a0c68c3b79cd24cdd4a6a8614f7eced7dc1a
2024-05-01 15:25:37 -07:00
Cole Faust
bf18d23827 Merge "Add tests for error when assigning select to nonconfigurable property" into main 2024-05-01 20:56:57 +00:00
AdityaK
1938410342 IsEnvTrue and IsEnvFalse should take True and False as valid values respectively.
Change-Id: Ibca5800c0846a45e3811db76fb5ad46b8a7eb1c1
2024-05-01 13:51:25 -07:00
LaMont Jones
6ff1ed4a92 RELEASE_ACONFIG_VALUE_SETS is a reserved flag
Disallow setting the flag via protobuf files, and adjust it internally
to be more like any other build flag.  This makes the generated output
more consistent.

Also default to TARGET_RELEASE if no release is given to `build-flag`.

Bug: 328495189
Test: manual
Change-Id: I9db57137fc4e5ed42a38adc939c430826afe4f63
2024-05-01 12:14:41 -07:00
LaMont Jones
15902f2f4c Guard with RELEASE_BUILD_FLAGS_IN_PROTOBUF
If false, then we output an empty file, which will cause
release_config.mk to do the old process.

Bug: 328495189
Test: manual
Change-Id: I4aa82301f3bbb29633a275a801431a6667feb48d
2024-05-01 12:14:41 -07:00
Abhishek Gadewar
41cbccc88d cc: Remove exclude_header_libs from export_header_lib_headers
This was already done for target.recovery, but was forgotten for
target.vendor and target.product.

Test: add exclude_header_libs to a target with export_header_lib_headers and build successfully

Tags:
Change-Id: Ib206f54b2176830e32af33b9b093b71d4f1351ac
Signed-off-by: Abhishek Gadewar <abhishekgadewar@meta.com>
2024-05-01 11:36:27 -07:00
Treehugger Robot
08f670ab4a Merge "soong: Use the CpExecutable rule for copying libraries" into main 2024-05-01 18:20:41 +00:00
Treehugger Robot
83ede7c225 Merge "Add RELEASE_APEX_CONTRIBUTIONS_MODULE_METADATA build flag" into main 2024-05-01 18:06:00 +00:00
Ivan Lozano
ec6dc938c9 Merge "rust: Add a default cfg indicating an AOSP build" into main 2024-05-01 17:53:47 +00:00
Treehugger Robot
9a988c4f5b Merge "rust: Don't suppress adding deps for rust-project.json device override" into main 2024-05-01 17:35:44 +00:00
Florian Mayer
39b536260a Merge "Pass -mllvm flags for memtag-stack correctly to linker" into main 2024-05-01 17:29:31 +00:00
Treehugger Robot
cba8307c25 Merge "remove hwasan-use-after-scope=1 which is default now" into main 2024-05-01 16:55:05 +00:00
Treehugger Robot
82e91a602b Merge "Add new storage deps in forced read-only mode" into main 2024-05-01 15:12:51 +00:00
Ivan Lozano
07fd7e32fd rust: Add a default cfg indicating an AOSP build
This adds a cfg flag `android_platform` which can be used
to indicate there's some conditional compilation need specific to
AOSP.

Test: New flag is emitted on builds
Change-Id: I833a7d68db2dad7ab2d32a5eb51d764f0d66b849
2024-05-01 10:41:35 -04:00
Ted Bauer
c3031c5c7b Add new storage deps in forced read-only mode
Bug: 328444881
Test: m
Change-Id: I26d5d5c96414a62f2f83eb4d725e69cea61214da
2024-05-01 13:54:40 +00:00
Jiyong Park
3f627e661a Use no_full_install: true instead of installable: false
So far, we have used `instalable: false` to avoid collision with the
other modules that are installed to the same path. A typical example was
<foo> and <foo>.microdroid. The latter is a modified version of the
former for the inclusion of the microdroid image. They however both have
the same instalation path (ex: system/bin) and stem (ex: foo) so that we
can reference them using the same path regardless of whether we are in
Android or microdroid.

However, the use of `installable: false` for the purpose is actually
incorrect, because `installable: false` also means, obviously, "this
module shouldn't be installed". The only reason this incorrect way has
worked is simply because packaging modules (ex: android_filesystem)
didn't respect the property when gathering the modules.

As packaging modules are now fixed to respect `installable: false`, we
need a correct way of avoiding the collision. `no_full_install: true` is
it.

If a module has this property set to true, it is never installed to the
full instal path like out/target/product/<partition>/... It can be
installed only via packaging modules.

Bug: 338160898
Test: m
Change-Id: Iee9be674951d0bf3d5e26432fcbae9afebb6007b
2024-05-01 22:43:45 +09:00
Jiyong Park
7e7d4af6b5 Revert^2 "Filesystem modules follow the installation semantic"
54351867fa

Change-Id: I12010c1013fc9dad19d259ba7b0251ac8e8e0907
2024-05-01 12:36:10 +00:00
Jiyong Park
16ef7ac14e Revert "Revert "Prevent multiple PackagingSpecs having same inst..."
Revert submission 3069323-revert-3066748-duplicate_entry_fs-CIBDJQYRHU

Reason for revert: relanding with forward fix

Reverted changes: /q/submissionid:3069323-revert-3066748-duplicate_entry_fs-CIBDJQYRHU

Change-Id: Ica5a126446ca2dc07a40e4ff9866389b5d164eab
2024-05-01 12:36:10 +00:00
Adam Wright
0141b4acad Merge changes from topic "revert-3066748-duplicate_entry_fs-CIBDJQYRHU" into main
* changes:
  Revert "Prevent multiple PackagingSpecs having same installation..."
  Revert "Filesystem modules follow the installation semantic"
2024-05-01 09:59:21 +00:00
Jiyong Park
3d65d9cb90 Revert "Prevent multiple PackagingSpecs having same installation..."
Revert submission 3066748-duplicate_entry_fs

Reason for revert: b/338159248

Reverted changes: /q/submissionid:3066748-duplicate_entry_fs

Change-Id: I89906e160f62f1bf84eb65a1b99940f139626786
2024-05-01 05:25:41 +00:00
Jiyong Park
54351867fa Revert "Filesystem modules follow the installation semantic"
Revert submission 3066748-duplicate_entry_fs

Reason for revert: b/338159248

Reverted changes: /q/submissionid:3066748-duplicate_entry_fs

Change-Id: I8aacdb36efce8343c3713542eee209e71bde660b
2024-05-01 05:25:42 +00:00
Treehugger Robot
543d4f3b7d Merge changes from topic "duplicate_entry_fs" into main
* changes:
  Filesystem modules follow the installation semantic
  Prevent multiple PackagingSpecs having same installation path
2024-05-01 02:43:23 +00:00
Florian Mayer
99addb1802 remove hwasan-use-after-scope=1 which is default now
This is part of Android LLVM toolchain:

https://cs.android.com/android/platform/superproject/main/+/main:prebuilts/clang/host/linux-x86/clang-r510928/BUILD_INFO;l=79

477610d4d0/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (135)

Change-Id: I2812fac89584a8324126d15525b6ee78f5494a50
2024-05-01 00:56:22 +00:00
Florian Mayer
ab97e28bf6 Pass -mllvm flags for memtag-stack correctly to linker
Bug: 309446520
Change-Id: I08519db0323a754c66acaa0ace5c41d962809ac6
2024-05-01 00:36:06 +00:00
Treehugger Robot
6ab1b1fd03 Merge changes I4c38860c,I2bdc8876 into main
* changes:
  release_config: various cleanup
  Support release configs with only aconfig flags
2024-05-01 00:14:44 +00:00
Matthew Maurer
c1e0cb695b rust: Don't suppress adding deps for rust-project.json device override
When switching from an initially found host module to a later found
device module, we passed `cInfo.Deps` through. This actually suppresses
addition of some modules, which was not the intention.

Bug: 336695421
Test: SOONG_GEN_RUST_PROJECT=1 m blueprint_tests
Test: check rust-projects.json manually afterwards for deps
Change-Id: Ib90f9c755e07f88e85a3b3cbd9bc698cce8af038
2024-04-30 23:26:29 +00:00