Interface Linker

    • Method Detail

      • getScrubbers

        com.google.common.collect.ImmutableList<FileScrubber> getScrubbers​(com.google.common.collect.ImmutableMap<Path,​Path> cellRootMap)
        Parameters:
        cellRootMap - Replacement map for cell roots found in paths, to some suitably normalized form (such as a relative path from root cell).
      • linkWhole

        Iterable<Arg> linkWhole​(Arg input,
                                SourcePathResolverAdapter resolver)
        Returns:
        the platform-specific way to specify that the library represented by the given argument should be linked whole.
      • soname

        Iterable<String> soname​(String soname)
        Returns:
        the platform-specific way to specify that linker should use the given soname when linking a shared library.
      • fileList

        Iterable<Arg> fileList​(Path fileListPath)
        Specifies that the linker should link the files listed in file. This is an alternative to listing the files on the command line. The file names are listed one per line separated only by newlines. Spaces and tabs are assumed to be part of the file name.
        Parameters:
        fileListPath - the path to file which contains contents for file list to link
        Returns:
        the platform-specific way to support the feature. Empty list if feature is not supported.
      • origin

        String origin()
        Returns:
        the placeholder used by the dynamic loader for the directory containing the top-level executable.
      • libOrigin

        String libOrigin()
        Returns:
        the placeholder used by the dynamic loader for the directory containing the top-level library (useful for e.g. plugins).
      • searchPathEnvVar

        String searchPathEnvVar()
        Returns:
        the name of the environment variable for the shared library runtime search path.
      • preloadEnvVar

        String preloadEnvVar()
        Returns:
        the name of the environment variable for the shared library preload search path.
      • getNoAsNeededSharedLibsFlags

        Iterable<String> getNoAsNeededSharedLibsFlags()
        Returns:
        arguments to pass to the linker to disable dropping runtime references to shared libs which do not resolve symbols as link-time.
      • getIgnoreUndefinedSymbolsFlags

        Iterable<String> getIgnoreUndefinedSymbolsFlags()
        Returns:
        arguments to pass to the linker so that it ignores undefined symbols when linking.
      • createUndefinedSymbolsLinkerArgs

        com.google.common.collect.ImmutableList<Arg> createUndefinedSymbolsLinkerArgs​(ProjectFilesystem projectFilesystem,
                                                                                      BuildRuleParams baseParams,
                                                                                      ActionGraphBuilder graphBuilder,
                                                                                      BuildTarget target,
                                                                                      com.google.common.collect.ImmutableList<? extends SourcePath> symbolFiles)
        Generate a necessary linker arguments to propagate undefined symbols to a link command. May need to create a BuildRule, in which case, target will be used as its name.
        Parameters:
        target - the name to give any BuildRule that needs to be created to facilitate generating the arguments,
        symbolFiles - the symbols files, each listing undefined symbols, one per line, to add to the link.
        Returns:
        the list of linker arguments needed to propagate the list of undefined symbols to the link command.
      • getUseUnixPathSeparator

        boolean getUseUnixPathSeparator()