Class GppLinker
- java.lang.Object
-
public class GppLinker extends AbstractLdLinker
Adapter for the g++ variant of the GCC linker- Author:
- Stephen M. Webb
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]discardFilesprotected static java.lang.String[]libtoolObjFilesprotected static java.lang.String[]objFiles-
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)java.lang.String[]addLibrarySets(CCTask task, LibrarySet[] libsets, java.util.Vector preargs, java.util.Vector midargs, java.util.Vector endargs)protected java.lang.Objectclone()java.lang.StringdecorateLinkerOption(java.lang.StringBuffer buf, java.lang.String arg)Allows drived linker to decorate linker option.static GppLinkergetInstance()java.io.File[]getLibraryPath()Returns library path.LinkergetLinker(LinkType type)Gets the linker for the specified link type.voidlink(CCTask task, java.io.File outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config)Performs a link using a command line linker-
Methods inherited from class net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker
addBase, addEntry, addFixed, addIncremental, addLibraryPatterns, addMap, addStack, getCommandFileSwitch, getDynamicLibFlag, getEnvironmentIncludePath, getLibraryKey, getLibraryPatterns, getMaximumCommandLength, getOutputFileNames, getOutputFileSwitch, getStaticLibFlag, isCaseSensitive, isHPUX, prepareArguments
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
createConfiguration, getCommand, getIdentifier, getLibtoolLinker, getOutputFileSwitch, getStartupObject, prepareFilename, prepareResponseFile, quoteFilename, runCommand, setCommand
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker
addVersionFiles, bid, changeEnvironment, createConfiguration
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
-
-
-
-
Constructor Detail
-
GppLinker
protected GppLinker(java.lang.String command, java.lang.String[] extensions, java.lang.String[] ignoredExtensions, java.lang.String outputPrefix, java.lang.String outputSuffix, boolean isLibtool, GppLinker libtoolLinker)
-
-
Method Detail
-
getInstance
public static GppLinker getInstance()
-
addImpliedArgs
protected void addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)- Overrides:
addImpliedArgsin classAbstractLdLinker
-
addLibrarySets
public java.lang.String[] addLibrarySets(CCTask task, LibrarySet[] libsets, java.util.Vector preargs, java.util.Vector midargs, java.util.Vector endargs)
- Overrides:
addLibrarySetsin classAbstractLdLinker
-
clone
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classAbstractProcessor- Throws:
java.lang.CloneNotSupportedException
-
decorateLinkerOption
public java.lang.String decorateLinkerOption(java.lang.StringBuffer buf, java.lang.String arg)Allows drived linker to decorate linker option. Override by GppLinker to prepend a "-Wl," to pass option to through gcc to linker.- Overrides:
decorateLinkerOptionin classCommandLineLinker- Parameters:
buf- buffer that may be used and abused in the decoration process, must not be null.arg- linker argument
-
getLibraryPath
public java.io.File[] getLibraryPath()
Returns library path.- Specified by:
getLibraryPathin interfaceLinker- Overrides:
getLibraryPathin classAbstractLdLinker
-
getLinker
public Linker getLinker(LinkType type)
Description copied from interface:LinkerGets the linker for the specified link type.- Returns:
- appropriate linker or null, will return this if this linker can handle the specified link type
-
link
public void link(CCTask task, java.io.File outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config) throws org.apache.tools.ant.BuildException
Description copied from class:CommandLineLinkerPerforms a link using a command line linker- Overrides:
linkin classCommandLineLinker- Throws:
org.apache.tools.ant.BuildException
-
-