Commit graph

72042 commits

Author SHA1 Message Date
Vinh Tran
14d60d1fd0 Allowlist toolchain/pgo-profiles
Test: m bp2build
Change-Id: I3c4b383941c24aa948e1a42aa782349567398c5f
2023-10-11 12:17:30 -04:00
Ivan Lozano
e94f26e2e8 Merge "rust: Emit -x c++ for bindgen modules with cpp_std" into main 2023-10-10 13:05:02 +00:00
Zi Wang
57e60bf82b Merge "Use correct module name for java_import in shouldConvertWithBp2build verification" into main 2023-10-10 05:19:10 +00:00
Treehugger Robot
6525ee82d7 Merge "Revert "Do not convert non-unit tests."" into main 2023-10-10 02:22:14 +00:00
Spandan Das
0f81762d3f Merge "Replace ndk_libs.bzl with an attr in cc_stub_suite" into main 2023-10-10 02:18:09 +00:00
Yi Kong
cdd6a47bbf Merge "Remove GLOBAL_THINLTO build option" into main 2023-10-10 01:41:56 +00:00
Zi Wang
734266b633 Use correct module name for java_import in shouldConvertWithBp2build verification
This change makes sure that prebuilt module has correct module name
prefix("prebuilt_") inside method shouldConvertWithBp2build, to avoid
the bp2build conflict issue when a normal module and a prebuilt module
with the same name are both allowlisted.

Test: CI, added unit tests and the steps to reproduce in b/303376793

Bug: 303376793
Bug: 303868211
Change-Id: I4f1126182ec1f52ae6a08046a77204939230edef
2023-10-09 16:51:35 -07:00
Spandan Das
008f2e55c7 Merge "Allowlist jni libs of FrameworksNetsTests" into main 2023-10-09 23:38:59 +00:00
Treehugger Robot
f292a424d4 Merge "Denylist genrules that fail to build with sandboxing" into main 2023-10-09 23:35:39 +00:00
Jingwen Chen
6e119745b8 Revert "Do not convert non-unit tests."
This reverts commit 80b54d2502.

Reason for revert: caused hello_world_test to not be converted, but it's a test that builds/passes

Bug: 300117121

Change-Id: I805cfb336b7f58a5a1e295cade16be4c471e2ed5
2023-10-09 23:21:54 +00:00
Treehugger Robot
cbe61221b6 Merge "Remove ?= assignements to product variables" into main 2023-10-09 22:20:16 +00:00
Treehugger Robot
a1e713fe24 Merge "Exclude REL from preview API levels." into main 2023-10-09 20:34:06 +00:00
Spandan Das
7836d75592 Merge "Allowlist jni libs of FrameworksNetsTests" into main 2023-10-09 19:55:00 +00:00
Cole Faust
8e15f69709 Remove ?= assignements to product variables
In make, all product variables are assigned to an empty string before
including the product config makefiles. In starlark, we don't do that
just so the memory usage is smaller. This means that in make, using
?= to assign a product config variable has no effect. Replicate this
behavior in starlark by not emitting any code for ?= assignments of
product variables.

Fixes: 304324003
Test: go test
Change-Id: Id31531506ac9e372a1bea92ce9ae8e17ae0ca70c
2023-10-09 12:26:21 -07:00
Spandan Das
17a27f0c14 Replace ndk_libs.bzl with an attr in cc_stub_suite
(This CL is a cleanup, and should be a no-op)

Currently we support three variations of cc api stubs.
1. publicapi stubs, i.e. ndk stubs (empty additional args to ndkstubgen)
2. module-libapi stubs that are also an ndk library (--systemapi --apex)
3. module-libapi stubs that are not an ndk library (--systemapi --apex
   --no-ndk)

ndk_libs.bzl was used to differentiate between (2) and (3). This creates
an additional layer of indirection - users will need to modify this
external .bzl file if they would like to add a library to an ndk.

Replace this with an explicit atttibute in cc_stub_suite macro for better UX.

Test: go test ./bp2build
Test: b test //build/bazel/rules/cc:cc_stub_library_tests (added in
sibling CL)
Bug: 299501496

Change-Id: Idd3579e8013bae7a1740534f90d2767df5bac1a5
2023-10-09 18:07:39 +00:00
Elliott Hughes
69cf8a3221 Merge "Have the sanitizers trap rather than abort." into main 2023-10-09 16:08:05 +00:00
Treehugger Robot
37fb733466 Merge changes from topic "aapt2_toggle_bazel" into main
* changes:
  Allowlist prebuilt version aapt2
  Allowlist kotlinx_coroutines_android
