Commit graph

81787 commits

Author SHA1 Message Date
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
LaMont Jones
ff387eaacb release_config: various cleanup
- Allow scl and textproto data to coexist for now
- Print warnings to stderr instead of stdout.
- Improve formatting of output
- Set displays the new value for all configs, and what file changed.
- Use prettier error messages for better UX
- put build-flag on the path.

Bug: 328495189
Test: manual
Change-Id: I4c38860c2fb24db5111e0cecf790660a4ff2b8b2
2024-04-30 16:12:50 -07:00
LaMont Jones
dc86819307 Support release configs with only aconfig flags
Release configs with `aconfig_flags_only: true` can inherit build flag
values, but cannot set them.

Bug: 328495189
Test: manual
Change-Id: I2bdc88761d61fb20f10dc734f2ba87114f51b859
2024-04-30 15:38:11 -07:00
Cole Faust
60f6bb2cd1 Add tests for error when assigning select to nonconfigurable property
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I2403aa846238e5c0ea11d7a1b74d3915b3c7b739
2024-04-30 13:58:55 -07:00
Treehugger Robot
2f5d35347b Merge "Move coverage builds prebuilt special case to make" into main 2024-04-30 20:04:44 +00:00
Treehugger Robot
d58ac5358d Merge "Remove incorrect strict test for test-suites for test_module_config" into main 2024-04-30 19:57:23 +00:00
Jiyong Park
742f54c4bc Filesystem modules follow the installation semantic
With this change, filesystem modules (android_filesystem,
android_system_image, etc.) follow the installation semantic which means
output from modules which don't produce installable files (i.e. modules
that return false on IsSkipInstall()) are not included in the filesystem
module.

Note that this bug has been there since the beginning but didn't trigger
an error due to another bug (b/335506668) which allowed multiple
packaging specs to contribute to the same path. That bug prevented the
non-installable variant of a module (e.g. stub) from being installed
simply because because it was "luckly" clobbered by the installable
variant of the same module (e.g. impl lib).

Bug: 335506668
Test: go test ./...
Change-Id: I2a42d178701d74bf6ccc5f33ba33918f8c608d40
2024-04-30 19:02:57 +00:00
Jiyong Park
a51c4ce10e Prevent multiple PackagingSpecs having same installation path
This fixes a bug that different PackagingSpecs having the same
installation path were silently allowed. Previously, a PackagingSpec
that comes the first for the given installation path won, effectively
eclipsing other PackagingSpecs destined for the same installation path.

Bug: 335506668
Test: go test ./...
Change-Id: Ia36f656e8364f95c4be78fff6e9dc16966307526
2024-04-30 18:50:06 +00:00
Ronald Braunstein
b4a4ef9d23 Remove incorrect strict test for test-suites for test_module_config
I misunderstood our desire to eventually migrate all
`test_module_config` modules -> "general-tests" for the requirement that
it must be used now.

While working on converting these modules to use symlinks rather than
copies of data files, I noticed a problem if the derived test was in
"general-tests", but the base test was in "device-tests". The symlink
would not have a base to point to in general-tests.zip.

Allow the derived tests to be in other suites for now.

Test: go test ./tradefed_modules/
Test: m blueprint_tests
Change-Id: I9524d6c3964db6de38fc3c4cb4c5bc493dadc0db
2024-04-30 18:44:49 +00:00
Spandan Das
dab69e1001 Add RELEASE_APEX_CONTRIBUTIONS_MODULE_METADATA build flag
This can be used to select a specific prebuilt ModuleMetaData prebuilt

Test: go build ./android
Bug: 338003071
Change-Id: Ia96ba102107161021c78ad3f87a938f8a788e932
2024-04-30 18:14:49 +00:00
Florian Mayer
5ccc4218d5 Make memtag_stack a variant
Otherwise we cannot disable memtag_stack on first stage init, because it
statically links in a lot of libraries.

This was benign, but if we want to add a stack history buffer, we do not
want to emit these instructions for first stage init.

Bug: 309446520
Change-Id: Ifbdcbe5ba06eb46970bc1e9b64a26c1ca59ba5f2
2024-04-30 10:53:33 -07:00
Jiyong Park
4152b192e0 Distinguish the intent of PackagingSpec
A PackagingSpec actually means either of two: an installation of a file
(i.e. putting the file on a filesystem image), or a simple gathering.
However, so far, the two different intents was not visible in
PackagingSpecs returns from TransitivePackagingSpecs().

With this change, the two different intents are recorded in
PackagingSpec. A PackagingSpec has a boolean field which records the
value of the SkipInstall() of the module where the PackagingSpec was
created from.

This could be used by a module like android_system_image which wants to
follow the "installation" semantic. For example, the module type doesn't
want to include a stub variant of a shared lib.

This change doesn't make use of the new field, yet.

Bug: 335506668
Test: go test ./...
Change-Id: If0106642a11ba804630df79b4c5ebd608a77a6b1
2024-04-30 22:35:20 +09:00
Jiyong Park
5c3c3274fe Remove an unnecessary test in filesystem
TestFileSystemShouldInstalCoreVariantIfTargetBuildAppIsSet is removed.
The test was originally introduced with aosp/2445946, but the change was
effectively reverted by aosp/2562192. The test however has been green as
a side effect of a bug (b/335506668) which will be fixed soon.

