Commit graph

64239 commits

Author SHA1 Message Date
Liz Kammer
75b36c165f Disable riscv in all Bazel mixed builds
Bug: 262192655
Test: CI
Change-Id: Ie46eb661f968396f40458d674897b554be8d47c3
2023-03-21 09:28:14 -04:00
Treehugger Robot
2f1e052266 Merge "Use installExecutable for cc binaries" 2023-03-21 05:39:54 +00:00
Spandan Das
9145508204 Prework for migrating min_sdk_version from (kind+level) to (level)
This relands aosp/2465355. The original CL was submitted as part of a
stack which broke tm and udc. Those branches contain soong modules with
min_sdk_version of type (kind+level)

Bug: 208456999
Test: go test ./sdk (top of CL stack)
Change-Id: I627f69b1fd71ab386e9026a2fc1566bad786bf1d
2023-03-21 04:36:23 +00:00
Spandan Das
b84dbb2f3e Always include host variants in the sdk snapshot
This relands aosp/2478277. The original CL was submitted as part of a
stack that broke tm and udc since those branches contains soong modules
that have min_sdk_version of type (kind+level).

Test: go test ./sdk
Bug: 208456999
Change-Id: Ie5d7f2597092a51c6e74e7b3cab2f81c02906d5e
2023-03-21 04:36:19 +00:00
Treehugger Robot
2204e16442 Merge "build-ndk-prebuilts.sh: disable bazel." 2023-03-21 04:12:34 +00:00
Spandan Das
cd05792d06 Merge changes from topic "revert-2457063-EKFSKANQWZ"
* changes:
  Revert "Create two sentinel api levels"
  Revert "Create EffectiveVersion* functions for ApiLevel"
  Revert "Prework for migrating min_sdk_version from (kind+level) ..."
  Revert "Always include host variants in the sdk snapshot"
  Revert "Update min_sdk_version from SdkSpec to ApiLevel"
2023-03-21 01:56:16 +00:00
Inseob Kim
c1fd399ccd Use installExecutable for cc binaries
Normally InstallFile is enough because linker grants +x permission to
its output. Just to guarantee +x permission even when the source file
doesn't have one.

Test: build
Change-Id: I01082df11d414804e1a73336fc637a6a2208021f
2023-03-21 01:42:59 +00:00
Spandan Das
ac96191f22 Revert "Create two sentinel api levels"
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Ide8e1b23d5a575c57be44ebd801846dc5caf2e83
2023-03-21 01:36:46 +00:00
Spandan Das
51dc6859ac Revert "Create EffectiveVersion* functions for ApiLevel"
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Ib0f6930ff292d25fee2640901b158ac4bb7b879b
2023-03-21 01:36:46 +00:00
Spandan Das
7f88a03f88 Revert "Prework for migrating min_sdk_version from (kind+level) ..."
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Ia17c962b9506c2bc9eaffdb34e99fc2082d42721
2023-03-21 01:36:46 +00:00
Spandan Das
1962415878 Revert "Always include host variants in the sdk snapshot"
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Ib47515a109fd92ea65343d1b7476a9128e9d3247
2023-03-21 01:36:46 +00:00
Spandan Das
b74d1e1d91 Revert "Update min_sdk_version from SdkSpec to ApiLevel"
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Id6349fc1318877044af713c914a0afd437d3d2d5
2023-03-21 01:36:47 +00:00
Jooyung Han
52cb409e93 Merge "Make filesystem aware of coverage" 2023-03-21 01:36:01 +00:00
Jooyung Han
0a687b888d Merge "Vendor apexes can be "updatable: true"" 2023-03-21 00:59:08 +00:00
Elliott Hughes
7d8f39e127 build-ndk-prebuilts.sh: disable bazel.
```
ERROR: /buildbot/src/android/master/out/soong/workspace/external/libcxx/BUILD.bazel:30:18: While resolving toolchains for target //external/libcxx:libc++: com.google.devtools.build.lib.packages.NoSuchTargetException: no such target '@soong_injection//product_config_platforms/products/ndk-eng:ndk-eng_android_riscv64': target 'ndk-eng_android_riscv64' not declared in package 'product_config_platforms/products/ndk-eng' defined by /buildbot/src/android/master/out/bazel/output/external/soong_injection/product_config_platforms/products/ndk-eng/BUILD (Tip: use `query "@soong_injection//product_config_platforms/products/ndk-eng:*"` to see all the targets in that package)
```

Bug: https://github.com/google/android-riscv64/issues/10
Bug: http://b/274509603
Bug: http://b/262192655
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I4b6633ab5aab3f01953b628d78ac1d79f2a4ee3c
2023-03-21 00:42:35 +00:00
Treehugger Robot
568fdfe93d Merge "ui: fix logic sense for multitree build" 2023-03-21 00:03:11 +00:00
Alix Espino
a2be13e680 Merge "Add TODO comment for min_sdk_verison in android_app Bp2Build" 2023-03-20 23:36:55 +00:00
Spandan Das
ea93f64f03 Merge changes Ie6ae7e26,I2fd822a2,Iddd497df,Iee5a936e,I628b443c
* changes:
  Update min_sdk_version from SdkSpec to ApiLevel
  Always include host variants in the sdk snapshot
  Prework for migrating min_sdk_version from (kind+level) to (level)
  Create EffectiveVersion* functions for ApiLevel
  Create two sentinel api levels
