Commit graph

81859 commits

Author SHA1 Message Date
Treehugger Robot
7eaf503cfd Merge "Revert^2 "Remove compilation actions from java sdk library"" into main 2024-05-08 22:28:05 +00:00
Jiyong Park
2aff024c18 Merge "Don't install sdk variants, not platform variants" into main 2024-05-08 22:26:33 +00:00
Cole Faust
dfcb5c515b Remove embedded_launcher: true usages
The default value for embedded_launcher has been changed to true.

Bug: 174041232
Test: Presubmits
Change-Id: I2fb4b920828307e60c0fae6864ba720c7c31e1f2
2024-05-08 12:13:38 -07:00
Jihoon Kang
a3a05460b4 Revert^2 "Remove compilation actions from java sdk library"
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.

This change relands https://r.android.com/3035972. Implementation
changes from the original change:
- "all_apex_contributions" is added as a dependecy to the implementation
  library modules where the parent sdk_library module has a prebuilt
  equivalent. This allows the source apex variant to be hidden from make
  when the prebuilt is active.

Test: patch in internal main, lunch barbet-ap2a-userdebug && m nothing
Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I017938e5567aef82e428e7ceb557d9c9090e0257
2024-05-08 17:46:31 +00:00
Raphael Blistein
5985846f29 relax the restriction on .proto files in data
Context: yaqs/7447701439926763520#a1

Bug: b/339454115
Test: go test
Change-Id: If3ed81334a192993d32404301b55ca7b4f5780ae
2024-05-08 17:28:19 +00:00
AdityaK
a6e022c835 Enable -Wfortify-source
Fixes: 315245071
Change-Id: Ic8ca6a1c0dafea62f2bca3d20f5c86b3e3225ea0
2024-05-08 16:35:51 +00:00
LaMont Jones
992011ea77 Always write makefile for ${TARGET_RELEASE}
When writing all makefiles, we also need to write the makefile for
${TARGET_RELEASE}.  We can skip writing it a second time if it is not
an alias.

Bug: 328495189
Test: manual, TH
Change-Id: Ia5d1955f419312c76eb9c8a33b1c8a6bcc5efe0b
2024-05-08 09:16:44 -07:00
Treehugger Robot
d02d710570 Merge changes from topic "revert-3075263-MMTOVXSVUO" into main
* changes:
  Revert "Always embed jni libs and store uncompressed"
  Revert "Collect transitve deps of jni libs only for bundled apps"
2024-05-08 09:48:24 +00:00
Sam Chiu
a71b90cf81 Revert "Always embed jni libs and store uncompressed"
Revert submission 3075263

Reason for revert: verifying the test failure b/339332424

Reverted changes: /q/submissionid:3075263

Change-Id: I0e1a526893ee6c591eaefadcee4bbbf321dfc1df
2024-05-08 06:49:33 +00:00
Sam Chiu
4f63dc7904 Revert "Collect transitve deps of jni libs only for bundled apps"
Revert submission 3075263

Reason for revert: verifying the test failure b/339332424

Reverted changes: /q/submissionid:3075263

Change-Id: Id976cba1156b13433d86988eaf41926b7d438433
2024-05-08 06:49:33 +00:00
Jiyong Park
acd5f590af Don't install sdk variants, not platform variants
Background: if a lib has `sdk_version` set, it is mutated into two
variants: platform and sdk. The latter is for the inclusion into
unbundled APKs which can be installed on older platforms. The former is
what is installed to the platform.

So far, for unbundled app builds, (1) the platform variant was marked as
uninstallable, (2) while the sdk variant was left installable. (1) is
causing a problem (b/339262059) when an APEX containing a filesystem
module is built as unbundled. The filesystem skips installing the
platform variant. (2) is not causing a problem, but is unnecessary
because the sdk variant is not something to be installed (on the
platform). It is built into the APK via the jni_libs property. It's not
considered an installation.

This change fixes (1) and (2). For (1), the platform variant is always
marked installable even for unbundled build. For (2), the sdk variant is
always marked non-installable.. because, again, it's not designed to be
installed to the platform.

Bug: 339262059
Test: banchan com.android.virt aosp_arm64
UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true m apps_only dist
check libc++.so, libcrypto.so are in the microdroid image in the APEX.

