@@ -17,7 +17,9 @@ load("@bazel_skylib//lib:dicts.bzl", "dicts")
1717load ("@bazel_skylib//lib:paths.bzl" , "paths" )
1818load ("@bazel_skylib//lib:structs.bzl" , "structs" )
1919load ("@bazel_skylib//rules:common_settings.bzl" , "BuildSettingInfo" )
20+ load ("@rules_cc//cc:find_cc_toolchain.bzl" , "find_cc_toolchain" )
2021load ("@rules_cc//cc/common:cc_common.bzl" , "cc_common" )
22+ load ("@rules_cc//cc/common:cc_helper.bzl" , "cc_helper" )
2123load (":attr_builders.bzl" , "attrb" )
2224load (
2325 ":attributes.bzl" ,
3234 "apply_config_settings_attr" ,
3335)
3436load (":builders.bzl" , "builders" )
35- load (":cc_helper.bzl" , "cc_helper" )
3637load (
3738 ":common.bzl" ,
3839 "collect_cc_info" ,
@@ -1092,7 +1093,7 @@ def py_executable_base_impl(ctx, *, semantics, is_test, inherited_environment =
10921093 )
10931094
10941095def _get_build_info (ctx , cc_toolchain ):
1095- build_info_files = py_internal . cc_toolchain_build_info_files ( cc_toolchain )
1096+ build_info_files = cc_toolchain . _build_info_files
10961097 if cc_helper .is_stamping_enabled (ctx ):
10971098 # Makes the target depend on BUILD_INFO_KEY, which helps to discover stamped targets
10981099 # See b/326620485 for more details.
@@ -1400,7 +1401,7 @@ def _write_build_data(ctx, central_uncachable_version_file, extra_write_build_da
14001401 # https://github.com/bazelbuild/bazel/issues/9363
14011402 "INFO_FILE" : ctx .info_file .path ,
14021403 "OUTPUT" : build_data .path ,
1403- "PLATFORM" : cc_helper . find_cpp_toolchain (ctx ).toolchain_id ,
1404+ "PLATFORM" : find_cc_toolchain (ctx ).toolchain_id ,
14041405 "TARGET" : str (ctx .label ),
14051406 "VERSION_FILE" : version_file .path ,
14061407 }, extra_write_build_data_env ),
@@ -1444,7 +1445,7 @@ def _get_native_deps_details(ctx, *, semantics, cc_details, is_test):
14441445
14451446 # The regular cc_common.link API can't be used because several
14461447 # args are private-use only; see # private comments
1447- py_internal .link (
1448+ getattr ( py_internal , "link" , cc_common .link ) (
14481449 name = ctx .label .name ,
14491450 actions = ctx .actions ,
14501451 linking_contexts = [cc_info .linking_context ],
@@ -1475,7 +1476,7 @@ def _create_shared_native_deps_dso(
14751476 requested_features ,
14761477 cc_toolchain ):
14771478 linkstamps = [
1478- py_internal . linkstamp_file ( linkstamp )
1479+ linkstamp . file ( )
14791480 for linker_input in cc_info .linking_context .linker_inputs .to_list ()
14801481 for linkstamp in linker_input .linkstamps
14811482 ]
0 commit comments