2023-10-09 16:02:37 +00:00
Ivan Lozano
829e1e9378 rust: Emit -x c++ for bindgen modules with cpp_std
rust_bindgen modules which defined cpp_std with a .h file were not
correctly emitting the `-x c++` flag. This CL addresses that, and
ensures that if either cpp_std or c_std is set then the appropriate
behavior occurs no matter the file extension.

Bug: 304269101
Test: Soong tests
Change-Id: I71a8ae30ac0ed502d9d3fbf2f3039b0c56529d39
2023-10-09 11:52:18 -04:00
Yi Kong
950c17435d Remove GLOBAL_THINLTO build option
GLOBAL_THINLTO is now default, since it improves build speed, produces
more performant code and smaller binary. Remove the option to turn it
off since we no longer maintain that variation, and that simplifies the
logic (esp. for moving CFI builds to ThinLTO).

Also fixed a bug where ThinLTO is not propagated to its static deps on
non-default targets (32-bit or host).

Test: presubmit
Bug: 169004486
Change-Id: I31f41ba27c2b94a384d2ba5027049c307d6f4334
2023-10-09 10:56:14 +00:00
Yi Kong
0b6c4b7c08 Merge "Change lto_test to use GlobalThinLTO configuration" into main 2023-10-09 10:41:28 +00:00
Kiyoung Kim
f161d653cf Merge "Disable TARGET_VNDK_USE_CORE_VARIANT if VNDK is deprecated" into main 2023-10-09 05:31:12 +00:00
Krzysztof Kosiński
5a55439d12 Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I2d7ef129bc8cad247d805ad392f05cd9d517b67e
2023-10-07 19:59:58 +00:00
Treehugger Robot
a32f556ad3 Merge "Handle include statements with trailing whitespace" into main 2023-10-06 22:25:04 +00:00
Treehugger Robot
6bc88ae14d Merge "Allowlist AndroidFrameworkLintChecker" into main 2023-10-06 20:17:25 +00:00
Treehugger Robot
9ea1d061b7 Merge "Update Headers_only to a bool pointer" into main 2023-10-06 19:59:17 +00:00
Alyssa Ketpreechasawat
2711ce2e1f Merge "Revert "Revert "Disable hiddenapi check for building from prebuilts.""" into main 2023-10-06 19:17:40 +00:00
Cole Faust
10b31340a6 Denylist genrules that fail to build with sandboxing
These were added with the android 14 release.

Bug: 290816499
Test: run genrule_sandbox_test.py with a local change to check all genrules in the tree
Change-Id: Icf3627c245638ab3f73b83e24ef04c916d7ab58b
2023-10-06 12:01:02 -07:00
Cole Faust
b0b2457842 Handle include statements with trailing whitespace
Fixes: 303832950
Test: go test
Change-Id: I919556ee43a60f59dbd7c040025f01abb53da2a8
2023-10-06 11:57:29 -07:00
Dan Albert
dbd4a25cf7 Merge "Fix error message to still be an error." into main 2023-10-06 18:55:32 +00:00
Vinh Tran
001ec85bcc Merge "Export device arm64 rust flags to Bazel" into main 2023-10-06 17:50:15 +00:00
Romain Jobredeaux
69e2d83e8d Allowlist prebuilt version aapt2
Bug: 303786272
Test: CI + Manual build
Change-Id: I0a748430e4f2c4d77c6564562c3a85b0dc4368e4
2023-10-06 13:46:42 -04:00
Romain Jobredeaux
f2e3c111ec Allowlist kotlinx_coroutines_android
Change-Id: Ib097d43e0abb6a94cdb4e0ff13d6ac3e0c13da9f
2023-10-06 13:46:15 -04:00
Mark Dacek
e0b6329384 Merge "Revert "Revert "Modify symlink_forest to rerun when soong_build has changed.""" into main 2023-10-06 17:34:47 +00:00
Spandan Das
ef3fbfeef2 Allowlist jni libs of FrameworksNetsTests
This includes
- libandroid_net_connectivity_com_android_net_module_util_jni
- libservice-connectivity
- netd_aidl_interface-V5-cpp

Bug: 297405814
Test: b build $(bmod libandroid_net_connectivity_com_android_net_module_util_jni) --config=android
Test: b build $(bmod libservice-connectivity) --config=android
Test: b build //packages/modules/Connectivity/staticlibs/netd:netd_aidl_interface-V5-cpp --config=android

Change-Id: I519bfba93cc0b8895b21a4287abd85299fea9afc
2023-10-06 17:18:48 +00:00
Spandan Das
046c8b4f19 Allowlist jni libs of FrameworksNetsTests
This dir contains the following jni libs
- libnetworkstatsfactorytestjni
- libandroid_net_frameworktests_util_jni

