Commit graph

7946 commits

Author SHA1 Message Date
Treehugger Robot
c887ac6a04 Merge "Depend on stubs via @api_surfaces" 2023-03-17 21:06:55 +00:00
Florian Mayer
c0d209f2e5 Merge changes Ib7d0ef98,Ifbd1e542
* changes:
  Re-enable stack frame size errors
  Increase BB to explore for reachability analysis
2023-03-17 18:51:17 +00:00
Cole Faust
bebe607db4 Merge "Export non-apex variants of modules to make" 2023-03-17 17:20:19 +00:00
Spandan Das
2518c022d1 Depend on stubs via @api_surfaces
BUILD files of rdeps should depend on stubs via @api_surfaces
indirection. e.g. instead of depending on
//system/logging/liblog:liblog_stub_libs_current, it should depend on
@api_surfaces//module-libapi/current:liblog. This ensures that the
generated BUILD files are compatible with Multi-tree.

Update the unit tests for this change.

Test: TH
Change-Id: Ibcc36dcfbee7b1973b341485f015e67987564dcc
2023-03-17 16:54:53 +00:00
Treehugger Robot
9433998d9a Merge "Fix the make name of rust snapshots" 2023-03-17 00:13:50 +00:00
Cole Faust
502da3987a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib971981559f3b642ce6be8890679e994e1b44be0
2023-03-16 11:13:23 -07:00
Sam Delmerico
c02e7d4017 Merge "remove stub dependency on source_library" 2023-03-16 17:43:11 +00:00
Spandan Das
046bb4b08a Merge "NDK ABI diffs requires implementation" 2023-03-16 17:02:04 +00:00
Treehugger Robot
feeee3ad26 Merge "make tidy attribute tri-state" 2023-03-16 15:42:21 +00:00
Sam Delmerico
5f90649036 remove stub dependency on source_library
Since the source_library attribute of _cc_stub_library_shared was a
label attribute, the source library was added as a dependency of the
stub which doesn't always make sense. E.g. it caused validation actions
for the source library to run even when we weren't building the source
library.

This change converts the label attriubte to a string attribute so that
we don't add the dependency.

Bug: 263390551
Change-Id: I19c62d1e14847dff68ab37156452addaa119eaf9
2023-03-16 10:01:22 -04:00
Justin Yun
24b246a7a8 Fix the make name of rust snapshots
Rust snapshot must have proper suffix for androidmk to avoid conflict
with the existing modules.

Bug: 230780263
Bug: 235895567
Test: m nothing
Change-Id: I35794196553621cd722c067d7965b2a61aa351bd
2023-03-16 11:05:41 +09:00
Sam Delmerico
63f0c93b09 make tidy attribute tri-state
Bazel boolean attributes can only support true or false states, but the
clang-tidy logic changes for modules which don't set a specific value.
Therefore, the tidy attribute should really be a tri-state of "true",
"false", or "" (unset).

Test: b test //build/bazel/rules/...
Bug: 268681923
Change-Id: I85fbaa612d175f475757db806cea6c018901fe3e
2023-03-15 10:10:43 -04:00
Treehugger Robot
79727bd236 Merge "Enable Wunqualified-std-cast-call globally" 2023-03-15 01:41:58 +00:00
Florian Mayer
b0c9dd777e Re-enable stack frame size errors
Bug: 229654778
Change-Id: Ib7d0ef98577adbd69b98cac450d3727ab1fdec81
2023-03-14 23:46:15 +00:00
Florian Mayer
1866bbe0d2 Increase BB to explore for reachability analysis
We pass mcpu=cortex-a55 for our build, which increases BB to the point
where the LLVM default of 32 is not enough.

I ran a fullmte build and did not see any slowdown.

Bug: 229654778
Change-Id: Ifbd1e5427101b2f2f39c067ba3ea4d5cb4a3ba0d
2023-03-14 23:45:39 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
b157846a68 Merge "Revert "Revert "Produce _alwayslink sibling targets through bp2b..."" 2023-03-14 23:01:47 +00:00
Treehugger Robot
2f58ad52e5 Merge "Allow "-mllvm foo" cflags" 2023-03-14 22:01:58 +00:00
zijunzhao
96ec99a736 Enable Wunqualified-std-cast-call globally
Bug: b/239662094
Test: make checkbuild
Change-Id: Icd012c12ce13e04efa269c6898823c1178a02b74
2023-03-14 21:27:48 +00:00
Spandan Das
8b08aea32e NDK ABI diffs requires implementation
ABI diffs reqiures implementation and cannot be generated from the
imoprted <lib>.apiimport soong module

