diff options
author | Cole Faust <colefaust@google.com> | 2023-03-21 12:09:34 -0700 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2023-03-22 17:06:42 -0700 |
commit | 8f2368eb192c28e98e35eb014b0b2ee9cf416e70 (patch) | |
tree | bfea7f4642f889105cca078b62594a81ee566cae /rules/apex/transition.bzl | |
parent | e8a8c9b8bfffe7200da375880b10ebb26f541756 (diff) | |
download | bazel-8f2368eb192c28e98e35eb014b0b2ee9cf416e70.tar.gz |
Make the secondary arch into a constraint setting
Currently, apex rules read the secondary arch directly from the
soong.variables file, which means that when transitioning into a
different product, the new secondary arch wouldn't be picked up.
Instead, make the secondary arch its own constraint setting/values.
One hiccup with this is that it's not really clear what to do when
there is no secondary arch. I think that making a "none" constraint
value might introduce more confusing behavior / edge cases, so instead
I decided to make the secondary arch match the primary arch when it
doesn't exist. The platform utils will convert it back to an empty
string to match the soong.variables behavior.
Bug: 269577299
Test: Diffed the result of `b build --config=android //build/bazel/vendor/google:build.bazel.examples.apex.minimal_apex_aab` before and after this cl. For some reason there is a diff in the apex.pb file in the aab, but it's just differences in the order of fields: https://diff.googleplex.com/#key=7rKBCiPxby9p
Change-Id: Ifc41045feef9d05691cf49bcfc1b1c2fac15177e
Diffstat (limited to 'rules/apex/transition.bzl')
-rw-r--r-- | rules/apex/transition.bzl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rules/apex/transition.bzl b/rules/apex/transition.bzl index 4be5255c..53bac02f 100644 --- a/rules/apex/transition.bzl +++ b/rules/apex/transition.bzl @@ -115,8 +115,10 @@ def _impl_shared_lib_transition_32(settings, attr): old_platform = (old_platform .removesuffix("__internal_arm") .removesuffix("__internal_arm64") + .removesuffix("__internal_arm64only") .removesuffix("__internal_x86") - .removesuffix("__internal_x86_64")) + .removesuffix("__internal_x86_64") + .removesuffix("__internal_x86_64only")) return _create_apex_configuration(settings, attr, { "//build/bazel/rules/apex:apex_direct_deps": direct_deps, |