diff options
Diffstat (limited to 'third_party/grpc/build_defs.bzl')
-rw-r--r-- | third_party/grpc/build_defs.bzl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/grpc/build_defs.bzl b/third_party/grpc/build_defs.bzl index 4240c1debf..8ae42acad2 100644 --- a/third_party/grpc/build_defs.bzl +++ b/third_party/grpc/build_defs.bzl @@ -6,7 +6,9 @@ load("//third_party/grpc:build_defs.bzl", "java_grpc_library") def _path_ignoring_repository(f): if (len(f.owner.workspace_root) == 0): return f.short_path - return f.path[len(f.owner.workspace_root)+1:] + # If |f| is a generated file, it will have "bazel-out/*/genfiles" prefix + # before "external/workspace", so we need to add the starting index of "external/workspace" + return f.path[f.path.find(f.owner.workspace_root)+len(f.owner.workspace_root)+1:] def _gensource_impl(ctx): if len(ctx.attr.srcs) > 1: |