Commit graph

5162 commits

Author SHA1 Message Date
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
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
58f85e328b Merge "Allowlist missing dependency" 2023-03-10 13:58:43 +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
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
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
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
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
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
edec71adae Merge "Migrate overlapping config var defs in all bp file" 2023-03-06 21:39:52 +00:00
Treehugger Robot
80ebd72995 Merge "soong: Add Cortex-A32 definitions" 2023-03-06 17:26:20 +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
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
7720f5704c Merge "Add a persistent bazel server between builds" 2023-03-02 14:22:34 +00:00
Yi Kong
cec8b2c0b7 Merge "Revert "Update clang version to clang-r487747"" 2023-03-02 09:25:42 +00:00
Chris Parsons
9402ca881c Add a persistent bazel server between builds
This feature is toggled on with USE_PERSISTENT_BAZEL, which is off by
default. Those that opt-in will have a bazel server running between
builds (with a 3hr default TTL) which will greatly improve analysis on
subsequent builds. (As Bazel maintains a cache of analysis results).

Bug: 266983462
Test: Manual `m nothing` runs (timing with and without the feature)
Test: New integration test
Test: Presubmits
Change-Id: I3af4948baa0c490e9b87c48ffdbe9f67732586c7
2023-03-01 23:30:19 -05:00
Cole Faust
ba3a44dd1c Merge "Make SortedStringKeys call SortedKeys" 2023-03-02 03:08:28 +00:00
Spandan Das
364c90773e Merge "Support two active sdks in EffectiveVersionString" 2023-03-02 00:52:12 +00:00
Cole Faust
195c7819fb Make SortedStringKeys call SortedKeys
I realized this could work if I make it generic.

Bug: 193460475
Test: m nothing
Change-Id: I2071b4cdbccb642ebdbb1342f7d91e581aab9f0f
2023-03-01 14:21:30 -08:00
Spandan Das
ffb31afdac Support two active sdks in EffectiveVersionString
Currently it would return the default one even if the requested one is
an active sdk.

Bug: 270609292
Test: go test ./java
Test: built `rkpdapp` locally in internal and verified that its
targetSdkVersion is U and V
Test: TH

Change-Id: Idb03ff4786ff87fb7911bf31205941618a662404
2023-03-01 20:11:21 +00:00
Zi Wang
75a38e70df Allowlist merged_txts dependencies and combined_apis type
Test: m and TH

Bug: 267600251
Change-Id: Ib9bef77ce3f72880125b4a323e6b3631179fd877
2023-03-01 12:04:22 -08: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
Sorin Basca
b0dc477ef7 Merge "Reland^2 "Target Java 17"" 2023-03-01 06:20:20 +00:00
Yi Kong
29ff4182f5 Merge "Update clang version to clang-r487747" 2023-03-01 05:02:15 +00:00
Cole Faust
18994c73f1 Replace SortedStringKeys with SortedKeys
Now that we have generics.

Bug: 193460475
Test: presubmits
Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
2023-02-28 16:51:32 -08:00
Alix Espino
0897df1466 Merge "Revert^2 "refactor of api_levels map for soong injection"" 2023-02-27 14:10:44 +00:00
Jiakai Zhang
8fe3a415b5 Refactor dexpreopt for boot jars to allow more complex dependencies.
After this change, the dependency hierachy can be arbitrarily deep. For
example, you can have one boot image that extends another boot image
that extends yet another boot image.

Bug: 269230245
Test: m
Change-Id: I096d0b57bda36b982ecc97378647f9c59071a3bf
2023-02-24 17:13:54 +00:00
Alix Espino
4fd7e74140 Revert^2 "refactor of api_levels map for soong injection"
a865f4e905

Change-Id: Ifea020ac83725df7131773ca587c56931f5cdf03
2023-02-24 14:46:43 +00:00
Matthias Männich
199584223a Merge "Revert "refactor of api_levels map for soong injection"" 2023-02-24 09:48:05 +00:00
Treehugger Robot
50ffead8fe Merge "Add information about what module produced a certain androidmk entry" 2023-02-24 04:39:39 +00:00
Cole Faust
39aabe94b9 Add information about what module produced a certain androidmk entry
For easier debugging.

Bug: 254205429
Test: Presubmits
Change-Id: I54fc53dd3b4f32eb3e4458386aa6caa5b76dbb5b
2023-02-23 16:57:43 -08:00
Yi Kong
836690b593 Update clang version to clang-r487747
Test: presubmit
Bug: 264965700
Change-Id: I2db879f4dcc77b606c788b3e3890ed2a3faa6594
2023-02-23 20:49:59 +00:00
Alix Espino
8393a0fcdc Merge "temporary unblock for builds using sdkSystem" 2023-02-23 20:47:37 +00:00
Matthias Männich
a865f4e905 Revert "refactor of api_levels map for soong injection"
Revert submission 2441746-api_levels_refactor

Reason for revert: broke Android kernel build tools build: https://ci.android.com/builds/branches/aosp_kernel-build-tools/grid?

Reverted changes: /q/submissionid:2441746-api_levels_refactor

Change-Id: I35206879b93ec95ae325025cb764c6c34880dccf
2023-02-23 17:10:27 +00:00