|
|
@@ -9,7 +9,11 @@ def _symlink_filegroup_impl(ctx):
|
|
|
|
|
|
outputs = []
|
|
|
for f in ctx.files.srcs:
|
|
|
- out = ctx.actions.declare_file(prefix + f.short_path)
|
|
|
+ # We normalize the path to be package-relative in order to ensure
|
|
|
+ # consistent paths across possible repositories.
|
|
|
+ relative_path = f.short_path.removeprefix(f.owner.package)
|
|
|
+
|
|
|
+ out = ctx.actions.declare_file(prefix + "core/" + relative_path)
|
|
|
outputs.append(out)
|
|
|
ctx.actions.symlink(output = out, target_file = f)
|
|
|
|