2023-03-20 23:33:48 +00:00
Spandan Das
6b73fcb200 Export the name of stub java Soong modules
build/make has several hardcoded references to these modules. In
preparation for switching between stubs generated from .txt files,
export these module names to Make. This prevents duplication of stub
selection logic in multiple places.

Test: TH
Change-Id: I5b1ef27aaea269d60aa7953787ea10d1b2a793f2
2023-03-20 22:03:42 +00:00
Yu Liu
6b7c316cfc Treat libcrypto in com.android.tethering differently
This module uses librypto from cronet which is different from the
default one, so the test would always fail.

Bug: 274473434
Test: run the script locally.
Change-Id: I9aac4da0990953db312e2163ee8af05e692f6f3f
2023-03-20 14:46:29 -07:00
Treehugger Robot
94d107020a Merge "Fix CI failures, comment out dcla cases temporarily." 2023-03-20 21:35:10 +00:00
Elliott Hughes
65a97364ba Merge "Generate NDK stubs for riscv64 too." 2023-03-20 21:10:53 +00:00
Spandan Das
626a8ad934 Cleanup hardcoded references to android_*stubs_current
These hardcoded refs will need to be updated when we start using .txt
stub equivalent (single-tree/multi-tree). Instead of strewing this logic
all over the codebase, create a helper function that contains the
replacement logic. All other places should call this helper function
instead of calculating the name of .txt equivalent soong module by
itself.

(Will do a similar cleanup in build/make)

Test: no change in ninja file

Change-Id: I6bf999eb4aeaba6ac2a44b9016bae4ec8c79ce19
2023-03-20 20:50:03 +00:00
LaMont Jones
80f7035dac ui: fix logic sense for multitree build
Bug: b/266730267
Test: treehugger, manual
Change-Id: I059a9b90ecb70de5965cb2fe3f8a1e16de46c116
2023-03-20 19:58:25 +00:00
Liz Kammer
071c76e223 Merge "Add documentation for BuildParams" 2023-03-20 18:42:24 +00:00
Trevor Radcliffe
dc210faca4 Supporting changes for cc_binary LTO transitions
Bug: 261733821
Test: Unit tests
Change-Id: I4218a93ce20d28b425f216d2328446c9b2ad9088
2023-03-20 18:25:08 +00:00
Alix
ffdeacb309 Add TODO comment for min_sdk_verison in android_app Bp2Build
Test: NA added a comment
Bug: 274474008
Change-Id: I1c02c2877e638589730a7b2b565382c010dfe084
2023-03-20 18:22:45 +00:00
Wei Li
4a77c55b81 Fix CI failures, comment out dcla cases temporarily.
Bug: 274473434
Test: CIs
Change-Id: Ia1b8860ac46dad6b9670880613b6559561e37dbf
2023-03-20 18:07:40 +00:00
Treehugger Robot
759524afc9 Merge "Enable annotations for sealed classes" 2023-03-20 17:52:31 +00:00
Liz Kammer
063b5773b3 Merge "Move fingerprint genrule and DCLA cc libraries to prod allowlists." 2023-03-20 17:29:37 +00:00
Treehugger Robot
61980fe2dd Merge "Denylist failing cc_tests svcenc and svcdec." 2023-03-20 17:25:50 +00:00
Spandan Das
e773739787 Update min_sdk_version from SdkSpec to ApiLevel
min_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid min_sdk_version in bp
files

Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a
followup CL

Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999

Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
2023-03-20 16:51:32 +00:00
Spandan Das
3015e38a5f Always include host variants in the sdk snapshot
Host tools (and variants in general) should not fall under the purview
of min_sdk_version check. These do not exist on device, so
min_sdk_version check would not make such sense.

This is prework for migrating min_sdk_version from type SdkSpec to
ApiLevel.

Test: go test ./sdk
Bug: 208456999

Change-Id: I2fd822a223d1dc5e290d4a1ebf304fe47a5b0416
2023-03-20 16:40:08 +00:00
Spandan Das
ea4c692875 Prework for migrating min_sdk_version from (kind+level) to (level)
Currently, the following lib will be included in the sdk snapshot even
though it is compiling against private apis
```
java_sdk_library {
  name: "foo",
  //sdk_version defaults to "",  i.e. SdkSpecPrivate
}
```

This is because min_sdk_version of `foo` inherits the api level of
SdkSpecPrivate (i.e. FutureApiLevel).

As part of the migration of min_sdk_version to ApiLevel, the api level
of SdkSpecPrivate will be different than FutureApiLevel. In the above
example, assuming the version of the sdk_snapshot is FutureApiLevel,
`foo` will be included only if it explicitly sets a min_sdk_version <=
FutureApiLevel. Update an existing unit test to set this value
explicitly.

Bug: 208456999
Test: go test ./sdk (top of CL stack)