Bug: 335506668
Bug: 268582372
Test: N/A
Change-Id: I62f4746c605eba0b2f0037089a53d65922d65ef3
2024-04-30 22:35:14 +09:00
yangbill
85527e6aab Add support for keyboard prebuilt module type
Add 3 different module type:
 - prebuilt_usr_keylayout
 - prebuilt_usr_keychars
 - prebuilt_usr_idc

Bug: 337998675
Test: cd build/soong/etc ; go test -run \
      TestPrebuiltPrebuiltUserKeyLayoutInstallDirPath
Test: cd build/soong/etc ; go test -run \
      TestPrebuiltPrebuiltUserKeyCharsInstallDirPath
Test: cd build/soong/etc ; go test -run \
      TestPrebuiltPrebuiltUserIdcInstallDirPath
Change-Id: I5bafbc48dd0edd0d06783b89b904330a2a30c743
2024-04-30 08:24:50 +00:00
Inseob Kim
dd5324938c Install classpath protobuf files
This is to support etc/classpaths for filesystem modules.

Bug: 337993199
Test: m aosp_cf_system_x86_64
Change-Id: I0d5d3dc8af9646a24c8ae97d4d1418ddb0e5f46b
2024-04-30 17:22:58 +09:00
yangbill
6d032dd911 Add a new property trim_extension for gensrcs
In order to provide a more flexible ability for gensrcs's output, due to
current output_extension property will only allow to replace the string
after the last "." of input, in order to handle input with multiple dot
in file name, provide a way to trim the suffix of input string.

Bug: 335536003
Test: cd build/soong/genrule ; go test -run TestGenSrcs
Test: cd build/soong/genrule ; go test -run TestGenSrcsWithTrimExtAndOutpuExtension
Test: cd build/soong/genrule ; go test -run TestGenSrcsWithTrimExtButNoOutpuExtension
Test: cd build/soong/genrule ; go test -run TestGenSrcsWithOutpuExtension
Test: cd build/soong/android ; go test -run TestPathsForModuleSrc

Change-Id: I033bbe1d225f207f0f6bdc140df308884f214b51
2024-04-30 05:06:56 +00:00
Kiyoung Kim
973cb6f555 Move LLNDK related logic to llndk_library
Currently VNDK contains some logic for LLNDK libraries as they are
treated in a similar way with VNDK. However, those logics should stay from
VNDK deprecation. To keep the logic, this change moves LLNDK related
logic into llndk_library.

Bug: 330100430
Test: Soong tests passed
Test: llndk.libraries.txt did not change from CF build
Change-Id: I1d02a3c2a398f1b1060b4f2bdd23af32310503bb
2024-04-30 13:05:19 +09:00
LaMont Jones
0dd436cd0a Merge "release_config: better default map paths" into main 2024-04-30 01:52:19 +00:00
Treehugger Robot
3210194259 Merge "Compress precompiled python zips" into main 2024-04-30 01:30:15 +00:00
Treehugger Robot
29067ccade Merge changes from topics "fix_selects_appending", "refactor_selects" into main
* changes:
  Update accesses to ConfigurableCondition
  Add test for configurable defaults applied to multiple modules
2024-04-30 01:15:42 +00:00
Cole Faust
baae083e60 Compress precompiled python zips
When making this script deterministic we accidentally changed it so that
none of the entries in the output zip file were compressed. Re-add
the compression.

Adding the compression makes atest go from 67M to 34M, at the cost of
0.33s startup time instead of 0.28s.

Test: Presubmits
Change-Id: I4e58eb76235ddabf0195694cdd3644f26b7e84ec
2024-04-29 16:47:36 -07:00
Spandan Das
36c329ce77 Move coverage builds prebuilt special case to make
Having this in make has the following advantages
- allows this to be used in other places in make that are sensitive to
  prebuilt selection, e.g. apex boot jars that are present in source but
  not in prebuilt apexes
- collocates the various prebuilt special edge cases

Test: presubmits
Test: in internal, lunch cf_x86_64_phone-next-userdebug
Test: EMMA_INSTRUMENT_FRAMEWORK=true get_build_var PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS
true

Bug: 308188056
Change-Id: Iea92311759f3bfe0ece7cb45fdb239c8a4db1dde
Merged-In: Iea92311759f3bfe0ece7cb45fdb239c8a4db1dde
2024-04-29 22:04:02 +00:00
LaMont Jones
e41ea1e33e release_config: better default map paths
- Automatically determine the top of the workspace.
- build-flag defaults to using `get_build_var` to get product specific
  release config maps.
- release-config defaults to using PRODUCT_RELEASE_CONFIG_MAPS but does
  not use `get_build_var` unless the argument is given.

Bug: 328495189
Test: manual
Change-Id: I4ba3c5dfab43c4ebc3eeda13318f42e886dada4e
2024-04-29 14:43:09 -07:00