Skip to content

Commit

Permalink
Strip only the first leading @
Browse files Browse the repository at this point in the history
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
  • Loading branch information
meteorcloudy authored and drigz committed Jun 15, 2022
1 parent 086ce22 commit 79d692c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bazel/glog.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 79d692c

Please sign in to comment.