Commit graph

64356 commits

Author SHA1 Message Date
MarkDacek
f47e142ffd Refactor MixedBuildsEnabled and add --ensure-allowlist-integrity.
Currently, there is little verification around allowlisted modules
actually being mixed-built. This flag would allow us to verify
that a module allowlisted is mixed-built for at least one variant.

Bug: 278910100
Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity
Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity
--bazel-force-enabled-modules=com.google.android.neuralnetworks (This
fails, as expected)
Test: build/soong/test/mixed_mode_test.sh

Change-Id: Icd5976f4f44f1a8caca1e5247d986642f7995f97
2023-04-25 20:55:07 +00:00
Jihoon Kang
b420705230 Merge "Utilize from text core platform api surface jar in build" 2023-04-25 17:48:25 +00:00
Sam Delmerico
cf88420414 Merge "add neuralnetworks to prod allowlist" 2023-04-25 17:43:10 +00:00
Treehugger Robot
d7b50181d9 Merge "Use copy of apex_available in AvailableToSameApexes" 2023-04-25 17:27:00 +00:00
Sam Delmerico
969e375d55 Merge "Use stubs for system_dynamic_deps" 2023-04-25 12:31:04 +00:00
Sam Delmerico
75dbca2eae Revert "Revert "mixed builds correctly reference stubs libs""
This reverts commit 1db4348734.

Changes from original:
  - extracted function to add the current version to stub
    versions for bp2build.
  - added libc++ to mixed builds denylist

Reason for revert: re-uploading with fix in topic

Change-Id: Ifa0ed456bf8cb4a7f861d6826263adfedb4fdd9c
2023-04-25 00:25:20 +00:00
Spandan Das
4e1bfa06e9 Use copy of apex_available in AvailableToSameApexes
Modifying the list in-place causes some non-determinism.

Test: go test ./cc -run TestStubsForLibraryInMultipleApexes -count 1000
Bug: 275313114
Change-Id: Ia2519e146d97667ad5900cf68ab9935fcbaf08a4
2023-04-24 22:45:14 +00:00
Treehugger Robot
28cbb75a09 Merge "disable mixed builds for sanitized cc modules" 2023-04-24 20:12:34 +00:00
Trevor Radcliffe
aea506707f Merge "convert hidden visibility flag to feature" 2023-04-24 19:31:36 +00:00
Jeffrey Vander Stoep
b611cf4240 Merge "Add option to use protobuf3" 2023-04-24 14:56:58 +00:00
Sam Delmerico
ef69d47d03 disable mixed builds for sanitized cc modules
The Bazel rules don't currently support any sanitizers other than ubsan,
so we should disable mixed builds for modules which are sanitized.

Test: go test
Bug: 278772861
Bug: 253433725
Change-Id: Ia01fb8cb59154bdfb21a111b04af0350e1876b0b
2023-04-24 10:36:12 -04:00
Jeff Vander Stoep
c1490ec25e Add option to use protobuf3
Users of the rust_protobuf module can use the 'use_protobuf3'
option to select version 3 of the protobuf crate instead of the
current default of version 2. This unblocks teams that would like
to use protobuf 3 immediately and provides a mechanism for us to
incrementally migrate users of protobuf 2 to protobuf 3.

Test: Adds tests that are executed during every build.
Bug: 270895633
Change-Id: Ib6a18b77cfa7dc3cc604cea05269004b3712bbb6
2023-04-24 11:33:50 +02:00
Treehugger Robot
a4c93e3bfc Merge "Add TestApexes to ApexInfo" 2023-04-24 07:03:34 +00:00
Treehugger Robot
e7773041d6 Merge "Remove module with a cc_test_library static dep" 2023-04-24 04:08:52 +00:00
Spandan Das
ac693b2f81 Use stubs for system_dynamic_deps
system libraries (libc, libm, libdl) belong to the runtime apex api
domain. platform and other apexes should link against stubs and not impl
of these libraries. Update bp2build so that both apex/non_apex picks
stubs. These axes need to be more granular in the future, but for now
this works because
- non_apex axis (platform) is a separate api domain than the runtime apex
- com.android.runtime which matches apex axis has not been allowlisted
  yet.

