Commit Graph

5529 Commits

Author SHA1 Message Date
Anton Hansson
7a444cec60 Add filegroup_test.go to sources
I don't think it was running before.

Test: yes
Change-Id: Ia3bf53ddcc1ddefd7a236122256594ba764ee8e5
2023-03-13 15:24:17 +00:00
Treehugger Robot
6235f58040 Merge "Revert "Add protected_properties support in defaults modules"" am: cb301ccdca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2482517

Change-Id: Ib6cb459e7ace2e4d31e9c254ad2b674f98e1214a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 06:13:28 +00:00
Treehugger Robot
cb301ccdca Merge "Revert "Add protected_properties support in defaults modules"" 2023-03-13 05:34:58 +00:00
Liz Kammer
eeeb952b27 Revert "Add protected_properties support in defaults modules"
This reverts commit 799962789a.

Test: m nothing
Change-Id: Ia43c2ee216dc42ae5cf3e4d138aa9d0e05a9ee60
2023-03-10 18:53:59 -05:00
Iván Budnik
85b9f6e7b2 Merge "Revert "Export non-apex variants of modules to make"" am: ff8c95b610
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2481059

Change-Id: I9ac9ed805315c80175e038b6f7298a183d6874eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 16:47:30 +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
Liz Kammer
f92b583027 Merge "Allowlist missing dependency" am: 58f85e328b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2480298

Change-Id: I16aa00f734919507576ffe9940d92b3ecbd1bbbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 14:25:30 +00:00
Liz Kammer
58f85e328b Merge "Allowlist missing dependency" 2023-03-10 13:58:43 +00:00
Cole Faust
6167240026 Merge "Make using python 2 an error" am: 944053e52d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2212957

Change-Id: I5a475da6231b8e43aa188592d7977390ae916be2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:04:02 +00:00
Cole Faust
f183fc5413 Merge "Export non-apex variants of modules to make" am: f42c21d5f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2462194

Change-Id: I9e0170a7c44dd1cd966132948c23ecd16a7a45aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:03:35 +00:00
Cole Faust
944053e52d Merge "Make using python 2 an error" 2023-03-10 06:37:24 +00:00
Cole Faust
f42c21d5f8 Merge "Export non-apex variants of modules to make" 2023-03-10 06:36:03 +00:00
Spandan Das
80ec5d3fb6 Merge "Convert filegroups in api_bp2build" am: 3b965d4bb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2481335

Change-Id: Ia28da77f7582b02b3203b05fc878edeeea134c36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 03:03:37 +00:00
Spandan Das
bd52ea9ecf Convert filegroups in api_bp2build
api providing modules (droidstubs, cc_library etc.) can refer to the api
file via a separate filegroup module. Therefore these modules should be
generated in the api_bp2build workspace as well

Test: m api_bp2build && build/bazel/bin/bazel build
--config=api_bp2build --config=android //build/orchestrator/apis:*

Change-Id: I77371bd94a2794770b01b98aaf84b1bc42810841
2023-03-09 23:03:07 +00:00
Liz Kammer
ad1d8cb1d6 Allowlist missing dependency
Test: b build --config=android
//frameworks/av/media/audioaidlconversion/...
Fixes: 272576906
Change-Id: I8f60e6d84995db46be95a091bba45c1abdc97b47
2023-03-09 22:09:08 +00:00
Cole Faust
edc4c505f9 Make using python 2 an error
Except if BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES is set, and except for
some core py2 modules that can't be removed until python2 is fully gone.

Bug: 203436762
Test: m nothing
Change-Id: I62ccb6f5687eab1e79c372ffc234a90ca5b566ac
2023-03-09 11:56:04 -08: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
dc3f27f7b6 Merge changes Ib004c2c3,I6b63d9d0 am: d14a70d7ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2475621

Change-Id: I70c01922b3d6d7d0f4f7c8ceb547acc0f6dd9b68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 18:54:44 +00: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
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
Cole Faust
21b35cc1f6 Merge "Use product variables from the overridden apex" am: ae3e4cc2fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2477957

Change-Id: I30240a9e42aa4a1ce671af59b2ea05b86c76bee5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 00:46:44 +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
Spandan Das
abedff0ca7 Add a method in bp2build to create aliases in another directory
The expected use case for this is to create aliases for stub libraries
in the @api_surfaces repository in build/bazel/api_surfaces.

This restricts the scope to just aliases. If we have a use case for
generating actual Bazel targets in another directory, a workaround could
be to generate the targets in the current directory (via
CreateBazelTargetModule) and aliases to it in the other directory

Test: go test ./bp2build
Change-Id: I6b63d9d018618d447fc7c260a2a94aaa00e57a4d
2023-03-08 21:40:26 +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
Zi Wang
64bc8c0ad3 Merge "Incorporate Bazel-built fingerprint file into mixed builds" am: f20a52657d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2473148

