Commit graph

81988 commits

Author SHA1 Message Date
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
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
Treehugger Robot
423b8f6869 Merge "Better errors from build-flag" into main 2024-05-22 01:53:20 +00:00
Cole Faust
3b30067f88 Log warnings to stdout instead of stderr
Currently, both stdout and stderr are redirected to a file. We want
stderr to be visible on the terminal in case the release config
fails, but we don't want to see the spam of warnings release config
always produces.

Move the warnings to stdout so they stay in the file when we start
showing stderr.

Test: m nothing
Change-Id: Ic869675f917270a472142b6e3a4210acaad7499b
2024-05-21 18:17:47 -07:00
Treehugger Robot
1bd60b7c79 Merge "implement InstallDepNeeded for sdkLibraryComponentTag" into main 2024-05-22 01:15:52 +00:00
Cole Faust
751a4a5fa2 Export release flag types to make/soong
And use the types to appropriately type selects on the release
variables.

Bug: 323382414
Test: Presubmits
Change-Id: Ide7eca95662caaa7b4be42e20399d9fcd7fed35f
2024-05-21 18:09:05 -07:00
LaMont Jones
310ccc2ad2 Better errors from build-flag
When `get_build_var` fails, output the error.

Bug: none
Test: manual
Change-Id: If4dc13e0e895823f50de1f5c7e929bb05eac69a0
2024-05-21 17:52:48 -07:00
Treehugger Robot
1ab18fc547 Merge changes I6b1d6dcd,I97eb864e,I155c26b1 into main
* changes:
  Minor flagging cleanup
  Add build_flag_declarations module
  Add build-flag-declarations tool
2024-05-22 00:03:08 +00:00
Cole Faust
4ab1563fe5 Merge "Update select tests for optionals" into main 2024-05-22 00:02:41 +00:00
Joe Onorato
30f6e28295 Merge "Fix the problem of resource integration confusion caused by not adding regional configuration tailoring." into main 2024-05-22 00:02:04 +00:00
Treehugger Robot
5c04707a3f Merge "Make dirs a configurable property" into main 2024-05-21 22:55:03 +00:00
Treehugger Robot
c7360364fc Merge "Remove printf in tests" into main 2024-05-21 22:50:22 +00:00
LaMont Jones
52df388f5a Minor flagging cleanup
Add an underscore to make the linter more happy.

Bug: 339672075
Bug: 328495189
Test: manual
Change-Id: I6b1d6dcd0aff3c82551021b3f4768a34f27d6fb2
2024-05-21 15:35:28 -07:00
LaMont Jones
c6aef16816 Add build_flag_declarations module
And generate build-flags/build_flags.{pb,textproto} files

Bug: 328495189
Test: manual,TH
Change-Id: I97eb864e2d84bc606fef7e9077554894338edaa0
2024-05-21 15:35:22 -07:00
LaMont Jones
fa4ba22a41 Add build-flag-declarations tool
This will be used to gather build flag declarations

Bug: 328495189
Test: manual, TH
Change-Id: I155c26b1442347c4d433c9cbf22b94d944636702
2024-05-21 15:34:11 -07:00
Cole Faust
d9c6a5b802 Make dirs a configurable property
The microdroid system image customizes dirs using soong config
variables, make it configurable so that selects can be used instead.

Bug: 342006386
Test: Presubmits
Change-Id: I4fbf4dc0a04ad1d1f6539476408606028390cd64
2024-05-21 14:54:00 -07:00
Cole Faust
749eeaa94c Update select tests for optionals
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I314719c9e287638acbc1ef82651d14fee6e1a55a
2024-05-21 14:19:05 -07:00
Spandan Das
5f1f9405b5 Restrict validateApexClasspathFragments to active apex prebuilts
This is a followup to https://r.android.com/3073624 that moved
validation of bcp jars to the top-level prebuilt apex. It is possible
that there can be multiple prebuilt variants of a mainline module and
each prebuilt might have a skew in bcp jars. This CL limits the check to
only the selected apex prebuilt.

Test: go test ./apex
Bug: 328578801
Change-Id: If225a1af6004b6584b86ec442f99672f0d1f8314
2024-05-21 18:59:23 +00:00
Cole Faust
bc82eaf0f6 Remove printf in tests
This causes unnecessary spam when running
m nothing --no-skip-soong-tests.

Test: m nothing --no-skip-soong-tests
Change-Id: I4d893b3da47a9f79774c67274a84ff77be9c4811
2024-05-21 11:22:29 -07:00
Cole Faust
b9519094d9 Add test for selects with variables
I thought this might need extra parsing code to handle, but it appears
to work fine.

Bug: 323382414
Test: Presubmits
Change-Id: I4e8bf44a222427c34b2709a41aa5497984154d9d
2024-05-21 11:20:15 -07:00
LaMont Jones
e0d5ea1d7c Merge "Add Factory methods, WriteFormattedMessage" into main 2024-05-21 17:30:21 +00:00
Yu Liu
928cb6d557 Merge "Write ninja file in parallel." into main 2024-05-21 17:22:01 +00:00
Jeongik Cha
aaa6dcdabb implement InstallDepNeeded for sdkLibraryComponentTag
To include a sdk library impl and a permission xml for that.

Bug: 340365498
Test: m aosp_cf_system_x86_64 && check if there is a sdk lib impl and
permission xml

Change-Id: I10190fb9d398b6249efd6fe50b204e328250f23f
2024-05-22 00:43:20 +09:00
Treehugger Robot
1c07aaac6a Merge "Add clang_verify property for cc." into main 2024-05-21 08:00:45 +00:00
Hsin-Yi Chen
cf90c1596a Merge "Add --release and --lib-variant to the instructions to update ABI dumps" into main 2024-05-21 04:56:19 +00:00
kellyhung
d62ea30647 Add clang_verify property for cc.
This property is to support cflags "-Xclang -verify" build pass in Soong. The behaviors of clang_verify:
- append cflags "-Xclang -verify"
- append "&& touch $out" to the clang command line

Bug: 311284462
Test: go test -run TestClangVerify

Change-Id: Ic5825e2d649da4c3c5ed6da916e9804d7e3c03da
2024-05-21 11:31:48 +08:00
Jiyong Park
46469d6a03 Merge "Add multilib.prefer32.deps to packaging base" into main 2024-05-21 01:00:58 +00:00
Treehugger Robot
652824c8d6 Merge changes from topic "revert-3094658-revert-3088867-QEHDREAABY-IOPVAUIKWL" into main
* changes:
  Revert^2 "Refactor how jni_libs dependencies are added"
  Revert^2 "Add make java.dependencyTag installable or not"
  Revert "Revert "APK-in-APEX should set use_embedded_native_libs:..."
  Revert^2 "Install jni symlinks in Soong"
2024-05-20 23:00:05 +00:00
Treehugger Robot
39b3b1f71d Merge "Make refreshmod a script instead of a shell function" into main 2024-05-20 22:38:12 +00:00
Treehugger Robot
4deefa4c99 Merge "Convert envsetup.sh shell functions to scripts." into main 2024-05-20 22:38:09 +00:00