Commit graph

81598 commits

Author SHA1 Message Date
Ted Bauer
6ef40dbce6 Add logging dependencies to Rust aconfig APIs
Test: go test
Change-Id: I17c098f6b83c442554e49b6b802f11c97f94ec76
2024-03-29 14:05:05 +00:00
Kiyoung Kim
82488ca457 Merge "Remove VNDK information from CC and APEX tests" into main 2024-03-29 04:37:25 +00:00
Jiyong Park
9c540c82d4 fix: required deps of phony modules are correctly tracked
ArchType.Multilib of native modules are either lib32 or lib64.
Arch-neural modules have "" not "common".

Bug: 321626681
Test: go test ./...
Change-Id: Ie7e6a5203e9f671487dbf32ea2343ada7407a28f
2024-03-29 12:53:32 +09:00
Kiyoung Kim
149f8e1502 Merge "Remove vendor_snapshot_test" into main 2024-03-29 02:50:32 +00:00
Treehugger Robot
4fcfd0123c Merge "Improve errors when compiling python code" into main 2024-03-29 02:50:30 +00:00
Jooyung Han
3520b9488e Merge "VINTF manifests in apex don't require extension" into main 2024-03-29 02:37:19 +00:00
Treehugger Robot
8b80173e23 Merge "Add support for prebuilt_usr_hyphendata type" into main 2024-03-29 02:30:31 +00:00
Jihoon Kang
3921f0b356 Collect aconfig_declarations of the dependent java_aconfig_library modules
droidstubs module require aconfig_declarations modules to be specified
when the module depends on the java_aconfig_library module in order to
generate the "exportable" stubs. This adds burden to the droidstubs or
java_sdk_library module owners, as module should specify both the
java_aconfig_library and aconfig_declarations modules to genreate the
"exportable" stubs, although the necessary information from the
aconfig_declarations module can be provided from the
java_aconfig_library modules.

In order to resolve such burden, this change enables the intermediate
cache files from the associated aconfig_declarations module of a
java_aconfig_library module to be propagated to its reverse dependencies
without having the specify the aconfig_declarations modules in the
droidstubs or java_sdk_library modules definitions.

This does not mean that the intermediate cache files of every transitive
dependencies of the java_sdk_library or the droidstubs will be passed to
aconfig to retrieve the state of the aconfig flags.

Specifically, only the java_aconfig_library modules or the java_library
modules that have static dependency on java_aconfig_library modules that
are passed to droidstubs via `libs` or `srcs` (using
":module_name{.tag}" syntax) will provide the intermediate cache files
to generate the "exportable" stubs. For java_sdk_library, all modules
listed as `libs`, `static_libs`, `stub_only_libs`, and `apiScope.libs`
are passed as `libs` and all modules listed as `api_srcs` and `srcs` are
passed as `srcs` to the droidstubs modules dynamically generated in
java_sdk_library module per api scope, thus these properties will be
affected.

Note that the test is being added in the apex package. This is because
trying to register the codegen package build components in the java
package leads to circular dependency between the codegen and the java
package, as codegen package imports the java package.

Test: m nothing --no-skip-soong-tests
Bug: 329284345
Change-Id: I7953ab64776f6947808321ce8a3598154501bcfe
2024-03-29 01:11:32 +00:00
Kiyoung Kim
b54c4b4a96 Merge "Ensure java level inter partition dependency with VNDK deprecation." into main 2024-03-29 00:42:09 +00:00
Cole Faust
5a8f533a29 Improve errors when compiling python code
Now a stacktrace involving precompile_python.py won't be shown,
and it will show all errors instead of just the first one.

Bug: 331488610
Test: Presubmits
Change-Id: I47376ca6764c0f84d1aaf5db329664e20143640a
2024-03-28 17:31:21 -07:00
Jihoon Kang
472f73fdac Add API compatilibility flags to the exportable stubs
The API compatibility flags allow the APIs that have moved between API
surfaces to be correctly represented in the stub artifacts by passing
the previously released set of APIs and removed APIs. These information
should be passed to metalava when generating the exportable stubs, so
that the APIs that move between the API surfaces are not blocked in the
hiddenapi flags.

Test: patch to 24Q3-beta-release, lunch sdk-trunk_staging-eng && m sdk
dist and ensure that the expected methods are not blocked in the
hiddenapi flags
Bug: 330753520

