Skip to content

Commit

Permalink
Support --nolegacy_external_runfiles (#72)
Browse files Browse the repository at this point in the history
* Support `--legacy_external_runfiles`

Co-authored-by: Fabian Meumertzheim <[email protected]>

---------

Co-authored-by: Fabian Meumertzheim <[email protected]>
  • Loading branch information
lalten and fmeum authored Nov 6, 2024
1 parent a9e83d5 commit e8d8285
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion perl/perl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ def transitive_deps(ctx, extra_files = [], extra_deps = []):

def _include_paths(ctx):
"""Calculate the PERL5LIB paths for a perl_library rule's includes."""
package_root = (ctx.label.workspace_root + "/" + ctx.label.package).strip("/") or "."
workspace_name = ctx.label.workspace_name
if workspace_name:
workspace_root = "../" + workspace_name
else:
workspace_root = ""
package_root = (workspace_root + "/" + ctx.label.package).strip("/") or "."
include_paths = [package_root] if "." in ctx.attr.includes else []
include_paths.extend([package_root + "/" + include for include in ctx.attr.includes if include != "."])
for dep in ctx.attr.deps:
Expand Down

0 comments on commit e8d8285

Please sign in to comment.