Test: go test ./cc
Change-Id: Ie1da877a5a7d8b984112b64ca7d2c3d4c8d99cb4
2023-03-14 21:07:58 +00:00
Treehugger Robot
f214f12014 Merge "Respect Clang version override env vars." 2023-03-14 20:25:58 +00:00
Yi Kong
6a0f506f3a Allow "-mllvm foo" cflags
LLVM backend flags are a pair of flags beginning with "-mllvm". Teach
Soong to allow these flag pairs.

Test: presubmit
Change-Id: Ib2b9cb8ce8704338e14dbd1f1a656e10b86c0ee3
2023-03-12 16:31:10 +09:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
c353abdd53 Revert "Revert "Produce _alwayslink sibling targets through bp2b..."
Revert submission 2473787-revert-2467901-b/267214124-TLTTMLWFDS

Reason for revert: Fixed compilation errors

Reverted changes: /q/submissionid:2473787-revert-2467901-b/267214124-TLTTMLWFDS

Test: TOLIST
Bug: 271943047
Bug: 267214124

Change-Id: Ib08440377f6645cf26de4bda748d82c4dcd0b43a
2023-03-10 22:14:29 +00:00
Iván Budnik
ff8c95b610 Merge "Revert "Export non-apex variants of modules to make"" 2023-03-10 16:30:32 +00:00
Iván Budnik
295da16b95 Revert "Export non-apex variants of modules to make"
Revert submission 2462194-androidmk_for_apex_dependencies

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=full-eng&lkgb=9723453&lkbb=9724944&fkbb=9723508, bug b/272663333.

Reverted changes: /q/submissionid:2462194-androidmk_for_apex_dependencies

Bug: 272663333
Change-Id: I847fa910a8d54de19954f56fe92a80a9bcd0ee18
2023-03-10 16:11:26 +00:00
Cole Faust
f42c21d5f8 Merge "Export non-apex variants of modules to make" 2023-03-10 06:36:03 +00:00
Cole Faust
ad222f271a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib094feb2c437ad50d8319c58caa997759e7ce32f
2023-03-09 11:20:10 -08:00
Spandan Das
d14a70d7ed Merge changes Ib004c2c3,I6b63d9d0
* changes:
  Create aliases for stubs in build/bazel/api_surfaces
  Add a method in bp2build to create aliases in another directory
2023-03-09 18:14:13 +00:00
Zijun Zhao
add695f784 Merge "Revert "Revert "Enable -Wformat-insufficient-args globally""" 2023-03-09 07:57:15 +00:00
Peter Collingbourne
ebc290c758 Respect Clang version override env vars.
Bazel fails to respect the environment variables $LLVM_PREBUILTS_VERSION
and $LLVM_RELEASE_VERSION, which are commonly used by LLVM developers
to build using a custom compiler. Fix it.

Bug: 272408039
Change-Id: I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
2023-03-08 22:28:20 -08:00
Zijun Zhao
d156908820 Revert "Revert "Enable -Wformat-insufficient-args globally""
This reverts commit fa6b6843a7.

Reason for revert: Bug fix: https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/whitechapel/audio/+/21912759

Change-Id: I1c95f8d813171b500fa48c809bcffb0af7179f9a
2023-03-08 23:48:45 +00:00
Spandan Das
9e93d3d6e1 Create aliases for stubs in build/bazel/api_surfaces
- Create the alias under the module-libapi directory. This is the
  api_surface that cc_stubs_suite maps to.
- Create the alias only for "current" (atleast for now)
- Create one alias for the stub shared lib, and another for its headers

Test: b build @api_surfaces//... (with aosp/2475091)
Change-Id: Ib004c2c34256f971e74d75317fa5fbbe7273720e
2023-03-08 21:40:41 +00:00
Cole Faust
912bc8862e Use product variables from the overridden apex
override_apex's bp2build converter had a bug where it was looking at
the product variables for the override_apex module itself instead of
for the base module it is overriding.

Fixes: 271424349
Test: go test
Change-Id: If1e2653d3751fa908faf0ab97dfa2e943ebe98ec
2023-03-08 12:29:50 -08:00
Ian Kasprzak
fa6b6843a7 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit bb55424e55.

Reason for revert: b/272272172 - Breaking multiple builds on git_tm-qpr-dev-plus-aosp

Testing: https://android-build.googleplex.com/builds/abtd/run/L83100000959000587


