Commit graph

59178 commits

Author SHA1 Message Date
Matt Gilbride
0e2c2aaa60 Merge "lint: always run module specified in ANDROID_LINT_CHECK_EXTRA_MODULES" 2022-11-21 17:38:21 +00:00
Paul Duffin
6fcb32258a Merge "Revert "Improve error reporting when depending on prebuilt implementation jar"" 2022-11-21 17:20:03 +00:00
Treehugger Robot
91831b3e7c Merge "Use missing.x509.pem instead of missing.pem for faked missing certificates" 2022-11-21 16:04:40 +00:00
Nikita Ioffe
d732da7251 Propagate stub_only_libs to the invocation generating stub sources
In some cases the java_sdk_library needs to compile against hidden
platform APIs, in order to do so it needs to add impl_only_libs
dependency on the framework library, and set the sdk_version property to
the "core_*" one (e.g. core_platform).

However, if this java_sdk_library depends on the Android SDK in it's
stable API surface, then the setup above will break the stubs srcs
generation, as it uses the sdk_version of the java_sdk_library (e.g.
core_platform), which doesn't have symbols from the Android SDK.

This chage solves the problem by propagating the stub_only_libs to the
invocation that generates the stub sources. It allows the
java_sdk_libraries to add a stub_only_libs dependency on the
android_module_lib_stubs_current stubs library to fix their stubs build.

For more context see another change in this topic:
https://android-review.git.corp.google.com/c/platform/packages/modules/Virtualization/+/2310569

Bug: 243512044
Test: builds
Test: m nothing
Change-Id: Id745cfb2789901672561050c1c3f8bb163922379
2022-11-21 15:51:40 +00:00
Paul Duffin
7ed6ff8c76 Revert "Improve error reporting when depending on prebuilt implementation jar"
This reverts commit c61783b20d.

Bug: 257969510
Reason for revert: b/255275437 - breaks checkbuild target

Change-Id: I01f88053cc24dbc1a4eb5c009f15473bdff3d565
2022-11-21 10:57:30 +00:00
Martin Geisler
a512bb53ad Merge "rust: expand docstrings for Rust module types" 2022-11-21 10:33:56 +00:00
Martin Geisler
3e9a5d9e2f Merge "rust: Test with full Rust “crate_type”" 2022-11-21 10:29:42 +00:00
Martin Geisler
3e0efc52f3 Merge "rust: Fix indentation, convert to TABs" 2022-11-21 08:36:33 +00:00
Colin Cross
a54f4b5262 Use missing.x509.pem instead of missing.pem for faked missing certificates
sign_target_files_apks and check_target_files_signatures require that
certificates have a .x509.pem extension and reject missing.pem.  Using
missing.x509.pem instead.

Bug: 259861670
Change-Id: I0b2367213a8cbe390c231a8609bb04df2b125eda
2022-11-21 04:35:55 +00:00
Usta (Tsering) Shrestha
1ad62c7073 Merge "ShouldKeepExistingBuldFileForDir look up by dir" 2022-11-19 03:55:46 +00:00
Jihoon Kang
60d4a09cb5 Update java_api_library prop name
Context
- Update java_api_library module's prop name from api_providers to
  api_contributions to adjust to module rename
- Update variables name correspondingly to enhance readability

Test: m
Change-Id: I93b941a572e04bed6084109d151ba83a82715651
2022-11-19 01:03:03 +00:00
mattgilbride
e17645fe30 lint: always run module specified in ANDROID_LINT_CHECK_EXTRA_MODULES
Before this change, ANDROID_LINT_EXTRA_CHECK_MODULES was only read if
ANDROID_LINT_CHECK was also set.  This change allows an entire module of
checks to be added to lint without having to specify all of the
individuals with ANDROID_LINT_CHECK.

This is part of a workaround to run some lint checks globally, but is
useful to provide more flexibility generally.

Bug: 236558918
Test: manually tested with AndroidFrameworkLintChecker
Change-Id: I2d3ec8a997d902c9d00a577a56f4b152b10e078a
2022-11-18 20:56:05 +00:00
Martin Geisler
67ec054ad0 rust: expand docstrings for Rust module types
This gives a tiny bit of context in the documentation and allows
people to more easily map the Soong build rules to the Rust
terminology.

Bug: 254469782
Test: atest
Change-Id: Ia8fde42c15919dd03954e9ebf83022d0a569407e
2022-11-18 12:11:03 +01:00
Martin Geisler
b8a4c2cad1 rust: Test with full Rust “crate_type”
What we call “static” in Soong is called “staticlib” in Rust, see
https://doc.rust-lang.org/reference/linkage.html for details.

Bug: 254469782
Test: atest
Change-Id: I65bba511d3ce8e7e53c6a1de3e77e30568934ce7
2022-11-18 12:10:58 +01:00
Martin Geisler
bd736daba3 rust: Fix indentation, convert to TABs
The two “rust_ffi_host” modules looked different in my editor because
one was indented with TABs and the other with spaces. They now
consistently use spaces (like the other examples in this file).

