Commit graph

82067 commits

Author SHA1 Message Date
Spandan Das
2f9af23734 Merge "Override modules should always override source modules" into main 2024-05-29 16:25:45 +00:00
Jiyong Park
a03e16f1b9 Merge "Required deps don't track native bridge architectures" into main 2024-05-29 03:59:58 +00:00
Treehugger Robot
8723705fad Merge "Use r8/d8 optimized profile for dexpreopt" into main 2024-05-29 02:15:37 +00:00
Spandan Das
3dbda18e80 Use r8/d8 optimized profile for dexpreopt
Currently, dexpreopt supports profile guided optimization. This does not
work well with r8/d8 optimization, since the checked-in profile will not
match the dex signatures after r8/d8 has optimized the dex code.

This CL introduces a new property `dex_preopt.enable_profile_rewrting`.
If set, the checked-in profile will passed as `input` to r8 via
`--art-profile <input> <output>`. The <output> from the previous command
will be used as the profile for dexpreopt.

Test: m nothing --no-skip-soong-tests
Test: m CredentialManager with https://ag.corp.google.com/27448930
and obfuscation turned on
Test: nm -U symbol.odex # contains obfuscated methods

Bug: 335418838

Change-Id: I53beed9ed76f013262f1c503de0f2b74997c2a7f
2024-05-29 01:05:05 +00:00
Liana Kazanova
f820c3beda Merge "Revert "Enable -Wfortify-source"" into main 2024-05-29 00:26:24 +00:00
Treehugger Robot
89341ed9ad Merge "Build build_flags.json in soong" into main 2024-05-29 00:18:16 +00:00
Spandan Das
0b28fa0b84 Override modules should always override source modules
Since overrides are implemented as variants of the source module, the
override module should not be replaced with prebuilts of the source
module even when the prebuilt is preferred.

Test: go test ./apex
Change-Id: I26e97f700276e7beaf6d1bd61b164f11d57a5e09
2024-05-29 00:06:32 +00:00
Liana Kazanova
885f2eec3c Revert "Enable -Wfortify-source"
This reverts commit 5735ef6777.

Reason for revert: DroidMonitor: Potential culprit for b/343287447 - 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: I1aeeddc251db760e2ab01c734733d351514ec5b0
2024-05-28 23:33:24 +00:00
Treehugger Robot
1705676dd0 Merge "Update build to handle documentation issues being errors" into main 2024-05-28 22:59:33 +00:00
Aditya Kumar
3775725af2 Merge "Enable -Wfortify-source" into main 2024-05-28 22:58:46 +00:00
LaMont Jones
194d492d55 all_flags.pb: Properly handle intermediate files
Bug: 343203557
Test: manual, TH
Change-Id: I9a4ef39b0c2a641ccd996187ce5f7629520dffc0
2024-05-28 13:24:19 -07:00
Paul Duffin
baf34783a4 Update build to handle documentation issues being errors
Previously, documentation issues had `lint` severity (which was between
`warning` and `hide`) by default. However, a recent change in Metalava
switched documentation issues to `error`. That broke some `droidstubs`
modules that either did not specify `api_lint` or were previously allow
listed to not use `--lints-as-errors`.

This change adds `--error-when-new-category Documentation` to the
Metalava arguments on any use of `droidstubs` that did not previously
specify `--lints-as-errors` to prevent the build breakage while still
warning developers of the problem and preventing new cases being added.

Bug: 343157584
Test: ./gradlew
Change-Id: Id80bc05e2dade580b2f3ac6416aeeed6b64ba22a
2024-05-28 17:37:20 +01:00
Jiyong Park
8db4415616 Required deps don't track native bridge architectures
Bug: 342945184
Test: build aosp_cf_x86_64_only_phone and check if
out/target/product/vsoc_x86_64_only/system/lib64/arm64 directory doesn't
exist.

Change-Id: I1638610ac686b369b23390768af1564b3cf38d9b
2024-05-28 14:29:22 +09:00
yangbill
585564cab2 Allow required property be conditional for release_aidl_use_unfrozen
Bug: 342336921
Test: cd build/soong/android ; go test -run TestProductVariables
Test: add product_variables.release_aidl_use_unfrozen.required to the
phony module.

Change-Id: I9b934a8fb6245b9b6fd0f2db1e67d5e2876490b2
2024-05-27 02:35:49 +00:00
Kiyoung Kim
60cec95e01 Merge "Remove VndkUseCoreVariant related code from build" into main 2024-05-27 00:59:37 +00:00
Joe Onorato
5a62e76561 get_build_var and get_abs_build_var are now scripts
Bug: 340648588
Test: run the scripts. lunch.
Change-Id: Idc3395afe0dbec88abe7e8f46994eb2c5a22ee98
2024-05-24 14:37:52 -07:00
Joe Onorato
ded5d2de15 More envsetup.sh cleanup -- move these to standalone scripts
Bug: 340648588
Test: Run them
Change-Id: I11d086bcaa2f9eb52f7c556d94666321010b75fa
2024-05-24 14:37:52 -07:00
Joe Onorato
d636ea12bf build/soong side of move the module-info.json commands into standalone scripts.
Bug: 340648588
Test: run them
Change-Id: I5c072ee8481630327be9dccbbca501293a7b34cd
2024-05-24 14:37:52 -07:00
Treehugger Robot
c6b5fdbc5c Merge "Convert some properties to Configurable properties" into main 2024-05-24 20:52:27 +00:00
Treehugger Robot
ce15fb72bf Merge "Bump go.mod file to go 1.22" into main 2024-05-24 18:57:09 +00:00
Devin Moore
570d72b1cf Let Release_aidl_use_unfrozen add vintf_fragments
The product_config variable can be used to add different
vintf_fragments.

