From 79d692c6459536356bdbbd4b89df2e0aee5b4eaf Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Wed, 15 Jun 2022 14:38:48 +0200 Subject: [PATCH] Strip only the first leading @ This change is needed for glog to work with future version of Bazel when canonical label literals is used in Bzlmod. Context: https://docs.google.com/document/d/1N81qfCa8oskCk5LqTW-LNthy6EBrDot7bdUsjz6JFC4/edit#heading=h.5mcn15i0e1ch --- bazel/glog.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazel/glog.bzl b/bazel/glog.bzl index 4208d9e2f..ad78c5bc8 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -33,7 +33,7 @@ def dict_union(x, y): def glog_library(namespace = "google", with_gflags = 1, **kwargs): if native.repository_name() != "@": - repo_name = native.repository_name().lstrip("@") + repo_name = native.repository_name()[1:] # Strip the first leading @ gendir = "$(GENDIR)/external/" + repo_name src_windows = "external/%s/src/windows" % repo_name else: