Interface NativeLinkable

  • All Known Implementing Classes:
    NativeLinkableInfo, PlatformLockedNativeLinkableGroup

    public interface NativeLinkable
    Interface for objects (e.g. C++ libraries) which can contribute to the top-level link of a native binary (e.g. C++ binary). This represents the linkable object for a specific platform.
    • Method Detail

      • getNativeLinkableDeps

        Iterable<? extends NativeLinkable> getNativeLinkableDeps​(ActionGraphBuilder graphBuilder)
        Returns:
        All native linkable dependencies that might be required by this linkable.
      • getNativeLinkableExportedDeps

        Iterable<? extends NativeLinkable> getNativeLinkableExportedDeps​(ActionGraphBuilder graphBuilder)
        Returns:
        All native linkable exported dependencies that might be required by this linkable.
      • getNativeLinkTarget

        Optional<NativeLinkTarget> getNativeLinkTarget​(ActionGraphBuilder graphBuilder,
                                                       boolean includePrivateLinkerFlags)
        Optionally returns a NativeLinkTarget. Most implementations of NativeLinkable are themselves instances of NativeLinkTarget.
        Parameters:
        includePrivateLinkerFlags - whether to include rule-specific non-exported linker flags.
      • getSharedLibraries

        com.google.common.collect.ImmutableMap<String,​SourcePath> getSharedLibraries​(ActionGraphBuilder graphBuilder)
        Returns:
        a map of shared library SONAME to shared library path for the given CxxPlatform.
      • supportsOmnibusLinking

        default boolean supportsOmnibusLinking()
        Returns:
        whether this NativeLinkable supports omnibus linking.
      • getExportedLinkerFlags

        default Iterable<? extends Arg> getExportedLinkerFlags​(ActionGraphBuilder graphBuilder)
        Returns:
        exported linker flags. These should be added to link lines of dependents.
      • getExportedPostLinkerFlags

        default Iterable<? extends Arg> getExportedPostLinkerFlags​(ActionGraphBuilder graphBuilder)
        Returns:
        exported post-linker flags. This should be added to lines of dependents after other linker flags.
      • getRuleType

        default String getRuleType()
      • shouldBeLinkedInAppleTestAndHost

        boolean shouldBeLinkedInAppleTestAndHost()
      • isPrebuiltSOForHaskellOmnibus

        default boolean isPrebuiltSOForHaskellOmnibus​(ActionGraphBuilder graphBuilder)
      • supportsOmnibusLinkingForHaskell

        default boolean supportsOmnibusLinkingForHaskell()
      • forceLinkWholeForHaskellOmnibus

        default boolean forceLinkWholeForHaskellOmnibus()