Change-Id: Id05158e2f96bc779ee2d036b7673326bd4653bb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 04:35:18 +00:00
Evgenii Stepanov
f60073a19a Merge "Introduce armv9-a arch variant." am: dd2e32d859
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2431175

Change-Id: I226e54a1b0a2d1269532065837d47ddde448c677
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 23:34:08 +00:00
Zi Wang
b31a833c8e Incorporate Bazel-built fingerprint file into mixed builds
Test: m and TH

Bug: 268337233
Merged-In: Ib2f7fa35b2d94972869e8e85be47b288ff875408
Change-Id: Ia2670ebc0b1b4b720e79281fe81235555d498789
2023-03-07 15:33:05 -08: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
Wei Li
261721421f Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation. am: 598f92d704
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2374715

Change-Id: I707631cba7423523563c327d73c4b27b9070533a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 03:25:06 +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
Liz Kammer
ebe523c177 Merge "Migrate overlapping config var defs in all bp file" am: edec71adae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2472144

Change-Id: I8006e3112b7b65977d7e2582352fa2bd06221bf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 22:15:35 +00:00
Liz Kammer
edec71adae Merge "Migrate overlapping config var defs in all bp file" 2023-03-06 21:39:52 +00:00
Treehugger Robot
5963f06818 Merge "soong: Add Cortex-A32 definitions" am: 80ebd72995
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2470067

Change-Id: Ibb2f773e79edbae3609a200f397f9ced31991aaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 18:00:09 +00:00
Treehugger Robot
80ebd72995 Merge "soong: Add Cortex-A32 definitions" 2023-03-06 17:26:20 +00:00
Zi Wang
1bc028dbc0 Merge "Allowlist merged_txts dependencies and combined_apis type" am: 1841e5d023
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2439360

Change-Id: Ia207e04c3a62e9675d4716af763d290caf9d9220
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 17:06:52 +00:00
Zi Wang
1841e5d023 Merge "Allowlist merged_txts dependencies and combined_apis type" 2023-03-06 16:28:45 +00:00
Liz Kammer
8103dc428e Migrate overlapping config var defs in all bp file
Unlike most module types, config variable handling is always namespaced
to the Android.bp file, which limits reuse of the variable definitions.
Additionally multiple of these module types can define a string variable
in the same config namespace, but specify different valid values for the
string.

Previously, we cached the first instance we see of variable + namespace;
however, this caused non-determinism in which defintion would be used
and not migrating all values. Instead, we now only cache within a single
Android.bp file where the variable definitions are re-used.

Test: go tests
Bug: 271481817
Change-Id: Ic327657c508e47a705bacd24712a1916e105c7cd
2023-03-06 09:15:36 -05: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
Alix Espino
301e587515 Merge "removing codegen_cli from Bp2buildKeepExistingBuildFile" am: f229654372
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2467464

Change-Id: I8609809320823cd047ef342906e582b1eadc0758
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 17:45:34 +00:00
Alix Espino
60a7c32bff Merge "Comments to keep Starlark/soong api logic in sync" am: 04a0ee54de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2467465

Change-Id: Ib10516badf099f482c1daa54d9da5e8d2266329b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 17:37:07 +00:00
Spandan Das
c16b7c11a7 Use default format in print statement am: c52e2c00e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2466347

Change-Id: Iaf63c3f1cc63857d270f8e01e845065dc2532f5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 16:56:56 +00:00
Alix Espino
f229654372 Merge "removing codegen_cli from Bp2buildKeepExistingBuildFile" 2023-03-03 16:39:22 +00:00
Alix Espino
04a0ee54de Merge "Comments to keep Starlark/soong api logic in sync" 2023-03-03 14:54:09 +00:00
Spandan Das
c52e2c00e6 Use default format in print statement
For some reason, %q complains when the test is run outside m

Test: go test ./android
Change-Id: I1a6571feb59f342c9645b998ea2f01ff0a581e90
2023-03-02 23:47:16 +00:00
Alix
fb7f7b99ff Comments to keep Starlark/soong api logic in sync
Test: none, added comments
Change-Id: I706c516a3601716a439bd775666a93b63c5c4f27
2023-03-02 19:36:51 +00:00
Alix
9d5627963b removing codegen_cli from Bp2buildKeepExistingBuildFile
can allowlist instead. bp2build now handles kotlin srcs

Change-Id: I0f96eb50cbb5bd2c6dc69f253b1a35cfd4edecf2
Test: built codegen_cli with bazel
Bug: b/245731902
2023-03-02 19:03:56 +00:00
Christopher Parsons
cf72dcb178 Merge "Add a persistent bazel server between builds" am: 7720f5704c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2454765

Change-Id: Id0dfab952bcb3a204deb552d221613135586f95a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 14:57:49 +00:00
Christopher Parsons
7720f5704c Merge "Add a persistent bazel server between builds" 2023-03-02 14:22:34 +00:00