From ab092bc1bdf1cea46f62febf3cc111b7898356ef Mon Sep 17 00:00:00 2001 From: Dmitry Mikhin Date: Fri, 2 Aug 2024 17:22:27 +0300 Subject: [PATCH] Fix for #1239 This fix error message like this in case of bzlmod usage: invalid registered toolchain '@rules_foreign_cc//toolchains:preinstalled_nmake_toolchain': No repository visible as '@rules_foreign_cc' from main repository --- foreign_cc/built_tools/pkgconfig_build.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foreign_cc/built_tools/pkgconfig_build.bzl b/foreign_cc/built_tools/pkgconfig_build.bzl index 1bbf9a6bd..e74d638c9 100644 --- a/foreign_cc/built_tools/pkgconfig_build.bzl +++ b/foreign_cc/built_tools/pkgconfig_build.bzl @@ -166,7 +166,7 @@ def pkgconfig_tool(name, srcs, **kwargs): "@platforms//os:windows": "cp release/x64/pkg-config.exe $$INSTALLDIR$$/bin", "//conditions:default": "", }), - toolchain = "@rules_foreign_cc//toolchains:preinstalled_nmake_toolchain", + toolchain = str(Label("//toolchains:preinstalled_nmake_toolchain")), tags = tags, **kwargs )