Test: TH
Change-Id: I43f429a90875f30d176db17b144dd51674ec8adf
2023-04-24 01:51:33 +00:00
Mark Dacek
a23feefdc4 Merge "Squelch output for a failure case in mixed_mode_test" 2023-04-22 06:42:08 +00:00
Inseob Kim
d0d420d3b1 Merge "Remove deps from Soong intermediate to symbols" 2023-04-22 03:51:10 +00:00
Yabin Cui
a5b3752c2e Merge "Enable -funique-internal-linkage-names when afdo=true" 2023-04-21 21:43:47 +00:00
Yabin Cui
01c4456ce2 Enable -funique-internal-linkage-names when afdo=true
We used to enable unique names only when a profile is available.
But A profile generated for a binary without unique names doesn't
work well when building a binary with unique names. To avoid a
chicken-and-egg problem, this CL enables the flag when afdo=true,
whether a profile exists or not.

Bug: 241523910
Test: build
Change-Id: I74d834510d81d2db76e34d0488c74a60e1fcecd5
2023-04-21 14:41:55 -07:00
Alix Espino
75ebf1ba27 Merge "add support for escaping for zip2zip" 2023-04-21 21:03:52 +00:00
MarkDacek
53506361da Squelch output for a failure case in mixed_mode_test
Currently, the expected output shows as the main text for
unrelated presubmit failures.
Bug: 278748024
Test: build/soong/tests/mixed_mode_test.sh

Change-Id: I553a82597c7c7791a822e330eb9b2663f35567a1
2023-04-21 17:55:42 +00:00
Treehugger Robot
fdef3506c7 Merge "Delete mixedBuildSupportedCcTest." 2023-04-21 15:16:18 +00:00
Inseob Kim
5bedfee448 Remove deps from Soong intermediate to symbols
These should be handled by Makefile dependency (LOCAL_REQUIRED_MODULES).

Bug: 278832320
Test: build and see symbol files
Change-Id: I80ad9d8e7e8384e2ae3537cc681bc1d1b327d04c
2023-04-21 11:30:35 +09:00
Treehugger Robot
03e6e00e60 Merge "Flag off abidw tasks." 2023-04-20 21:32:46 +00:00
Trevor Radcliffe
a8b441613a convert hidden visibility flag to feature
in bp2build. The context here is that `-fvisibility=default` should
only be added for CFI if `-fvisibility=hidden` is not already
specified. This will be achieved using toolchain features. Note
that Soong itself never adds `-fvisibility=hidden`. This is only
ever added in the `cflags` property of a bp file.

Bug: 261733820
Test: Unit tests
Change-Id: Ib821e8c30a9cd03d2929b4bd2e771bec7b33fa66
2023-04-20 20:52:41 +00:00
Liz Kammer
e5eb5786e2 Merge "Don't add apex_set deps in nondeterministic order" 2023-04-20 19:51:21 +00:00
Dan Albert
326ab2444b Flag off abidw tasks.
Bug: http://b/277624006
Test: treehugger
Change-Id: I706a4da2d95ac51ad9fc600b3e4e52967b502c2c
2023-04-20 17:38:29 +00:00
Spandan Das
0bf4ea53f5 Merge changes I4129c2a9,I9af06f81
* changes:
  Drop the default apex_available value from BUILD files
  Make //apex_available:platform the default.
2023-04-20 15:30:20 +00:00
Liz Kammer
2dc7244af9 Don't add apex_set deps in nondeterministic order
Test: unit tests
Change-Id: I97a9708cb6e5a4f3aef55697b6127f61e4d17720
2023-04-20 11:30:19 -04:00
Jingwen Chen
a485d0935c Delete mixedBuildSupportedCcTest.
We can just rely on the prod/staging allowlists which name the modules directly.

Test: presubmits
Test: m nothing; showcommands adbd_test | grep bazel-out
Fixes: 279004435
Change-Id: I666855d6bbe63c628256c3eebd7ae581c0cbdedb
2023-04-20 14:35:12 +00:00
Inseob Kim
0933fd59d7 Merge "Add min_sdk_version prop to snapshots" 2023-04-20 07:36:58 +00:00
Sam Delmerico
dc0a4021cd Merge "Revert "mixed builds correctly reference stubs libs"" 2023-04-19 19:57:49 +00:00
David Fu
1ea1bc3b6b Merge "Added assignee field to FuzzConfig." 2023-04-19 18:23:45 +00:00
Zi Wang
04af019ec0 Merge "Fix api fingerprinting with apex." 2023-04-19 16:49:38 +00:00
Elliott Hughes
0ee012c2c4 Merge "riscv64: stop reserving x18 for shadow call stack." 2023-04-19 14:38:37 +00:00
Usta (Tsering) Shrestha
1db4348734 Revert "mixed builds correctly reference stubs libs"
This reverts commit ca438e6b72.

