Commit graph

66885 commits

Author SHA1 Message Date
Spandan Das
3d6ac190f2 Allowlist ndk STL dependencies
Bug: 298088835
Test: TH
Change-Id: I43942ad17645c99de82a966d674ef80100eaffd0
2023-09-14 17:34:30 +00:00
Spandan Das
c77ca9af3a Merge changes Ib58cc7f6,I780e2564 into main
* changes:
  Create a bp2build converter for ndk_prebuilt_*_stl
  Make ndk_prebuilt_*_stl's libDir relative to module
2023-09-14 17:22:14 +00:00
Aditya Kumar
928c0c436d Merge "Revert "riscv64: enable V."" into main 2023-09-14 16:53:59 +00:00
Aleksei Vetrov
7ab127f7c7 Merge "NDK library: collect NDK headers for ABI monitoring" into main 2023-09-14 12:05:46 +00:00
Jeremy DeHaan
2583523144 Revert "riscv64: enable V."
This reverts commit aa204ec49c.

Reason for revert: b/300158981

Change-Id: I4e969c7fccade0f8e1b29cb6267c27355ddca866
2023-09-14 00:46:21 +00:00
James Farrell
732b37f7bf rustc-1.72.0 Build 10803849
Bug: https://issuetracker.google.com/issues/295883071
Test: m rust
Change-Id: I5bd81a4ceecf21aa2984c07186b2713159501273
2023-09-13 23:34:18 +00:00
Cole Faust
3835509f95 Merge "Error out if skip_preprocessed_apk_checks is set when it's not necessary" into main 2023-09-13 22:38:33 +00:00
Treehugger Robot
ece322f640 Merge "Allowlist more targets for framework" into main 2023-09-13 21:01:08 +00:00
Treehugger Robot
eb67c30dae Merge "Increment symlink_forest_version" into main 2023-09-13 18:24:05 +00:00
Spandan Das
e12d252e22 Create a bp2build converter for ndk_prebuilt_*_stl
This module type will be converted to a cc_prebuilt_* bazel target. It
will provide
1. a prebuilt (.a/.so) file
2. headers (as -isystem)

Test: added a bp2build unit test
Bug: 298088835
Change-Id: Ib58cc7f6fde8f4ca34516f6f18a4c048a02a049a
2023-09-13 18:08:55 +00:00
Spandan Das
6e332d2266 Make ndk_prebuilt_*_stl's libDir relative to module
Currently, we have ~4 of these modules which are all defined in
prebuilts/ndk. However, using ctx.ModuleDir() instead has the following
advantages
- makes bp2build simpler since we do not need to relativize this path
- prevents soong modules from reaching into another directory (as the
  test setups were doing).

Test: m nothing
Change-Id: I780e2564cb37ebf4b800f0cd184789f3fc6f2fc8
2023-09-13 18:05:13 +00:00
Zijun Zhao
748f8fb624 Merge "Handle Clang's change of defaults from -fcommon to -fno-common" into main 2023-09-13 17:34:47 +00:00
Cole Faust
b46969dd3d Merge "Generate android_certificate_directory" into main 2023-09-13 17:08:27 +00:00
Jihoon Kang
ef1fc04e1a Merge "Utilize -quiet flag in java_api_library" into main 2023-09-13 15:57:11 +00:00
Cole Faust
076aa2aeeb Increment symlink_forest_version
We've had some incrementality issues with the symlink forest since
aosp/2673616, clear old symlink forests to get rid of the bad symlinks.

Bug: 300129912
Test: Presubmit
Change-Id: Ic23c980b68ebcc8b8788d56e53435f0a89d82b28
2023-09-13 08:56:54 -07:00
Aleksei Vetrov
262ed1a347 NDK library: collect NDK headers for ABI monitoring
Collect all NDK exported headers paths into a file that is used to
detect public types that should be ABI monitored.

Assume that we have the following code in exported header:

typedef struct Context Context;
typedef struct Output {
    ...
} Output;
void DoSomething(Context* ctx, Output* output);

If none of public headers exported to end-users contain definition of
"struct Context", then "struct Context" layout and members shouldn't be
monitored. However we use DWARF information from a real library, which
may have access to the definition of "string Context" from
implementation headers, and it will leak to ABI.

STG tool doesn't access source and header files, only DWARF information
from compiled library. And the DWARF contains file name where a type is
defined. So we need a rule to build a list of paths to public headers,
so STG can distinguish private types from public and do not monitor
private types that are not accessible to library users.

