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
This commit is contained in:
parent
086ce224d2
commit
79d692c645
@ -33,7 +33,7 @@ def dict_union(x, y):
|
|||||||
|
|
||||||
def glog_library(namespace = "google", with_gflags = 1, **kwargs):
|
def glog_library(namespace = "google", with_gflags = 1, **kwargs):
|
||||||
if native.repository_name() != "@":
|
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
|
gendir = "$(GENDIR)/external/" + repo_name
|
||||||
src_windows = "external/%s/src/windows" % repo_name
|
src_windows = "external/%s/src/windows" % repo_name
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user