aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java
diff options
context:
space:
mode:
authorGravatar cpeyser <cpeyser@google.com>2018-02-20 09:32:48 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-20 09:36:11 -0800
commitae011947a89dc15ffa33322176ae8738c3894a7d (patch)
tree797cf10e871f0ab5619fd4b595cca7a0535ecdcd /src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java
parenta7b34a1591cfa1034dca9b2c4ff9743d81396a97 (diff)
@AutoCodec some c++ linking data structures.
PiperOrigin-RevId: 186314781
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java
index 5daeb2deaa..7b7238d9bc 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/ExtraLinkTimeLibrary.java
@@ -17,21 +17,24 @@ package com.google.devtools.build.lib.rules.cpp;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.rules.cpp.LinkerInputs.LibraryToLink;
+import com.google.devtools.build.lib.skyframe.serialization.ObjectCodec;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
+import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec.Strategy;
/**
- * An extra library to include in a link. The actual library is built
- * at link time.
+ * An extra library to include in a link. The actual library is built at link time.
*
- * <p>This can be used for non-C++ inputs to a C++ link. A class that
- * implements this interface will support transitively gathering all
- * inputs from link dependencies, and then combine them all together
- * into a set of C++ libraries.
+ * <p>This can be used for non-C++ inputs to a C++ link. A class that implements this interface will
+ * support transitively gathering all inputs from link dependencies, and then combine them all
+ * together into a set of C++ libraries.
*
- * <p>Any implementations must be immutable (and therefore thread-safe),
- * because this is passed between rules and accessed in a multi-threaded
- * context.
+ * <p>Any implementations must be immutable (and therefore thread-safe), because this is passed
+ * between rules and accessed in a multi-threaded context.
*/
+@AutoCodec(strategy = Strategy.POLYMORPHIC)
public interface ExtraLinkTimeLibrary {
+ ObjectCodec<ExtraLinkTimeLibrary> CODEC = new ExtraLinkTimeLibrary_AutoCodec();
+
/** Build the LibraryToLink inputs to pass to the C++ linker. */
NestedSet<LibraryToLink> buildLibraries(RuleContext context) throws InterruptedException;