net.sf.antcontrib.cpptasks.gcc

Class GccLinker

Implemented Interfaces:
Cloneable, Linker, Processor

public class GccLinker
extends AbstractLdLinker

Adapter for the GCC linker
Author:
Adam Murdoch

Field Summary

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

DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID

Constructor Summary

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

Method Summary

protected void
addImpliedArgs(boolean debug, LinkType linkType, Vector args)
String
decorateLinkerOption(StringBuffer buf, String arg)
Allows drived linker to decorate linker option.
static GccLinker
getInstance()
File[]
getLibraryPath()
Returns library path.
Linker
getLinker(LinkType type)
Gets the linker for the specified link 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

Constructor Details

GccLinker

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

Method Details

addImpliedArgs

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

decorateLinkerOption

public String decorateLinkerOption(StringBuffer buf,
                                   String arg)
Allows drived linker to decorate linker option. Override by GccLinker 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 GccLinker 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)
Gets the linker for the specified link type.
Specified by:
getLinker in interface Linker
getLinker in interface Processor
Returns:
appropriate linker or null, will return this if this linker can handle the specified link type

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