Change-Id: I030b0a46b09f0cea026fedc879f10d4edfd38ac3
2024-03-28 23:38:02 +00:00
Treehugger Robot
1c3675503c Merge "Fix some non-determinism in aconfigMerge operation" into main 2024-03-28 23:35:10 +00:00
Ted Bauer
97045effe0 Merge "Add storage API as dependency to Rust codegen" into main 2024-03-28 23:33:32 +00:00
Ronald Braunstein
1a6e7c032a Add test_module_config_host
This pairs with `test_module_config` but also works on the base is a
`java_test_host` module.
e.g.

	test_module_config_host {
	     name: "CtsOsHostTestCases_DERIVED_2566",
	     base: "CtsOsHostTestCases",
	     test_suites: ["general-tests"],
	     include_filters: [ "android.os.cts.StaticSharedLibsHostTests" ],
	     exclude_annotations: [ "androidx.test.filters.FlakyTest","org.junit.Ignore" ],
	}

The new module is composed of the previous and shares much of the same
code.

With respect to build size,
	Without this change, if you build CtsAppSecurityHostTestCases, there
	will be several copies of the jar (and related apks) :
	 *) 1 in framework
	     out/host/linux-x86/framework/CtsAppSecurityHostTestCases.jar
	 *) 1 in testcases for the test
	     out/host/linux-x86/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
	 *) 1 per compatibility suite testcases
		out/host/linux-x86/mts-documentsui/android-mts-documentsui/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts-mediaprovider/android-mts-mediaprovider/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts/android-mts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/cts/android-cts/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar
		out/host/linux-x86/mts-mainline-infra/android-mts-mainline-infra/testcases/CtsAppSecurityHostTestCases/CtsAppSecurityHostTestCases.jar

	A dervived test using CtsAppSecurityHostTestCases as base adds one more
	to its testcases dir:
	  *) derived testcase.
	     out/host/linux-x86/testcases/CtsAppSecurityHostTestCases_presubmit_ExternalStorageApp/CtsAppSecurityHostTestCases.jar

Fixes: b/327280990
Test: m clean && m  CtsOsHostTestCases_DERIVED_2566# as above
Test: atest CtsOsHostTestCases_DERIVED_2566 --collect-tests-only
Test: migrated the 71 TestMapping instances to Android.bp and build them.
  Ran tests on some of them.
  Ran some original `test_module_config` tests derived from `android_test` as well

TODO: Add actions to validate the given filters are valid for the given
test apks/jars.

Change-Id: I115eedb6ff6ba8e72bb49e71867daf49d25ca0f1
2024-03-28 15:07:17 -07:00
Spandan Das
87f5ee4cb6 Fix some non-determinism in aconfigMerge operation
Sorted iteration ensures that `mergeAconfigFiles` generates the ninja
rules in a deterministic fashion.

Test: mv out/soong/build.ninja; regenerate; compare; bit-identical
after this change

Change-Id: Ic9bee14374fa1eb7adee670eaed42ad6ffdd9010
2024-03-28 21:26:49 +00:00
Ivan Lozano
cfeec1c2dd rust: Remove unnecessary escaping in grep call
Modules with special characters wouldn't build correctly because $out
was being double escaped -- once in the build command and once by Soong
itself.

Remove the escape in the build command and just let Soong escape as
necessary.

