public class GnuLinker extends DelegatingTool implements Linker, HasIncrementalThinLTO
Linker
containing information specific to the GNU implementation.Linker.CxxRuntimeType, Linker.ExtraOutputsDeriver, Linker.LinkableDepType, Linker.LinkType, Linker.SharedLibraryLoadingType
getCommandPrefix, getEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCommandPrefix, getEnvironment
public GnuLinker(Tool tool)
public com.google.common.collect.ImmutableList<FileScrubber> getScrubbers(com.google.common.collect.ImmutableMap<Path,Path> cellRootMap)
getScrubbers
in interface Linker
cellRootMap
- Replacement map for cell roots found in paths, to some suitably normalized
form (such as a relative path from root cell).public Iterable<Arg> linkWhole(Arg input, SourcePathResolverAdapter resolver)
public Iterable<Arg> incrementalThinLTOFlags(Path output)
incrementalThinLTOFlags
in interface HasIncrementalThinLTO
output
- the path of the output index filespublic Iterable<Arg> fileList(Path fileListPath)
Linker
public String origin()
public String libOrigin()
public String searchPathEnvVar()
searchPathEnvVar
in interface Linker
public String preloadEnvVar()
preloadEnvVar
in interface Linker
public com.google.common.collect.ImmutableList<Arg> createUndefinedSymbolsLinkerArgs(ProjectFilesystem projectFilesystem, BuildRuleParams baseParams, ActionGraphBuilder graphBuilder, BuildTarget target, com.google.common.collect.ImmutableList<? extends SourcePath> symbolFiles)
symbolFiles
into a linker script wrapped in
`EXTERN` commands.createUndefinedSymbolsLinkerArgs
in interface Linker
target
- the name given to the BuildRule
which creates the linker script.symbolFiles
- public Iterable<String> getNoAsNeededSharedLibsFlags()
getNoAsNeededSharedLibsFlags
in interface Linker
public Iterable<String> getIgnoreUndefinedSymbolsFlags()
getIgnoreUndefinedSymbolsFlags
in interface Linker
public Iterable<Arg> getSharedLibFlag()
getSharedLibFlag
in interface Linker
public Iterable<String> outputArgs(String path)
outputArgs
in interface Linker
public Linker.SharedLibraryLoadingType getSharedLibraryLoadingType()
getSharedLibraryLoadingType
in interface Linker
public Optional<Linker.ExtraOutputsDeriver> getExtraOutputsDeriver()
getExtraOutputsDeriver
in interface Linker
public boolean getUseUnixPathSeparator()
getUseUnixPathSeparator
in interface Linker