diff --git a/foreign_cc/cmake.bzl b/foreign_cc/cmake.bzl index 77031351..3e390ece 100644 --- a/foreign_cc/cmake.bzl +++ b/foreign_cc/cmake.bzl @@ -144,7 +144,7 @@ load( "create_attrs", "expand_locations_and_make_variables", ) -load("//foreign_cc/private:transitions.bzl", "make_variant") +load("//foreign_cc/private:transitions.bzl", "foreign_cc_rule_variant") load( "//foreign_cc/private/framework:platform.bzl", "os_name", @@ -426,7 +426,7 @@ def cmake_variant(name, toolchain, **kwargs): toolchain: The desired make variant toolchain to use, e.g. @rules_foreign_cc//toolchains:preinstalled_nmake_toolchain **kwargs: Remaining keyword arguments """ - make_variant( + foreign_cc_rule_variant( name = name, rule = cmake, toolchain = toolchain, diff --git a/foreign_cc/configure.bzl b/foreign_cc/configure.bzl index 93390417..47dd5c65 100644 --- a/foreign_cc/configure.bzl +++ b/foreign_cc/configure.bzl @@ -18,7 +18,7 @@ load( "create_attrs", "expand_locations_and_make_variables", ) -load("//foreign_cc/private:transitions.bzl", "make_variant") +load("//foreign_cc/private:transitions.bzl", "foreign_cc_rule_variant") load("//foreign_cc/private/framework:platform.bzl", "os_name") load("//toolchains/native_tools:tool_access.bzl", "get_make_data", "get_pkgconfig_data") @@ -253,7 +253,7 @@ def configure_make_variant(name, toolchain, **kwargs): toolchain: The desired make variant toolchain to use, e.g. @rules_foreign_cc//toolchains:preinstalled_nmake_toolchain **kwargs: Remaining keyword arguments """ - make_variant( + foreign_cc_rule_variant( name = name, rule = configure_make, toolchain = toolchain, diff --git a/foreign_cc/make.bzl b/foreign_cc/make.bzl index 0c5892bf..c6915bd2 100644 --- a/foreign_cc/make.bzl +++ b/foreign_cc/make.bzl @@ -18,7 +18,7 @@ load( "expand_locations_and_make_variables", ) load("//foreign_cc/private:make_script.bzl", "create_make_script") -load("//foreign_cc/private:transitions.bzl", _make_variant = "make_variant") +load("//foreign_cc/private:transitions.bzl", "foreign_cc_rule_variant") load("//toolchains/native_tools:tool_access.bzl", "get_make_data") def _make(ctx): @@ -131,7 +131,7 @@ def make_variant(name, toolchain, **kwargs): toolchain: The desired make variant toolchain to use, e.g. @rules_foreign_cc//toolchains:preinstalled_nmake_toolchain **kwargs: Remaining keyword arguments """ - _make_variant( + foreign_cc_rule_variant( name = name, rule = make, toolchain = toolchain, diff --git a/foreign_cc/private/transitions.bzl b/foreign_cc/private/transitions.bzl index 30494793..c3f9dea8 100644 --- a/foreign_cc/private/transitions.bzl +++ b/foreign_cc/private/transitions.bzl @@ -41,8 +41,8 @@ extra_toolchains_transitioned_foreign_cc_target = rule( incompatible_use_toolchain_transition = True, ) -def make_variant(name, rule, toolchain, **kwargs): - """ Wrapper macro around foreign cc rules to force usage of the given make variant toolchain. +def foreign_cc_rule_variant(name, rule, toolchain, **kwargs): + """ Wrapper macro around foreign cc rules to force usage of the given toolchain. Args: name: The target name @@ -51,12 +51,12 @@ def make_variant(name, rule, toolchain, **kwargs): **kwargs: Remaining keyword arguments """ - make_variant_target_name = name + "_" + foreign_cc_rule_target_name = name + "_" tags = kwargs.pop("tags", []) rule( - name = make_variant_target_name, + name = foreign_cc_rule_target_name, tags = tags + ["manual"], **kwargs ) @@ -64,6 +64,6 @@ def make_variant(name, rule, toolchain, **kwargs): extra_toolchains_transitioned_foreign_cc_target( name = name, extra_toolchains = [toolchain], - target = make_variant_target_name, + target = foreign_cc_rule_target_name, tags = tags, )