Bug: 156513478
Test: development/tools/ndk/update_ndk_abi.sh with enabled canDumpAbi
Change-Id: I9fa41e73450a41379638debb3dc56f421e0fb870
Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
2023-09-13 15:39:58 +00:00
Liz Kammer
b70eae04ce Allowlist more targets for framework
Test: bp2build.sh
Change-Id: I4bd080dd795f40d9095157fe4ba4ec7f0e251757
2023-09-13 11:28:02 -04:00
Paul Duffin
93961bfbe5 Merge "Replace --api-overloaded-method--order with --format-defaults" into main 2023-09-13 11:57:03 +00:00
zijunzhao
5bcebba331 Handle Clang's change of defaults from -fcommon to -fno-common
Remove fcommon and make fno-common by default.

Bug: b/151457797
Test: make checkbuild
Change-Id: Ieb4c1e1bfff05fd0db894e8eab263fb31b376da9
2023-09-13 05:09:11 +00:00
Treehugger Robot
132fd39897 Merge "Add -quiet option in soong_zip" into main 2023-09-13 02:29:02 +00:00
Treehugger Robot
83c0ea6e26 Merge "Use ndk_system STL header library" into main 2023-09-13 00:34:15 +00:00
Zi Wang
c90e1ec784 Merge "Bp2build: handle the case where java_library has only proto srcs" into main 2023-09-13 00:30:39 +00:00
Jihoon Kang
d02a43668a Utilize -quiet flag in java_api_library
java_api_library finds and zips class files based on pattern matching,
leading to multiple missing files warnings being printed to console
during from-text stub build. This change passes the `-quiet` flag to
soong_zip to prevent such warnings from being printed.

Test: m --build-from-text-stub and inspect console output
Bug: 300166930
Change-Id: I23d49b5e3a29d2127f5e917169620e18a98bc06b
2023-09-13 00:11:01 +00:00
Jihoon Kang
3730d7e653 Add -quiet option in soong_zip
The quiet option prevents warnings from being printed to the console.

Test: m soong_zip
Bug: 300166930
Change-Id: I4c2c5f16c45c2874a2a2cbb1e3f397124043e472
2023-09-13 00:10:47 +00:00
Paul Duffin
504d356579 Replace --api-overloaded-method--order with --format-defaults
Bug: 300052204
Test: m checkapi
Change-Id: I8952a828437872ceebf7f9da4dc297173ed2a90b
2023-09-13 00:00:58 +01:00
Cole Faust
6054cdf3b1 Generate android_certificate_directory
Previously, partners were required to add an
android_certificate_directory filegroup in their certificate
directories, and allowlist that BUILD file. Now, we generate the
filegroup automatically.

We're using a different name, generated_android_certificate_directory,
to avoid conflicts with already-checked-in filegroups.

Bug: 285777389
Test: b test //build/bazel/rules/apex/...
Change-Id: Ib1bde487acd79d58368faf0aad02ded0bcdaceb4
2023-09-12 15:23:36 -07:00
Ivan Lozano
d753c2e53c Merge "rust: Emit frame pointers on 64-bit device targets." into main 2023-09-12 20:53:58 +00:00
Sebastian Pickl
3d2b08fe0d Merge "Revert "Change symlink_forest to use relative symlinks."" into main 2023-09-12 18:53:47 +00:00
Sebastian Pickl
90355f79bf Revert "Change symlink_forest to use relative symlinks."
Revert submission 2673616-relativesymlinks-fix

Reason for revert: this breaks tests verified with go/abtd https://android-build.googleplex.com/builds/abtd/run/L36000000963001181

Bug: 300122962

Reverted changes: /q/submissionid:2673616-relativesymlinks-fix

Change-Id: I5a97c4fbe4df5727c0604a07137093d0f00c7776
2023-09-12 18:51:39 +00:00
Elliott Hughes
5c12fb922d Merge "riscv64: enable V." into main 2023-09-12 17:57:50 +00:00
Zi Wang
774c6eaf10 Bp2build: handle the case where java_library has only proto srcs
java_library doesn't accept deps when there are no srcs because
no compilation happens, but it accepts exports.

The deps from the module are not necessary for compiling the protos,
in which case they are unnecessary as deps on the java_library as well
since they are not be propagated to any dependencies.

So we can put the deps to exports and drop deps here.

Test: CI and added unit test

Bug: 285952385
Change-Id: Ie54a4ac0db592fb96fede64f0e67df309dca9c1d
2023-09-12 10:41:42 -07:00
Ivan Lozano
085efff213 rust: Emit frame pointers on 64-bit device targets.
Frame pointers can aid in unwinding and reading stack traces.