Ignore-AOSP-First: this is required for vFRC finalization and needs to be submitted ASAP. This can be cherry-picked to aosp after finalization.

Test: launch_cvd && atest hal_implementation_test
Test: lunch `next` && atest vts_treble_vintf_framework_test
Bug: 279809333
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b93c1a74cf89caef950c63d64b93f2ccfefcbce8)
Merged-In: Ied17ad4c4564a5d97f93001734fba7cc6648bbc2
Change-Id: Ied17ad4c4564a5d97f93001734fba7cc6648bbc2
2024-05-24 10:12:52 +00:00
Aditya Kumar
5735ef6777 Enable -Wfortify-source
Workaround for the post-submit failures
in b/341339765 has been merged.

Test: woodchipper and presubmit
Fixes: 315245071
Change-Id: I840f545cc0892cfdf9c896fd45761ba5308ff1ca
2024-05-24 04:43:18 +00:00
Kiyoung Kim
22152f6cda Remove VndkUseCoreVariant related code from build
VndkUseCoreVariant feature is deprecated along with VNDK. This change
removes related code from Soong.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ie182c9e4dc9cf0a4fe9d5fddf5b36754ddb53d18
2024-05-24 10:45:28 +09:00
Jihoon Kang
d02bd377da Merge "Propagate DirectlyInAnyApex to transitive dependencies" into main 2024-05-24 00:58:05 +00:00
Kiyoung Kim
41a1ff1a28 Merge "Move sanitizer.libraries.txt logic into Soong" into main 2024-05-24 00:39:00 +00:00
Cole Faust
2afb7746c2 Bump go.mod file to go 1.22
When building with blueprint, go 1.22 will be used, but if you used
go build or go test manually, the version in the go.mod will be used.

Go 1.22 has a subtle change that we want to make sure we're always
using: https://go.dev/blog/loopvar-preview

Bug: 330574836
Test: Presubmits
Change-Id: Idf46b77c4f817345c1f9aca039d8735bb101967f
2024-05-23 16:26:49 -07:00
Treehugger Robot
7e2490ef4b Merge "Fix post command of clang_verify." into main 2024-05-23 22:59:37 +00:00
Jihoon Kang
46d66de1c1 Propagate DirectlyInAnyApex to transitive dependencies
`UpdateDirectlyInAnyApex` is used to propagate the ApexProperties
`DirectlyInAnyApex` and `InAnyApex` to the direct dependencies of the
direct dependencies of an apex bundle. In other words, this will be
propagated only to two-levels max dependency from the apex bundle.

However, the implementation library of the sdk library can have longer
dependency chain from the apex bundle than two levels:
e.g. apex -> bcpf -> sdk_lib -> sdk_lib impl lib

Therefore, even if the implementation library of the sdk library is
registered as a dependency using the "CopyDirectlyInAnyApexTag"
dependency tag, the ApexProperties would not be propagated to the
implementation library. In order to resolve this issue and recognize
the implementation library to be directly in apex and allow
instrumentation for the implementation library, this change proposes
propagating `DirectlyInAnyApex` and `InAnyApex` to transitive
dependencies on top of direct dependencies.

Test: DIST_DIR=dist_dir TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86_64 COVERAGE_MODULES="uwb" ./vendor/google/build/build_unbundled_coverage_mainline_module.sh && \
unzip -l out/target/product/module_x86_64/jacoco-report-classes-all.jar and ensure that framework-uwb is included
Bug: 341170242

Change-Id: I27d7a74f6e5bc3e0a044d13c619f4897b6b2eb57
2024-05-23 22:40:35 +00:00
Treehugger Robot
788100e2a8 Merge "Add test for parse error" into main 2024-05-23 19:50:12 +00:00
Treehugger Robot
bc44eb03db Merge "Allow experimental Java target 21 by default" into main 2024-05-23 16:37:21 +00:00
Dennis Shen
54082dd8fe Merge "Soong: remove obsolete proto lib from unit test" into main 2024-05-23 16:05:37 +00:00
Dennis Shen
6a7ffb3ec0 Soong: remove obsolete proto lib from unit test
Bug: b/321077378
Test: m and avd
Change-Id: Ib121da201e0be38d1acd82de1487f6cfba9e696c
2024-05-23 11:43:42 +00:00
Sorin Basca
253f8c045a Allow experimental Java target 21 by default
Bug: 342332820
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_21=true m
Change-Id: I6cc21bf191385df91c2446b7cd6291a0e3532bea
2024-05-23 10:28:24 +01:00
Kiyoung Kim
0d8908c2e4 Move sanitizer.libraries.txt logic into Soong
Currently sanitizer.libraries.txt module is defined from Makefile, while
all logics to create the list of modules is implmented within the Soong.
This change moves sanitizer.libraries.txt module definition into Soong,
so it can be generated without sharing list of modules over Make
variable.