Change-Id: I8999b724926cd9ab6d56796133e218fefcc1910b
2024-05-08 11:29:11 +09:00
Jiyong Park
14f7714fb4 Merge changes Ie866b192,I7df993ea into main
* changes:
  Collect transitve deps of jni libs only for bundled apps
  Always embed jni libs and store uncompressed
2024-05-08 01:28:45 +00:00
Jiyong Park
54fa3bbef5 Merge "Run two microdroid test case as postsubmit" into main 2024-05-07 23:10:42 +00:00
Treehugger Robot
780ad1edf7 Merge "build_flag: improve default flag value directory" into main 2024-05-07 22:04:22 +00:00
LaMont Jones
d6406171ae build_flag: improve default flag value directory
The default directory for flag values is the last of:
 - Where the flag is declared,
 - Where the release config is first declared,
 - Where the flag value is currently being set for this release config.

Bug: 328495189
Test: manual
Change-Id: Ida1f906b75704f658e7fa1de703e0c789dce06a6
2024-05-07 13:59:28 -07:00
Tomasz Wasilczyk
e3eb59db9f Merge "BaseCompilerProperties: add AidlInterface struct for aidl_interface info" into main 2024-05-07 19:09:50 +00:00
Cole Faust
3f01580c04 Merge "Make the enabled property configurable" into main 2024-05-07 17:49:10 +00:00
Kiyoung Kim
0d4a9ca792 Fix build error from llndk.libraries.txt
llndk.libraries.txt build fails from clang tools build, as there is no
valid target path for llndk.libraries.txt from the build. This change
skips llndk.libraries.txt build if target output path is empty.

Bug: 330100430
Test: prebuilts/clang-tools/build-prebuilts.sh passed
Change-Id: I867dc90dbf98e3d8c24b191a744686286740b230
2024-05-07 16:11:41 +09:00
Yi Kong
0135499554 Revert^4 "Upgrade to clang-r522817"
This reverts commit 33fb507271.

Change-Id: Ib29f98c8540b3cda04ae99743d34e9a81dc0e6ad
2024-05-07 04:50:16 +00:00
Treehugger Robot
bf30241e75 Merge "rustc-1.77.1.p1 Build 11801116" into main 2024-05-07 02:39:45 +00:00
Hsin-Yi Chen
a27230aaf6 Merge "Disable header ABI checker for NDK" into main 2024-05-07 02:28:04 +00:00
Jooyung Han
197b56f58b Merge ".capex is a container" into main 2024-05-07 01:36:41 +00:00
Jiyong Park
abac650b6f Run two microdroid test case as postsubmit
I have broken microdroid tests quite many times when I modify build
system. Adding some key test modules as presubmit will prevent the
similar breakage in the future.

This this CL, the tests are first added as postsubmit to satisfy the SLO
requirement. Then this will get promoted to presubmit.

Bug: N/A
Test: watch TH
Change-Id: I4a294af396f9a614b550df5e72b20afb8a138d6a
2024-05-07 10:12:09 +09:00
Jihoon Kang
5284ad3b33 Merge "Revert "Remove compilation actions from java sdk library"" into main 2024-05-07 00:03:05 +00:00
Jihoon Kang
8f25d296b5 Revert "Remove compilation actions from java sdk library"
Revert submission 3070882-sdk_lib_remove_compilation

Reason for revert: Potential culprit for build breakage of barbet-ap2a-userdebug in git_main

Reverted changes: /q/submissionid:3070882-sdk_lib_remove_compilation

Change-Id: I5135760e13e0152480c68fe91a3c88564e9bc7cb
2024-05-06 22:40:22 +00:00
Charisee
cd3ac91bdc rustc-1.77.1.p1 Build 11801116
Bug: http://b/331848727
Test: m rust
Change-Id: I68cb748f0de97cc92dbfbfff79d641a64dd51d8e
2024-05-06 21:30:12 +00:00
Tomasz Wasilczyk
5b007eaa91 BaseCompilerProperties: add AidlInterface struct for aidl_interface info
This is necessary for cc_cmake_snapshot to snapshot and generate build
rules for actual source files (AIDL files) and not generated cpp
sources. Otherwise, this information is inaccessible for cc module after
aidl_interface pass.