Bug: 320578837
Test: Module with @ in name builds
Change-Id: Ic2554b9c07f37783287e1ebdeb06ef8b7b66a296
2024-03-28 19:27:24 +00:00
Cole Faust
74ef465ebc Add tests for new boolean addition behavior
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I746015a0c96a91ce7aa796e4ef06f62e3da79592
2024-03-28 12:14:49 -07:00
Ted Bauer
02d475c3d8 Add storage API as dependency to Rust codegen
Test: m
Bug: 328444881
Change-Id: Id1ef9276adb9f9b990a05b910937e96ab0a5ac50
2024-03-28 18:38:32 +00:00
Haamed Gheibi
54af8e62d9 Remove the mkdir of the parent Directories for protobufs.
Bug: 330794730
Change-Id: I7b221ffc9dde67c27186848727c4a698644507aa
2024-03-28 18:19:18 +00:00
Kiyoung Kim
9743bab964 Ensure java level inter partition dependency with VNDK deprecation.
Previously JAVA dependency over partition was checked only when device
VNDK version is not empty. This change updates logic to enforce inter
partition dependency despite of VNDK version based on VNDK deprecation.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7444ad612aa6c525e61cc5c2a89f5421ab4465b4
2024-03-28 06:50:11 +00:00
Kiyoung Kim
0d1c1e6aef Remove VNDK information from CC and APEX tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-cc and soong-apex tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: I45e6c13e6c0a6bc9710b120e8d5b167e2051631e
2024-03-28 15:15:01 +09:00
Kiyoung Kim
d8ec229bc0 Remove vendor_snapshot_test
Remove vendor_snapshot_test from cc and rust as they are no longer in
support.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: Ia798bc1c87d3f1d73ea5866dc85ff4073f5f9c5b
2024-03-28 15:11:16 +09:00
Treehugger Robot
f875565c7f Merge "Support transitive proguard specs in android_library_import" into main 2024-03-28 03:56:29 +00:00
Treehugger Robot
b30c12ee2f Merge "Reland "Migrate buildinfo.sh script into Soong"" into main 2024-03-28 02:59:51 +00:00
Jooyung Han
262f73c831 VINTF manifests in apex don't require extension
libvintf reads all entries from vintf directory. The apex build rule
should match with it.

Bug: 331474817
Test: build with aosp/3017012/1
Change-Id: Ida5fce2436ec5985e2fb4c2a3608bf20f4933582
2024-03-28 11:29:47 +09:00
Chungro Lee
139218906b Merge "Revert^3 "Enable full LTO optimization by default"" into main 2024-03-28 01:35:37 +00:00
Chungro Lee
97f68587ff Revert^3 "Enable full LTO optimization by default"
7549990a95

Reason for revert: b/331528903
Change-Id: Idb013e97c84aeaf969522dc77abf94f23f721181
2024-03-28 01:25:42 +00:00
Colin Cross
96ae140989 Merge "Disable use_resource_processor when producing a shared library" into main 2024-03-27 22:22:25 +00:00
Colin Cross
cde5534ccd Support transitive proguard specs in android_library_import
Add support for android_library_import to propagate the proguard specs
from its static dependencies.

Bug: 326265727
Test: TestExportedProguardFlagFiles
Change-Id: I174c1d7937a529958f8d240214b279062ef74868
2024-03-27 14:14:09 -07:00
Colin Cross
eee4ab12fa Disable use_resource_processor when producing a shared library
Passing --shared-lib to aapt2 causes it to add an extra
onResourcesLoaded method that rewrites resources IDs to include
the package ID determined at runtime.  ResourceProcessorBusyBox
has no equivalent functionality, so disable whenever --shared-lib
is found in aaptflags for now.

Fixes: 330646473
Bug: 331641946
Test: manual
Change-Id: Ibb0c2c7bf7a41ab294f5c84b4b6018cc8a63b0f4
2024-03-27 11:58:58 -07:00
yangbill
63c5e192c3 Add support for prebuilt_usr_hyphendata type
Bug: 331551860
Test: cd build/soong/etc ; go test -run \
      TestPrebuiltPrebuiltUserHyphenDataInstallDirPath
Change-Id: I78d647eea9a84665dd9c78940c51d2fb948c04f8
2024-03-27 09:06:06 +00:00
Nikolay Elenkov
7ee98928ea Add secretkeeper-v1-java to platform APIs
Bug: 324321147
Test: Manual -- trigger factory reset, confirm ISecretKeeper.deleteAll()
is being called in Trusty logs.

Change-Id: If793f784bc1a8c621a721d15da9aeb1ef11e7334
2024-03-27 06:51:34 +00:00
Inseob Kim
8fa54dab08 Reland "Migrate buildinfo.sh script into Soong"
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.

This fixes an error caused by an incorrect path to build thumbprint
file.

Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Id4fa830009538856c30825ff47268b11fa6cb5d6
2024-03-27 14:18:45 +09:00
Yi Kong
2590054333 Merge "Revert^2 "Enable full LTO optimization by default"" into main 2024-03-27 01:58:09 +00:00
Yi Kong
7549990a95 Revert^2 "Enable full LTO optimization by default"
55019c43f4

We set the default optimization mode to --lto-O0 for LTO enabled
projects, in order to save build time. This is missing some performance
optimizations, esp. related to vectorization. Now that we suggest eng
build for developers, we can enable full optimization by default.