Change-Id: I854e24735689b5a3b8373d3bc947d184338eedde
2023-03-08 16:49:33 +00:00
zijunzhao
bb55424e55 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: make checkbuild
Change-Id: Ie60d626345b9a448c3d0939faba9b6250ab34f94
2023-03-08 05:18:10 +00:00
Yu Liu
6fb6b2440a Merge "Remove the NO_EXPORTING handling of libprofile-clang-extras." 2023-03-08 01:57:47 +00:00
Evgenii Stepanov
dd2e32d859 Merge "Introduce armv9-a arch variant." 2023-03-07 22:58:11 +00:00
Evgenii Stepanov
80d74920fd Introduce armv9-a arch variant.
Armv9 with mandatory PAC and BTI extensions.
Stack protector is disabled as it is irrelevant with PAC.

Bug: 263283855
Test: NFC
Change-Id: I2f298f21dade12824597e0a6920772a2bfc63afb
2023-03-07 11:18:52 -08:00
Treehugger Robot
88e949945d Merge "Revert "Produce _alwayslink sibling targets through bp2build"" 2023-03-07 07:33:16 +00:00
Wilson Sung
68e126ee62 Revert "Produce _alwayslink sibling targets through bp2build"
Revert submission 2467901-b/267214124

Reason for revert: compile error

Reverted changes: /q/submissionid:2467901-b/267214124

Change-Id: I2235fd1457fda60b4613d5512f7fb20b7044a2db
Fix: 271943047
2023-03-07 04:16:53 +00:00
Wei Li
598f92d704 Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation.
Bug: 266726655
Test: CI

Change-Id: If5b1a77930a591b6061ca2749c9c5ad29b4491fb
2023-03-06 22:51:03 +00:00
Yu Liu
9cc34a7142 Remove the NO_EXPORTING handling of libprofile-clang-extras.
This is no longer necessary after we reduce the exported static libs in
roboleaf.

Bug: None
Test: b build adbd with coverage enabled.
Change-Id: Ia049138c4cdd536670371b4fc9a54fca40d16d20
2023-03-06 11:13:03 -08:00
Treehugger Robot
80ebd72995 Merge "soong: Add Cortex-A32 definitions" 2023-03-06 17:26:20 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
0eee856e69 Merge "Produce _alwayslink sibling targets through bp2build" 2023-03-06 14:43:28 +00:00
Kiyoung Kim
8972e4d6bb Merge "Implement API surface import with APEX stub" 2023-03-06 00:40:13 +00:00
Jesus Sanchez-Palencia
de7c7847e7 soong: Add Cortex-A32 definitions
Add definitions for the Cortex-A32 CPU. This is an aarch32 only ARMv8-A
core. See more here https://developer.arm.com/Processors/Cortex-A32 .

Test: added new minidroid target using this CPU variant and built
Change-Id: Id2351a43b9c6cb9785ef469b8c13fadd8b6324b8
Signed-off-by: Mark Slevinsky <markslevinsky@google.com>
Signed-off-by: Jesus Sanchez-Palencia <jesussanp@google.com>
2023-03-03 14:14:03 -08:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
011b7cf063 Produce _alwayslink sibling targets through bp2build
Add Alwayslink to bazelPrebuiltLibraryStaticAttributes
Also adjust the corresponding tests to espect these new targets.

Test: m libc
Test: b build --config=android //prebuilts/clang/host/linux-x86:libunwind-exported_alwayslink
Test: bp2build.sh
Bug: 267214124
Change-Id: I4d996aef55321f1827947f00b0eaa52d0a14413e
2023-03-03 20:12:20 +00:00
Trevor Radcliffe
56b1a2b575 LTO Bp2build
Bug: 261733821
Test: Unit Tests
Change-Id: I8c3721d35c464e296012145b2e95a7f0866aac37
2023-03-02 17:45:01 +00:00
Yi Kong
cec8b2c0b7 Merge "Revert "Update clang version to clang-r487747"" 2023-03-02 09:25:42 +00:00
Treehugger Robot
8c41eca698 Merge "Remove OWNERS access for non-build team people to core build system" 2023-03-01 19:45:38 +00:00
Helen Qin
9ede280375 Revert "Update clang version to clang-r487747"
Revert submission 2446165-update-clang-r487747

Reason for revert: DroidMonitor-triggered revert due to breakage bug b/271252582 and b/271243811

Reverted changes: /q/submissionid:2446165-update-clang-r487747

Bug: 271252582
Bug: 271243811
Change-Id: I3b5c44982d268b5c6c3db39e7af4d7aa7c6dfbf7
2023-03-01 19:31:36 +00:00