Test: atest
Change-Id: I7d0cdba5978da92a1a299bb290472403d4f13462
2022-11-18 11:59:09 +01:00
Treehugger Robot
6f235d9b39 Merge "Add props property to add_avb_hash_footer" 2022-11-18 06:19:31 +00:00
Jiyong Park
bc48548df1 Add props property to add_avb_hash_footer
It is used to provide name:value properties to the footer. Value can be
from a text in *.bp file or a binary file referenced via the `file`
prop. e.g.

```
avb_add_hash_footer {
	...
	props: [
		{
			name: "string_prop",
			value: "string_value",
		},
		{
			name: "binary_prop",
			file: "a_binary_file_name",
		},
	],
}
```

This CL also adds a test for the module type which has been missing.

Bug: 256148237
Test: m nothing
Change-Id: Idf55b308c8ce760387c01a847846b42d1aebe4ea
2022-11-18 12:56:12 +09:00
Colin Cross
9e8ab16fae Merge "Remove modules form legacyCorePlatformModules that build in internal master" 2022-11-18 03:35:52 +00:00
Yabin Cui
df3168f60d Merge "Allow deprecated flags when building with LLVM_NEXT." 2022-11-18 00:40:57 +00:00
Treehugger Robot
0351be5adc Merge "Provide Bazel timing breakdown for the mixed builds" 2022-11-18 00:20:52 +00:00
Jihoon Kang
5cb82e36be Add java/fuzz_test.go to test sources
Context
- fuzz_test.go is not listed in the soong/java test sources and is not
  running on CI.

Implementation
- Fix fuzz_test.go and add to test sources

Test: m
Change-Id: If2685c646dec4885fc42d7760992309bfa9da382
2022-11-17 21:46:48 +00:00
Yabin Cui
758dfa1c28 Allow deprecated flags when building with LLVM_NEXT.
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
is deprecated in the next compiler. So add -Wno-unused-command-line-argument
to skip it.

Bug: 253033919
Bug: 259559364
Test: run test_compiler.py
Change-Id: I9133a36700afd3ef411092fd8133a7fe1c2c7343
2022-11-17 13:00:40 -08:00
Colin Cross
148917e5ab Merge "Remove modules from legacyCorePlatformApiModules that build without it" 2022-11-17 18:28:00 +00:00
Treehugger Robot
80850d8639 Merge "Fix the ABI dump directory name for vendor libraries" 2022-11-17 04:46:25 +00:00
Jihoon Kang
067e62e49f Merge "Create java_api_contribution and java_api_library module" 2022-11-17 03:55:43 +00:00
Sasha Smundak
4975c82666 Provide Bazel timing breakdown for the mixed builds
Instead of single event in the build metrics
```
| soong_build.mixed_build.bazel          | 1:17.1 |
```
it will now show:
```
| soong_build.mixed_build.bazel          | 1:17.1 |
| soong_build.mixed_build.bazel.cquery   |   51.9 |
| soong_build.mixed_build.bazel.aquery   |   23.1 |
| soong_build.mixed_build.bazel.symlinks |    2.1 |
```

Test: treehugger
Change-Id: I84a7dda6e3122860da9aaa98bfa6afe33d392dcf
2022-11-16 18:44:08 -08:00
Wei Li
c33c2e732a Merge "Fix the following issues in bazel_handler:" 2022-11-16 23:45:47 +00:00
Treehugger Robot
3d99948e29 Merge "Make htmlGzNotice an internal variable instead of apexBundle field." 2022-11-16 23:19:44 +00:00
Jihoon Kang
0ac87c21bd Create java_api_contribution and java_api_library module
Context
- Droidstubs module is currently responsible not only for java api stubs
  generation, but also for checking api equality and compatibility.
- Generating stubs with incomplete api text file that does not list
  entire api surface is done through metalava implicitly adding unlisted
  methods from java source files to the stubs in droidstubs module.
- These factors make java stubs generation harder to debug, thus
  introduce `java_api_contribution` and `java_api_library` modules to make java
  api stubs and jar generation more explicit in Android.bp level and
  eventually easier to debug.

Implementation
- `java_api_contribution` module is included in api domains' directory and
  lists api text file directory to be added to the api surface
- `java_api_library` collects all api text file that forms the api surface
  and creates stubs invoking metalava. Generated java stub files are
  converted into `.srcjar`, and eventually `.jar` file which is the complete
  api surface.

Test: m
Change-Id: I86f097cc8592334a5eaa900cec12764c5fcc09e7
2022-11-16 23:05:41 +00:00
Sam Delmerico
775f2cb3cd Merge "export neverallow include dir list to Bazel" 2022-11-16 20:52:17 +00:00
Treehugger Robot
b70f746eac Merge "go.mod readability improvement" 2022-11-16 20:49:05 +00:00
Ulya Trofimovich
a672771df9 Merge "Do not assume that boot image profile exists when building ART apex." 2022-11-16 19:36:31 +00:00
Jingwen Chen
4a9630b4ad Make htmlGzNotice an internal variable instead of apexBundle field.
It's not read outside of the function / action generation logic, so keep
it inside the function.

