diff options
| author | Spandan Das <spandandas@google.com> | 2023-04-18 06:20:40 +0000 |
|---|---|---|
| committer | Spandan Das <spandandas@google.com> | 2023-05-08 21:11:46 +0000 |
| commit | 6d4d9da47f8c9d5a947c03554853dec12c02bddd (patch) | |
| tree | a8f771ccd9897694dac121067f9632dd29e3a69d /bazel | |
| parent | a43ae1366ea312f1865ad672d82ed2480f4109e8 (diff) | |
Select stub/impl per apex variant
Create a select statement for every api_domain a library could be
included in. The stub/impl
selection heuristics per apex domain are
1. If dep has stubs and the api domain appears in dep's apex_available, use
impl
2. If dep has stubs and the api domain does not appear in dep's
apex_available, use stubs
(Category 3: If dep does not have stubs and the apex does not appear in
dep's apex_available, then a separate apex_available validation in Bazel
will emit an error).
Platform variants have been special-cased for now to use equality of
apex_available for stub/impl selection
Test: go test ./bp2build
Bug: 272378496
Change-Id: Ibd29efd763c8863c7e6d2a9af0da30bbde07175d
Diffstat (limited to 'bazel')
| -rw-r--r-- | bazel/configurability.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bazel/configurability.go b/bazel/configurability.go index d01877dd5..29299e9b9 100644 --- a/bazel/configurability.go +++ b/bazel/configurability.go @@ -69,8 +69,8 @@ const ( productVariableBazelPackage = "//build/bazel/product_variables" - AndroidAndInApex = "android-in_apex" - AndroidAndNonApex = "android-non_apex" + AndroidAndInApex = "android-in_apex" + AndroidPlatform = "system" InApex = "in_apex" NonApex = "non_apex" @@ -202,7 +202,7 @@ var ( osAndInApexMap = map[string]string{ AndroidAndInApex: "//build/bazel/rules/apex:android-in_apex", - AndroidAndNonApex: "//build/bazel/rules/apex:android-non_apex", + AndroidPlatform: "//build/bazel/rules/apex:system", osDarwin: "//build/bazel/platforms/os:darwin", osLinux: "//build/bazel/platforms/os:linux_glibc", osLinuxMusl: "//build/bazel/platforms/os:linux_musl", |
