Commit graph

81752 commits

Author SHA1 Message Date
Sam Chiu
9b7e07c7aa Revert "Enable -Wfortify-source"
This reverts commit a6e022c835.

Reason for revert: To verify the broken build b/339553761

Change-Id: Ib5546879effc283464a9ef66a20378960f9a56bf
2024-05-09 06:52:15 +00:00
AdityaK
a6e022c835 Enable -Wfortify-source
Fixes: 315245071
Change-Id: Ic8ca6a1c0dafea62f2bca3d20f5c86b3e3225ea0
2024-05-08 16:35:51 +00: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
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
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
Paul Duffin
375acd8def Correct lint error when it cannot find api_versions_* module
Also, fixes the error when it cannot find a module containing the
`annotations.zip` file.

Bug: 336993217
Test: change `apiVersionsModule` setting in `lint.go` to refer to
      a non-existent module and then run `m nothing` to see the
      error message correctly lists the module name.
Change-Id: I84a9e241d1c3bedebc26e119bd4b9861664c43c1
2024-05-03 09:37:42 +01:00
Inseob Kim
364740b4a4 Merge "Merge logtags from cc modules too" into main 2024-05-03 05:10:22 +00:00
Jooyung Han
4191da7292 .capex is a container
.capex should be handled as a container when generating NOTICE.

Bug: n/a
Test: Presubmits
Change-Id: Ief4b0a8d18d52ff6510521e0a2b1f4588e259a75
2024-05-03 11:41:11 +09:00
Florian Mayer
37d17209b2 Merge "Make memtag_stack a variant" into main 2024-05-03 00:20:37 +00:00
Treehugger Robot
0cc2749a4f Merge "release-config: use ${TARGET_RELEASE} for output" into main 2024-05-02 23:24:32 +00:00
Colin Cross
814e80038b Merge changes from topic "replace_dependencies" into main
* changes:
  Only update DebugMutator and DebugVariation for non-empty transition variations
  Update docs for ReplaceDependencies[If]
  Raise test timeout when running soong tests with race detector
2024-05-02 22:50:28 +00:00
Cole Faust
a963b94cde Make the enabled property configurable
This allows using select statements with it.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-02 15:41:24 -07:00