Reason for revert: ci post-submit failures in aosp-master-bazel of targets mixed-droid-clean and mixed-droid-incremental:
FAILED: ninja: 'out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libc_intermediates/libc.so.toc', needed by 'out/target/product/generic_arm64/obj/EXECUTABLES/updater_intermediates/LINKED/updater', missing and no known rule to make it
12:21:27 ninja failed with: exit status 1

Change-Id: I081b499d23f2568cdf6227c4e3b0278164086b69
2023-04-19 14:02:52 +00:00
Zi Wang
a4f7dae7b9 Fix api fingerprinting with apex.
Test: b build adbd and tzdata and verify target sdk version is correct

Bug: 277921995
Change-Id: I05a98fcb628f2a1d83358fe79f19c58010f05430
2023-04-18 21:12:02 +00:00
Peter Collingbourne
67237c82ed Merge "Pass -Wl,--as-needed when linking Rust binaries." 2023-04-18 19:17:41 +00:00
David Fu
af4e33bcc8 Added assignee field to FuzzConfig.
Change-Id: Ia8cff7fa0980674ef6ed64922b6895b61c1e41a4
2023-04-18 10:43:24 -07:00
Usta (Tsering) Shrestha
cf76125627 Merge "Add aidl.deps prop to include aidl implicit deps explicitly in Android.bp" 2023-04-18 14:18:51 +00:00
Jihoon Kang
d1a038c183 Merge "Add additional java_api_library module to java testing" 2023-04-18 03:46:55 +00:00
Inseob Kim
5860f8227c Add min_sdk_version prop to snapshots
Bug: 277403349
Test: build vndk/vendor snapshot and build
Change-Id: I226032bb0f9356cdef6747daec6ceb06589d9cbb
2023-04-18 11:30:22 +09:00
Jihoon Kang
fb502593cd Add additional java_api_library module to java testing
Module lib surface is comprised of contributions from art, conscrypt,
and i18n api domains. On top of this, the module lib api surface generates an additional stub library containing the contributions of the non-updatable api domains. Adding this additional module to the testing module enables more thorough testing of module lib api scope java_api_library modules.

Test: m
Change-Id: Ia648651fb9e6cba2642de7e8d39047d888bf49ce
2023-04-17 21:28:47 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
fecec28c34 Merge "bp2build: migrate export_{,system_}include_dirs -> *includes for cc_prebuilt_library{,_static,_shared}" 2023-04-17 21:01:21 +00:00
Romain Jobredeaux
d7141be8ff Merge "Allowlist CaptivePortalLogin and required dependencies." 2023-04-17 20:33:00 +00:00
Spandan Das
e8173a83cb Add TestApexes to ApexInfo
If any of apexes in apex_available is an apex_test, then that name will
be propagated down from that apex to each apex variant. This metadata
will be used to enforce that stub libraries cannot have more than one
apex_available.

This logic is necessary so that bp2build can select the correct
stub/impl.

(To avoid replicating this complexity in Bazel, we should consider
dropping the test apexes in Bazel BUILD files, next CL)

Bug: 277651159
Test: go build ./apex
Change-Id: I63617c1dc2a2d5c9cd7758c416fec7b4db1f10a7
2023-04-17 19:26:07 +00:00
Spandan Das
2dc6dfcb16 Drop the default apex_available value from BUILD files
If apex_available is missing from Android.bp files, ApexAvailable
returns [//apex_available:platform], which is the default. To avoid
BUILD file verbosity, remove the build system default value from the
generated BUILD files.

Bug: 277651159
Test: go test ./bp2build

Change-Id: I4129c2a93ac28578f46ebeed49baa23ce727aa1f
2023-04-17 19:26:03 +00:00
Spandan Das
8e6386e0aa Make //apex_available:platform the default.
go/Android.bp mentions that ["//apex_available:platform"] is the
default, but currently it was []. This change does not create any
additional module variants.

(Noticed this for libz, I was expecting its apex_available to be
platform and not an empty list)

Test: TH
Change-Id: I9af06f813b1a1d7b716939874f469bd2e1ce4d14
2023-04-17 17:28:06 +00:00
Alix
c6a918aa11 add support for escaping for zip2zip
Change-Id: I6c2f39e24247752de065fd3116f670639322b943
Bug: 270896651
Test: zip2zip tests
2023-04-17 14:58:02 +00:00
Ramy Medhat
93c52efc15 Merge "Enable reclient cache directory." 2023-04-17 14:10:20 +00:00