Test: presubmits
Fixes: 190817312
Change-Id: I0626e6c86adc584abb2a251cbc7ffb1bec2c7f59
2022-11-16 19:12:35 +00:00
Colin Cross
bf29be8f19 Merge "Remove modules that don't exist from legacyCorePlatformApiModules" 2022-11-16 18:09:07 +00:00
Colin Cross
e4b131a5da Merge changes I0886baa4,I584f98f9
* changes:
  Sort legacyCorePlatformApiModules
  Remove SystemUI from legacyCorePlatformApiModules
2022-11-16 17:02:01 +00:00
Wei Li
cbd181c8e8 Fix the following issues in bazel_handler:
1) Convert coverage path wildcard to regex values for --instrumentation_filter to Bazel.
2) Handle the error properly when aquery commmand returns error.

Bug: 258397103
Test: CIs
Change-Id: Ie7485c2c45f2eb0e1ca0dc60478aae04ab151b61
2022-11-16 08:59:23 -08:00
Alix Espino
3044987181 Merge "bp2build for java_library with .kt srcs or common_srcs" 2022-11-16 15:40:55 +00:00
Treehugger Robot
bd12239355 Merge "remove dead Bazel code from soong_ui" 2022-11-16 15:27:42 +00:00
Ulya Trafimovich
f5c548db17 Do not assume that boot image profile exists when building ART apex.
If the apex is built without boot images, profile may not exist.

Test: treehugger
Change-Id: I0824100d0ac38f4b7b71b302b401a0c66c3ff3cf
2022-11-16 14:59:05 +00:00
Sam Delmerico
d87f61ba18 Merge "export clang-tidy extraArgFlags to Bazel" 2022-11-16 14:17:43 +00:00
Jiakai Zhang
616be0695e Pass "-Xgc:CMC" to dex2oat when userfaultfd GC is enabled.
This change is a no-op change. It doesn't enable userfaultfd GC by
default. ENABLE_UFFD_GC=true can be passed to the build system to enable
userfaultfd GC for testing purposes.

Bug: 242553398
Test: -
  1. lunch aosp_oriole-userdebug
  2. ENABLE_UFFD_GC=true m
  3. See "--runtime-arg -Xgc:CMC" in .invocation files.
Change-Id: I789b49a71b9604fd41bf1ef77d0ac5bac4cbdf25
2022-11-16 12:04:53 +00:00
Usta Shrestha
ea9996411d ShouldKeepExistingBuldFileForDir look up by dir
instead of scanning every entry in the map for prefix-match, search each ancestor of the dir

Bug: N/A
Test: bazel_test.go#TestShouldKeepExistingBuildFileForDir()
Change-Id: I7c9afa456cca5a70624ae1e9c9b96c43b0110c1e
2022-11-15 21:39:37 -05:00
Usta Shrestha
914bbebc13 go.mod readability improvement
Bug: N/A
Test: Verified by loading the project in IntelliJ
Change-Id: I9fa16fbea108436a52fc3bb4b39d9a2c1a73bee5
2022-11-15 21:35:39 -05:00
Sam Delmerico
46d08b4e39 export neverallow include dir list to Bazel
Bazel needs to recreate the neverallow behavior for absolute includes,
so export the list of include dirs to soong_injection.

Bug: 250931909
Test: aosp/2302925
Change-Id: I3bd345ea4cfb3181f07e4570466f2fc8c5fe32da
2022-11-15 17:33:21 -05:00
Sam Delmerico
d9a34353cf remove dead Bazel code from soong_ui
Test: CI
Change-Id: Ie9b56c59440ab63d421d19b382cf4f669a5ea215
2022-11-15 17:29:27 -05:00
Alix
8062f4dee7 bp2build for java_library with .kt srcs or common_srcs
java_library modules with .kt srcs or common_srcs will be converted into
module type kt_jvm_library

Test: m bp2build, manually inspected build files for allowlisted modules
Bug: 258688914
Change-Id: I8293a11c8247b4b76358d0991f82c6b61b58adc3
2022-11-15 20:01:29 +00:00
Spandan Das
ed9729727c Merge changes from topics "nested-nsjail", "ro-api-surfaces-dir"
* changes:
  Special-case Soong finder to look in out/api_surfaces
  nsjail support verification should respect BUILD_BROKEN* flag for SrcDir
2022-11-15 19:56:23 +00:00
Usta (Tsering) Shrestha
4b67bb3013 Merge "re-trigger symlink-forest if bazel.list changes" 2022-11-15 16:09:56 +00:00
Parth Sane
d96735d5cc Merge "Add android.SdkModule to Sdk Versions that have AIDL traces generated" 2022-11-15 13:04:42 +00:00
Paul Duffin
c467a98bc0 Merge "Build mode function should return output file" 2022-11-15 09:37:52 +00:00