Change-Id: Iddd497df7da8c829325d902fbf70731dd8c6855d
2023-03-20 16:40:08 +00:00
Spandan Das
5780039180 Create EffectiveVersion* functions for ApiLevel
These functions already exist on SdkSpec(kind+level) and are used for
computing the effective version for vendor modules compiling against
current or system_current which depends on the sdkKind

Create these functions for ApiLevel to support migrating MinSdkVersion
from SdkSpec to ApiLevel. Since the "api level" of vendor modules depend
on the sdk_kind as well, these functions will continue to exist on
SdkSpec.

Test: m nothing
Test: no diff in ninja files (this should be a no-op)
Bug: 208456999

Change-Id: Iee5a936e72b02b4fab9e457082d46fb8358eff16
2023-03-20 16:40:08 +00:00
Spandan Das
7ee04614cd Create two sentinel api levels
InvalidApiLevel:
This will be used for error handling if a user provided api level is
not recognized

PrivateApiLevel:
This will be used to differentiate the api level of sdk_version:"" from
sdk_version:"current" or sdk_version:"<active_codename>" (all used to be
FutureApiLevel previously). This was not necessary previously since the
type of min_sdk_version was SdkSpec(kind+level). Since it had access to
kind, it could check that it was not SdkSpecPrivate

Test: m nothing
Change-Id: I628b443c34bf2ec258d947dfec09f38b126bc6bb
2023-03-20 16:40:08 +00:00
Alix Espino
895bc9463b Merge "Bp2build for android_app minsdkversion property" 2023-03-20 15:38:53 +00:00
Jingwen Chen
b5edbf9b8a Denylist failing cc_tests svcenc and svcdec.
Bug: 274164834
Test: presubmits
Change-Id: I281b3198b39468bdf435d318af87c336fd3500c9
2023-03-20 13:17:49 +00:00
Liz Kammer
daefe0c6bd Add documentation for BuildParams
Test: n/a
Change-Id: I867b3c2b7faad66a1b8c3b772214673b2c56a3b8
2023-03-20 09:14:30 -04:00
Ioana Alexandru
54fb18d43b Merge "Revert "Export non-apex variants of modules to make"" 2023-03-20 11:08:55 +00:00
Jingwen Chen
01addfcd49 Move fingerprint genrule and DCLA cc libraries to prod allowlists.
Fixes: 263406837
Test: presubmits
Test: abtd (TBD)
Change-Id: I1dbf3021cb671e0a395efe755fd579634985e886
2023-03-20 11:08:22 +00:00
Jingwen Chen
8ac7d7d01d Revert "Export non-apex variants of modules to make"
This reverts commit 502da3987a.

Reason for revert: b/274195633

```
In file included from out/soong/installs-aosp_cf_x86_pasan.mk:134984:
In file included from out/soong/Android-aosp_cf_x86_pasan.mk:981696:
In file included from build/make/core/soong_cc_rust_prebuilt.mk:76:
build/make/core/base_rules.mk:342: error: packages/modules/Uwb/service/uci/jni: MODULE.TARGET.SHARED_LIBRARIES.libuwb_uci_jni_rust already defined by packages/modules/Uwb/service/uci/jni.
```

Change-Id: Ic1ea6969e54c23a7d126eb0fb47ab6f2e44ee965
2023-03-20 11:05:16 +00:00
Jooyung Han
dfc864c802 Vendor apexes can be "updatable: true"
Vendor APEXes can be updatable unless it sets "use_vndk_as_stable:true".
When "updatable:true", it should meet the "updatable" requirements like
"should set min_sdk_version".

Bug: 274396342
Bug: 274041915
Test: m nothing (soong tests)
Change-Id: I746d8941c21e883c1eba3e1f1e5a414a67db071a
2023-03-20 18:29:31 +09:00
Ziwei Zhang
e75fcf4ddb Merge "Add python template for mobly tests." 2023-03-20 02:16:04 +00:00
Cole Faust
8181f4b916 Replace json_encode with json.encode
Now that the json module is available in the cquery starlark execution
enviornment.

Bug: 245315355
Test: m nothing
Change-Id: Ie7c314e2f4e2ef4257bd84abc1add01ddb668f0b
2023-03-19 14:24:23 -07:00
Treehugger Robot
9ba1ddd355 Merge "Remove --extra_toolchains flag from aquery runner" 2023-03-18 22:56:50 +00:00
Treehugger Robot
f4f034356e Merge "Resolve metrics_proto warning" 2023-03-17 21:46:55 +00:00
Treehugger Robot
c887ac6a04 Merge "Depend on stubs via @api_surfaces" 2023-03-17 21:06:55 +00:00
Treehugger Robot
9054cfb3d8 Merge "Create a sh_binary target for jars-to-module-info" 2023-03-17 20:50:15 +00:00
Alix
e5085ebbc1 Bp2build for android_app minsdkversion property
Bug: 249265719
Test: go test ./bp2build
Test: insepcted generated build files
Change-Id: I02ed54a9fdcc88d98439e0a61626a0afc1fce639
2023-03-17 20:47:52 +00:00