diff options
author | Cole Faust <colefaust@google.com> | 2023-04-11 14:02:09 -0700 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2023-04-11 15:38:53 -0700 |
commit | 11f30d40734ff86685c385f66bb1f4aa9a7cd65c (patch) | |
tree | ae18c65fdc987845bf465e8a54421178c3ac3806 /rules/cc | |
parent | 251a914137c101c5f6ca8b8c2aaadd04973f0251 (diff) | |
download | bazel-11f30d40734ff86685c385f66bb1f4aa9a7cd65c.tar.gz |
Don't load product_variables.bzl where possible
product_variables.bzl should not be loaded directly, but instead
read from the transitionable //build/bazel/product_config:product_vars
target.
Some of the information in product_variables.bzl is constant, and
doesn't need to be read from that target. In those cases, load the
information from other files so that the product_variables.bzl file
can be made private.
Bug: 269577299
Test: m nothing
Change-Id: I69d9d5479b51ff9098a3ff8f2caf5daa9fb4d49a
Diffstat (limited to 'rules/cc')
-rw-r--r-- | rules/cc/cc_library_common.bzl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rules/cc/cc_library_common.bzl b/rules/cc/cc_library_common.bzl index 164d6629..bd861c50 100644 --- a/rules/cc/cc_library_common.bzl +++ b/rules/cc/cc_library_common.bzl @@ -14,7 +14,7 @@ load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") load("@soong_injection//android:constants.bzl", android_constants = "constants") -load("@soong_injection//product_config:product_variables.bzl", "product_vars") +load("@soong_injection//api_levels:platform_versions.bzl", "platform_versions") load("//build/bazel/rules:common.bzl", "strip_bp2build_label_suffix") load("//build/bazel/rules/common:api.bzl", "api") @@ -237,10 +237,10 @@ def parse_apex_sdk_version(version): version = int(version) if version in api.api_levels.values(): return version - elif version == product_vars["Platform_sdk_version"]: + elif version == platform_versions.platform_sdk_version: # For internal branch states, support parsing a finalized version number # that's also still in - # product_vars["Platform_version_active_codenames"], but not api.api_levels. + # platform_versions.platform_version_active_codenames, but not api.api_levels. # # This happens a few months each year on internal branches where the # internal master branch has a finalized API, but is not released yet, |