Bug: 302718225
Test: Build aosp/2798713
Change-Id: I991e73f74d7551d21f337a7161cce55ba51fec71
2024-05-06 14:18:37 -07:00
Treehugger Robot
f91daab1ab Merge "Remove compilation actions from java sdk library" into main 2024-05-06 21:06:54 +00:00
Christopher Ferris
be83e748d4 Merge "Replace Malloc_not_svelte with Malloc_low_memory." into main 2024-05-06 19:45:05 +00:00
Ivan Lozano
7e21ca0a9c Merge "rust: Support for generated c files from bindgen" into main 2024-05-06 13:00:41 +00:00
Ivan Lozano
5fea568440 Merge "cc: Remove unneeded ubsan library linkage on host" into main 2024-05-06 13:00:20 +00:00
Treehugger Robot
4123b9aa88 Merge "Fix reference unknown variable 'file'" into main 2024-05-05 21:21:21 +00:00
Jiyong Park
4bc5231f61 Collect transitve deps of jni libs only for bundled apps
We do this because otherwise we will be embedding platform libs in the
bundled apps bloating their size.

Bug: 330276359
Test: Build Galery2 and check if libc++.so is not included there.
Change-Id: Ie866b192e9816bcb71b7ca3d74331d14d85592a4
2024-05-05 10:49:22 +09:00
Cole Faust
a5a1fa1d09 Fix reference unknown variable 'file'
Also log the rspfile for easier debugging.

Bug: 318434287
Test: Presubmits
Change-Id: I4ef6f2065a39ce6fef816f7241d079149043ffd0
2024-05-04 18:09:43 -07:00
Jiyong Park
7c9ab4f5b1 Merge changes from topic "revert-3069323-revert-3066748-duplicate_entry_fs-CIBDJQYRHU-FVLDIVWUZV" into main
* changes:
  Revert^2 "Filesystem modules follow the installation semantic"
  Revert "Revert "Prevent multiple PackagingSpecs having same inst..."
2024-05-04 03:56:55 +00:00
Treehugger Robot
b92fc67f50 Merge "Correct the order of the SdkKinds" into main 2024-05-04 01:17:19 +00:00
Jihoon Kang
248cc0072c Correct the order of the SdkKinds
Currently, all sdkKind enums are ordered from the narrower api surface to
the wider api surface, with the exception of the toolchain api surface.
This change corrects the order of the toolchain api surface so that the
enum entries are sorted in the correct order.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: Iad4205c9ce1a83be2f7d80647366fba78e9805ca
2024-05-04 00:06:59 +00:00
Jihoon Kang
d831af4267 Remove compilation actions from java sdk library
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.

Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I7534f9eaacf6d9f72fbf8d540b1e26af84106c20
2024-05-03 20:51:11 +00:00
Ivan Lozano
3b591c771a rust: Support for generated c files from bindgen
To handle static inline functions, bindgen generates a C file which is
expected to be compiled and linked into dependents on the generated
bindgen source.

This CL adds support for cc modules ingesting this output and for
bindgen to produce it (and link it against the bindgen rust_library
variant as well).

Bug: 290347127
Test: m blueprint_tests
Test: Example module with static inline functions builds locally
Change-Id: I167a8356eb6e0059fc21169fd3bfc6bf4d9c812f
2024-05-03 14:01:09 -04:00
Colin Cross
5694d3f290 Merge "Convert overrides to a TransitionMutator" into main 2024-05-03 17:54:51 +00:00
Treehugger Robot
7a4d748669 Merge "Pass module-lib and system-server extension jars for system-server" into main 2024-05-03 17:54:07 +00:00
Treehugger Robot
c9cc298bc6 Merge "Remove warning about LOAS not enabled" into main 2024-05-03 17:38:44 +00:00
Jiyong Park
3eea67d8eb Always embed jni libs and store uncompressed
Previously, unlike unbundled apps, if a platform app depends on a native
library, it is not embedded in the app, but installed to <partition>/lib
and the app is instead provided with a symlink to the lib. This actualy
is a legacy from the original Android where native libraries couldn't be
executed while embedded in the apk. To be executed, the native libs had
to be extracted to a mutable storage, but that had a risk of breaking
the verified boot, so libs couldn't be embedded.

Since API level 23, execute-in-place of native libs has become
possible. But platform apps had to opt-in (use_embedded_native_libs:
true) for the feature for a reason that is unclear today. Perhaps, it
was to save disk space in case when multiple apps share the same native
library, but such cases are found to be very rare, or non-existing.