Bug: 297405814
Test: b build $(bmod libnetworkstatsfactorytestjni) --config=android
Test: b build $(bmod libandroid_net_frameworktests_util_jni) --config=android

Change-Id: I3905396cab8df5ebbbf12eafcd9f96cde8305697
2023-10-06 17:18:45 +00:00
Treehugger Robot
aa46295842 Merge "Remove unnecessary arch variant for patch module" into main 2023-10-06 15:20:20 +00:00
Christopher Parsons
f7fe400fbc Merge "Dont write data attrs for cc lib rules" into main 2023-10-06 14:09:07 +00:00
Alyssa Ketpreechasawat
5cdd22700e Merge "Revert "Added new framework-pdf jar inside MediaProvider module"" into main 2023-10-06 10:56:29 +00:00
Alyssa Ketpreechasawat
34ab8792c5 Revert "Revert "Disable hiddenapi check for building from prebuilts.""
This reverts commit bb6b813b1d.

Reason for revert: resubmit

Change-Id: I0ded78ed1a355654fa142351b95cd51f48c2186e
2023-10-06 07:01:23 +00:00
Alyssa Ketpreechasawat
affbb8d206 Merge "Revert "Disable hiddenapi check for building from prebuilts."" into main 2023-10-06 06:18:18 +00:00
Xin Li
5c7d0cfb7d Merge "Merge Android 14" into main 2023-10-06 05:38:53 +00:00
Treehugger Robot
c6f50151d0 Merge "Denylist genrules that fail to build with sandboxing" into main 2023-10-06 05:27:32 +00:00
Kiyoung Kim
03b6cba1f2 Disable TARGET_VNDK_USE_CORE_VARIANT if VNDK is deprecated
TARGET_VNDK_USE_CORE_VARIANT enables vendor to use some of the VNDK
libraries with core variant installed in /system/lib. However, this does
not make sense when VNDK is deprecated. This change is to ignore
TARGET_VNDK_USE_CORE_VARIANT when the VNDK is deprecated.

Bug: 303754049
Test: aosp_cf_x86_go_phone boot succeeded
Change-Id: Ie9fa75e0fa452e48924d51d64201690ffb271f33
2023-10-06 14:12:43 +09:00
Cole Faust
8a25345b7d Denylist genrules that fail to build with sandboxing
Bug: 290816499
Test: run genrule_sandbox_test.py with a local change to check all genrules in the tree
Change-Id: Id18b801c2306dd59b5b593b004b513b578ce3705
2023-10-06 05:12:07 +00:00
Alyssa Ketpreechasawat
bb6b813b1d Revert "Disable hiddenapi check for building from prebuilts."
Revert submission 2761821-suppress-hiddenapi-check

Reason for revert: have some typo - break next build

Reverted changes: /q/submissionid:2761821-suppress-hiddenapi-check

Change-Id: I9fce1e1a9389d58928f1eec50c0eaf016f5f63ac
2023-10-06 03:42:34 +00:00
Alyssa Ketpreechasawat
5e0ee313e1 Merge "Disable hiddenapi check for building from prebuilts." into main 2023-10-05 23:51:29 +00:00
Zi Wang
b0f3ff43e5 Merge "Add support for java_library proto plugin in bp2build" into main 2023-10-05 22:32:53 +00:00
Xin Li
5a38034916 Merge Android 14
Bug: 298295554
Merged-In: Idc0ff2f20e54b81cfdf61472a72e9cb027f60554
Change-Id: I6c032acf0826b910d045a7a23373597c78a5ee0a
2023-10-05 15:31:31 -07:00
Chris Parsons
7123cc5370 Dont write data attrs for cc lib rules
The data attributes for cc library rules is dropped by their starlark
macros, so serves no real purpose. Furthermore, this unused dependency
proves problematic for allowlist v2, as there are many cases at HEAD
where the corner-case "requires" dependency would otherwise mark a module
as unconvertible.

Fixes: 303307456
Test: New unit test
Test: Manual verification to unblock allowlist v2 `bp2build.sh` runs in
AOSP

Change-Id: I6ca6104b958d2b428fc2ca5b3fa794106571acca
2023-10-05 22:07:28 +00:00
Elliott Hughes
3bba0e4bfe Have the sanitizers trap rather than abort.
abort() seems friendlier, but in practice it puts a couple of irrelevant
libc.so frames on the top of the stack trace and clobbers all the
registers that might have helped remotely debug a sanitizer failure.
Let's switch to trapping directly in the sanitized code instead.

Bug: http://b/298741930
Test: treehugger
Change-Id: I6c971920c8506f97133749aaddd73b8cea6a12bc
2023-10-05 14:51:28 -07:00