diff options
author | 2016-03-02 01:24:56 +0000 | |
---|---|---|
committer | 2016-03-02 17:55:01 +0000 | |
commit | 8091b2b42bfd9113513aa68294ddc6160cb6500f (patch) | |
tree | 402ada9dcb2fec9751b435ddb239a13f82f4dda9 /src/main/java/com/google/devtools/build/lib/actions | |
parent | f2d560a826b032a6443bb19bce0786141052e296 (diff) |
Expose artifact owner label to Skylark.
--
MOS_MIGRATED_REVID=116076100
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/Artifact.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java index 5c69ce5cfd..4e8989f9ba 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java @@ -295,6 +295,13 @@ public class Artifact return owner; } + @SkylarkCallable(name = "owner", structField = true, allowReturnNones = true, + doc = "A label of a target that produces this File. Can be None." + ) + public Label getOwnerLabel() { + return owner.getLabel(); + } + /** * Returns the root beneath which this Artifact resides, if any. This may be one of the * package-path entries (for source Artifacts), or one of the bin, genfiles or includes dirs |