When we introduced --lto-O0, we achieved a 4.2% saving in
system-processes-memory-direct. Enabling full LTO optimization will
trade some of the memory / binary size savings for better code
performance. For system-processes-memory-direct, it is 2.0% increase
compared to --lto-O0, or a net 2.2% saving compared to baseline.

Change-Id: I747939ac4d6e4a66e3ef776f4c36eebc7bf34c86
2024-03-27 01:57:22 +00:00
Cole Faust
8a038ed871 Make embedded_launcher true by default
embedded_launcher causes the python interpreter to be bundled in the
built zip file. This is beneficial because:

- You can export the built executable and run it on systems
  without python or an old version of python. The CI servers have python
  3.7, so it's useful to update that.
- Because the python version is known, the python sources will be
  precompiled.
- It will start running the code directly from the zip file, without
  extracting the binary to a temporary directory like non-embedded
  launcher binaries. This is particuarly useful because some developers
  use the extracted files directly instead of using
  `importlib.resources`, so having the non-extracting implementation
  gives them a nudge in the right direction.

Make embedded_launcher the default so that more developers will do the
right thing when developing python programs.

Bug: 331488610
Test: Presubmits
Change-Id: Ideb113a1d4d3b29ac04d57a48d111a99f77b2dfc
2024-03-26 17:32:48 -07:00
Jiyong Park
8399758b97 Merge "Add test preparer for phony module types" into main 2024-03-26 23:24:19 +00:00
Gina Ko
58d9063b66 Merge "Revert "Migrate buildinfo.sh script into Soong"" into main 2024-03-26 22:46:48 +00:00
Gina Ko
465549b579 Revert "Migrate buildinfo.sh script into Soong"
Revert submission 3004875-buildinfo_prop_soong

Reason for revert: DroidMonitor-triggered revert due to breakage b/331462869

Reverted changes: /q/submissionid:3004875-buildinfo_prop_soong

Bug: 331462869
Change-Id: Ib8bbbad29a4ad7b800e6bd1a67a401c2225b78cb
2024-03-26 22:46:11 +00:00
Elliott Hughes
41da84b2e6 Merge "Re-enable abi checking for hwasan builds." into main 2024-03-26 21:02:38 +00:00
Cole Faust
3e39bb6025 Merge "Implement OtherModulePropertyErrorf proxies" into main 2024-03-26 20:55:34 +00:00
Cole Faust
ddde9e29a4 Merge "Add the ability to select on arch" into main 2024-03-26 17:36:37 +00:00
Victor Chang
03add50c2e Add SPDX-license-identifier-Unicode-3.0
Test: m nothing
Change-Id: I31c8e0ea3daacd06ea25e1d2cd6458c80363499a
2024-03-26 15:39:51 +00:00
Inseob Kim
2f42ae62ea Merge "Migrate buildinfo.sh script into Soong" into main 2024-03-26 08:06:06 +00:00
Inseob Kim
5baf2cbcb6 Migrate buildinfo.sh script into Soong
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.

Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Icaa7e1fdab2a8c169ac00949d3aaf6c8212a1872
2024-03-26 05:55:49 +00:00
Treehugger Robot
f7e7776079 Merge "Disable "__builtin_func" when converting mk to bp" into main 2024-03-26 02:30:35 +00:00
Jiyong Park
92b8e8f1bb Add test preparer for phony module types
... so that other tests can use the module type

Bug: N/A
Test: N/A (see the next change)
Change-Id: Ie71e4c67a5615809784c27e9834f7d818a4b649d
2024-03-26 10:47:18 +09:00
Kiyoung Kim
078188774f Merge "Update linker.config.pb based on package dependency" into main 2024-03-26 00:42:17 +00:00
Cole Faust
02987bd9d2 Implement OtherModulePropertyErrorf proxies
Also move EvaluateConfiguration() to a standalone configurationEvalutor
object, which can be constructed from a ModuleBase and a minimial
context. This allows us to evaluate configurable properties in
scenarios where we don't have much more than the module.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I2d1c9f42a469c399f34c759410509aeae095becb
2024-03-25 17:19:24 -07:00
Cole Faust
0aa21cc8e2 Add the ability to select on arch
Bug: 323382414
Test: go test
Change-Id: I0d4cf391a1a625c5160456db1f4f7fa424c2141e
2024-03-25 17:18:08 -07:00