With this CL, two changes are introduced:

1. jni libs are always embededd for all apps (bundled or unbundled)

2. use_embedded_native_libs is deprecated unless the module type is
   android_test or android_test_helper_app. It is now a
   no-op property. It's left just to not break existing bp files.

This will make unbundled apps bigger, but given that unbundled apps
built using android platform build system are tests, the size increase
should be acceptible.

Bug: 330276359
Test: m
Change-Id: I7df993ea85bce1c0a7222000c403a974818c3362
2024-05-04 01:58:09 +09:00
Ivan Lozano
2a2d509a32 cc: Remove unneeded ubsan library linkage on host
The sanitizer runtime logic was rewritten in aosp/2438959 to simplify
static sanitizer library selection. However, enabling ubsan diagnostics
for host tests would result in incorrectly adding an unnecessary
libclang_rt.asan.so dependency.

This check should have been removed as well -- the library dep
determination for c.sanitize.Properties.UbsanRuntimeDep is now handled
higher up in the logic.

(Some formatting fixes are included as well)

Bug: 323237381
Test: UBSanitized Host test with diagnostics runs correctly.
Change-Id: I97bd01344b7b676fccb9f250c0f801b8bc212a1a
2024-05-03 12:20:40 -04:00
Treehugger Robot
baaa1b1eeb Merge "Use no_full_install: true instead of installable: false" into main 2024-05-03 15:15:23 +00:00
Oriol Prieto Gascó
a874e94bab Merge "Make container mandatory in aconfig_declarations." into main 2024-05-03 14:09:48 +00:00
Kousik Kumar
074e4cc9ad Remove warning about LOAS not enabled
RBE is now the default for all Google internal builds, so this warning
is no longer necessary.

Bug: n/a
Change-Id: I2da3e9b84c20f32b3e3f90f49a974512248db2ec
2024-05-03 13:50:10 +00:00
Paul Duffin
92efc6107f Pass module-lib and system-server extension jars for system-server
While the `system-server` API surface extends the `module-lib` API
surface a library can only provide one or the other as they appear
in bootclasspath and systemserverclasspath respectively. A library
that is on the bootclasspath cannot provide a `system-server` API
as it would be usable by non-system server code. A library that is
on the systemserverclasspath could provide a `module-lib` API but
there is no point as it would only be usable by the system server
making it effectively a `system-server` API anyway.

As a result the `system-server` extension directories only contain
`service-*` jars for libraries that provide system server APIs.

e.g.
```
$ ls prebuilts/sdk/extensions/11/system-server | cat
api
service-adservices.jar
service-sdksandbox.jar
$ ls prebuilts/sdk/extensions/11/module-lib/ | cat
api
framework-adservices.jar
framework-connectivity.jar
framework-connectivity-t.jar
framework-sdksandbox.jar
framework-tethering.jar
```

So, in order to construct the whole `system-server` API, i.e. the API
visible to the system server, it is necessary to add in the
`module-lib` extension jars too which this change does.

This is necessary to construct an `api-versions.xml` file for the
complete `system-server` API.

Bug: 336993217
Test: TARGETS=$(for i in public system module-lib module-lib-complete system-server-complete; do U=$(echo $i | sed "s|-|_|g"); echo "out/target/common/obj/PACKAGING/api_versions_${U}_generated-api-versions.xml"; done)
      m $TARGETS; mkdir -p before; cp $TARGETS before
      m $TARGETS; mkdir -p after; cp $TARGETS after
      meld before after
      # Review differences.
Change-Id: Ic9652dd28f05e5f569a7a30a84b87f227314d119
2024-05-03 12:21:56 +01:00
Inseob Kim
53507d1559 Merge changes from topic "logtags_filesystem_module" into main
* changes:
  Add logtags support to filesystem module
  Export app's logtags too
2024-05-03 11:20:12 +00:00
Hsin-Yi Chen
6fd2895273 Disable header ABI checker for NDK
NDK team requested not to generate the dumps by header ABI checker in
the finalization process.

Test: m out/target/product/generic_arm64/lsdump_paths.txt
Bug: 332959609
Change-Id: Ia04c6f266088968ff731c0fabbbfce26300109ae
2024-05-03 18:37:33 +08:00