Class WindowsLinker

    • Constructor Detail

      • WindowsLinker

        public WindowsLinker​(Tool tool)
    • Method Detail

      • getScrubbers

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

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

        public Iterable<Arg> fileList​(Path fileListPath)
        Description copied from interface: Linker
        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.
        Specified by:
        fileList in interface Linker
        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

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

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

        public String searchPathEnvVar()
        Specified by:
        searchPathEnvVar in interface Linker
        Returns:
        the name of the environment variable for the shared library runtime search path.
      • preloadEnvVar

        public String preloadEnvVar()
        Specified by:
        preloadEnvVar in interface Linker
        Returns:
        the name of the environment variable for the shared library preload search path.
      • createUndefinedSymbolsLinkerArgs

        public com.google.common.collect.ImmutableList<Arg> createUndefinedSymbolsLinkerArgs​(ProjectFilesystem projectFilesystem,
                                                                                             BuildRuleParams baseParams,
                                                                                             ActionGraphBuilder graphBuilder,
                                                                                             BuildTarget target,
                                                                                             com.google.common.collect.ImmutableList<? extends SourcePath> symbolFiles)
        Description copied from interface: Linker
        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.
        Specified by:
        createUndefinedSymbolsLinkerArgs in interface Linker
        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.
      • getNoAsNeededSharedLibsFlags

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

        public Iterable<String> getIgnoreUndefinedSymbolsFlags()
        Specified by:
        getIgnoreUndefinedSymbolsFlags in interface Linker
        Returns:
        arguments to pass to the linker so that it ignores undefined symbols when linking.
      • importLibrary

        public Iterable<Arg> importLibrary​(Path output)
        Specified by:
        importLibrary in interface HasImportLibrary
        Parameters:
        output - the path of the output binary
        Returns:
        the platform-specific way to generate an implib file.
      • importLibraryPath

        public Path importLibraryPath​(Path output)
        Specified by:
        importLibraryPath in interface HasImportLibrary
        Parameters:
        output - the path of the output binary
        Returns:
        the path of the output binary's link-map file generated by the linker.