Bug: 339131599
Test: AOSP CF build succeeded, with same list of modules in
/system/etc/sanitizer.libraries.txt

Change-Id: I987684877aa8dae221a03227d784f2a8ca4f5cc4
2024-05-23 17:50:46 +09:00
Justin Yun
5f53869dfe Build build_flags.json in soong
Define release_flags_json module type to install build_flags.json in
'etc'. release_flags_json reads the json files generated from the
soong release-config command.

Bug: 324996303
Test: build and see if the files are installed
Change-Id: I8cdcb7c61dd75cc54e4912d2ed7d1687f424151c
2024-05-23 14:58:08 +09:00
kellyhung
de1b6b0f64 Fix post command of clang_verify.
Bug: 311284462
Test: go test -run TestClangVerify
Change-Id: I116c4a3e1e5734a71e1bfd503ea2268a1a5643dd
2024-05-23 02:16:26 +00:00
Cole Faust
aeecb75be2 Add test for parse error
This used to error out prior to the other cl in this topic.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6d95eb00c75836a5a0c60e07bfd4b306388591ed
2024-05-22 17:01:59 -07:00
Cole Faust
c15b0234e9 Merge "Support soong config value variables on Configurable properties" into main 2024-05-22 23:58:50 +00:00
Treehugger Robot
5458a8437d Merge "Restrict validateApexClasspathFragments to active apex prebuilts" into main 2024-05-22 23:29:04 +00:00
LaMont Jones
aae7c4a302 Merge "Generate specific message for build flag declarations artifact" into main 2024-05-22 22:07:20 +00:00
Cole Faust
5f29706843 Support soong config value variables on Configurable properties
Configurable properties were previously not having their %s's
substituted with the actual value.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Id317e58a1fd878db5452d5d0a5df588021bcdcdb
2024-05-22 14:34:47 -07:00
LaMont Jones
6d9ff256ed Generate specific message for build flag declarations artifact
Many of the fields in `flag_artifact` are not valid in
the all_build_flag_definitions artifact.

Bug: 328495189
Test: manual
Change-Id: I00eab1ef76f67f7db2118a6fc0d5771e3dd39fbb
2024-05-22 13:46:34 -07:00
Cole Faust
fdec8723d5 Convert some properties to Configurable properties
Focusing on the properties needed to remove soong config modules from
packages/modules/Virtualization.

- prebuilt_etc's src and srcs
- filegroup's srcs and exclude_srcs
- rust's cfgs

Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: I6971da744a17955f98104948e6f9614776955782
2024-05-22 13:33:42 -07:00
Spandan Das
aa9369b71d Drop IncludeTags
This was previously used in conjunction with blueprint_package_includes
to prune Android.bp files from soong analysis.

Test: m nothing
Bug: 308188212
Change-Id: Ie82e20eec63bd0be70e1cf0290c70f62d5621c76
2024-05-22 19:23:47 +00:00
Treehugger Robot
b07e7fd542 Merge "Instrument impl library belonging to apexes" into main 2024-05-22 19:01:41 +00:00
Cole Faust
5e79b167b8 Merge "Add tests for unhandled select condition errors" into main 2024-05-22 18:51:10 +00:00
Cole Faust
a642853510 Merge "Log warnings to stdout instead of stderr" into main 2024-05-22 16:58:35 +00:00
LaMont Jones
44789260ad release_config_proto: revert enum rename
This caused the existing textproto files to be misparsed.

Bug: 328495189
Test: manual
Change-Id: I53dc5045839b575e5fcaace39a435c28648010f6
2024-05-22 06:42:59 -07:00
Jihoon Kang
690df2e31b Instrument impl library belonging to apexes
https://r.android.com/3094444 has removed instrumentation from the
implementation library of the java sdk library. However, given that the
top level java sdk library was not being instrumented before removing
the compilation action, there is no way to get the coverage data for the
java sdk library included in the mainline modules with the
aforementioned change.

As seen in b/340174053, instrumenting all impl libraries by default
may lead to double instrumentation execution time error in some edge
cases (especially with make to soong dependency).

Given the above two conditions, this change allows instrumentation for
the implementation library of the java sdk library that belongs to
apex(es).

Test: lunch husky-trunk_staging-userdebug && EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true m droid dist
Test: DIST_DIR=dist_dir TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86_64 COVERAGE_MODULES="uwb" ./vendor/google/build/build_unbundled_coverage_mainline_module.sh
Bug: 341170242
Change-Id: I175e02f61e139296f5a177e6fc1c3ded760ac028
2024-05-22 04:27:38 +00:00
Treehugger Robot
d7b71490ae Merge "Export release flag types to make/soong" into main 2024-05-22 02:26:00 +00:00