net.sf.antcontrib.cpptasks.gcc

Class GppLinker

Implemented Interfaces:
Cloneable, Linker, Processor

public class GppLinker
extends AbstractLdLinker

Adapter for the g++ variant of the GCC linker
Author:
Stephen M. Webb

Field Summary

protected static String[]
discardFiles
protected static String[]
libtoolObjFiles
protected static String[]
objFiles

Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID

Constructor Summary

GppLinker(String command, String[] extensions, String[] ignoredExtensions, String outputPrefix, String outputSuffix, boolean isLibtool, GppLinker libtoolLinker)

Method Summary

protected void
addImpliedArgs(boolean debug, LinkType linkType, Vector args)
String[]
addLibrarySets(CCTask task, LibrarySet[] libsets, Vector preargs, Vector midargs, Vector endargs)
String
decorateLinkerOption(StringBuffer buf, String arg)
Allows drived linker to decorate linker option.
static GppLinker
getInstance()
File[]
getLibraryPath()
Returns library path.
Linker
getLinker(LinkType type)

Methods inherited from class net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker

addBase, addEntry, addFixed, addImpliedArgs, addIncremental, addLibraryPatterns, addLibrarySets, addMap, addStack, getCommandFileSwitch, getEnvironmentIncludePath, getLibraryKey, getLibraryPath, getLibraryPatterns, getMaximumCommandLength, getOutputFileNames, getOutputFileSwitch, isCaseSensitive, isHPUX, prepareArguments

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker

addBase, addEntry, addFixed, addImpliedArgs, addIncremental, addLibrarySets, addMap, addStack, createConfiguration, decorateLinkerOption, getCommand, getCommandFileSwitch, getIdentifier, getLibtoolLinker, getMaximumCommandLength, getOutputFileNames, getOutputFileSwitch, getOutputFileSwitch, getStartupObject, link, prepareArguments, prepareFilename, prepareResponseFile, quoteFilename, runCommand, setCommand

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker

addVersionFiles, bid, changeEnvironment, createConfiguration, createConfiguration, getLibraryKey, getOutputFileNames

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString

Field Details

discardFiles

protected static final String[] discardFiles

libtoolObjFiles

protected static final String[] libtoolObjFiles

objFiles

protected static final String[] objFiles

Constructor Details

GppLinker

protected GppLinker(String command,
                    String[] extensions,
                    String[] ignoredExtensions,
                    String outputPrefix,
                    String outputSuffix,
                    boolean isLibtool,
                    GppLinker libtoolLinker)

Method Details

addImpliedArgs

protected void addImpliedArgs(boolean debug,
                              LinkType linkType,
                              Vector args)
Overrides:
addImpliedArgs in interface AbstractLdLinker

addLibrarySets

public String[] addLibrarySets(CCTask task,
                               LibrarySet[] libsets,
                               Vector preargs,
                               Vector midargs,
                               Vector endargs)
Overrides:
addLibrarySets in interface AbstractLdLinker

decorateLinkerOption

public String decorateLinkerOption(StringBuffer buf,
                                   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:
decorateLinkerOption in interface CommandLineLinker
Parameters:
buf - buffer that may be used and abused in the decoration process, must not be null.
arg - linker argument

getInstance

public static GppLinker getInstance()

getLibraryPath

public File[] getLibraryPath()
Returns library path.
Specified by:
getLibraryPath in interface Linker
Overrides:
getLibraryPath in interface AbstractLdLinker

getLinker

public Linker getLinker(LinkType type)
Specified by:
getLinker in interface Linker
getLinker in interface Processor

Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.