Bug: 298267402
Test: m rust
Change-Id: I48bf5ef9ffa9912d6af5fc2b7297f250d15718ea
2023-09-12 13:28:37 -04:00
Shikha Panwar
3942df00ec Merge "Soong support for rollback index." into main 2023-09-12 17:15:59 +00:00
Mark Dacek
4eabebec69 Merge "Change symlink_forest to use relative symlinks." into main 2023-09-12 15:47:42 +00:00
Liz Kammer
7ebb91a449 Merge "Sort do not convert for unconverted deps" into main 2023-09-12 14:39:28 +00:00
Romain Jobredeaux
2195f24ec4 Merge "Re-order android_app bp2build converter logic." into main 2023-09-12 13:56:00 +00:00
Liz Kammer
f673c2ea9f Sort do not convert for unconverted deps
Test: n/a
Change-Id: Id86986f17d23fe47e47b303a1828478b8e887513
2023-09-12 09:08:17 -04:00
Shikha Panwar
e56c9017c1 Soong support for rollback index.
avbtool already supports --rollback_index. Allow soong support as well
to enable images to include it in their targets.

Test: Builds
Test: avbtool info_image on a target built using rule `avb_add_hash_footer`
Bug: 296830692
Change-Id: Id32f30d026b01172c5dadc0698938acb2c2c8e35
2023-09-12 11:42:29 +00:00
MarkDacek
b98b3a429f Change symlink_forest to use relative symlinks.
Also add script to remove the Bazel output base.
This will assist with supporting movable checkouts alongside
mixed builds.

Bug: 259191764
Test: m && (move topic and prepare_moved_top.sh) && m
Test: m && prepare_moved_top.sh && m
Test: build/soong/tests/relative_symlinks_test.sh

Change-Id: I0f53da8d99f752fad496cf3ac61b01f001b7296d
2023-09-12 04:02:23 +00:00
Treehugger Robot
0e3da8162c Merge "Allowlist packages instead of modules" into main 2023-09-12 01:53:49 +00:00
Treehugger Robot
7db882793b Merge changes from topic "aidl_interface_hdrs" into main
* changes:
  export SimpleModuleDoNotConvertBp2build for AIDL
  export SetStubsForDynamicDeps for use in AIDL
2023-09-12 01:52:03 +00:00
Jooyung Han
fc7ba26f1c Merge changes from topics "fix-apex-linkerconfig", "fix-apex-vintf" into main
* changes:
  apex: validate vintf fragments in vendor APEX
  apex: invoke `conv_linker_config validate` as validation
2023-09-12 01:39:07 +00:00
Zi Wang
37aa1729b0 Merge "Allowlist libprotobuf-java-full" into main 2023-09-11 22:50:40 +00:00
Treehugger Robot
e79010c7ca Merge "Revert "rustc-1.72.0 Build 10752340"" into main 2023-09-11 22:29:04 +00:00
Vinh Tran
9226051310 Allowlist packages instead of modules
bp2build doesn't support allowlisting fully qualified module names. Hence, when modules such as libui and libbinder have duplicate names with corresponding fdo_profile modules, bp2build yields an error. See b/299663210 for more context.

Test: CI
Bug: 299663210
Change-Id: Ic175f5aea38139d34c5df8b9d02e7d82d9b3fc10
2023-09-11 18:15:35 -04:00
Romain Jobredeaux
d2cc5037c2 Re-order android_app bp2build converter logic.
This change is a no-op but makes it easier to single out framework-res
for conversion in subsequent CL aosp/2720593.

Bug: 276928228
Test: CI
Change-Id: I7c7338add1857697912dec3c34b7c43e06d2d12d
2023-09-11 16:37:50 -04:00
James Farrell
5d4be57cac Revert "rustc-1.72.0 Build 10752340"
Revert submission 2736851-rust-1.72

Reason for revert: Breaks Mac builds

Change-Id: I94a30e61f9f717ad135fbef7ec7241730f583110
2023-09-11 20:01:49 +00:00
Treehugger Robot
d15dcb7158 Merge "rustc-1.72.0 Build 10752340" into main 2023-09-11 18:20:20 +00:00
Treehugger Robot
3d4e1eaa3f Merge "Remove link to internal doc in Soong AOSP README." into main 2023-09-11 17:41:21 +00:00
Cole Faust
7a05d1392a Merge "Allow actions to read BUILD_BROKEN_INCORRECT_PARTITION_IMAGES" into main 2023-09-11 17:25:18 +00:00