Package net.sf.antcontrib.cpptasks.gcc
Class AbstractArLibrarian
- java.lang.Object
-
- net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
-
- net.sf.antcontrib.cpptasks.compiler.AbstractLinker
-
- net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
-
- net.sf.antcontrib.cpptasks.gcc.AbstractArLibrarian
-
- Direct Known Subclasses:
GccLibrarian
,GccLibrarian
,GccLibrarian
public abstract class AbstractArLibrarian extends CommandLineLinker
Adapter for the "ar" tool
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
outputPrefix
-
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractArLibrarian(java.lang.String command, java.lang.String identificationArg, java.lang.String[] inputExtensions, java.lang.String[] ignoredExtensions, java.lang.String outputPrefix, java.lang.String outputExtension, boolean isLibtool, AbstractArLibrarian libtoolLibrarian)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBase(long base, java.util.Vector args)
protected void
addEntry(java.lang.String entry, java.util.Vector args)
void
addFixed(java.lang.Boolean fixed, java.util.Vector args)
void
addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)
void
addIncremental(boolean incremental, java.util.Vector args)
void
addMap(boolean map, java.util.Vector args)
void
addStack(int stack, java.util.Vector args)
java.lang.String
getCommandFileSwitch(java.lang.String commandFile)
java.io.File[]
getLibraryPath()
returns the library path for the linkerjava.lang.String[]
getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)
Returns a set of filename patterns corresponding to library names.int
getMaximumCommandLength()
java.lang.String[]
getOutputFileNames(java.lang.String baseName, VersionInfo versionInfo)
Output file name (no path components) corresponding to source filejava.lang.String[]
getOutputFileSwitch(java.lang.String outputFile)
boolean
isCaseSensitive()
Returns true if the linker is case-sensitivevoid
link(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.compiler.CommandLineLinker
addLibrarySets, createConfiguration, decorateLinkerOption, getCommand, getIdentifier, getLibtoolLinker, getOutputFileSwitch, getStartupObject, prepareArguments, prepareFilename, prepareResponseFile, quoteFilename, runCommand, setCommand
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker
addVersionFiles, bid, changeEnvironment, createConfiguration, getLibraryKey
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
-
-
-
-
Constructor Detail
-
AbstractArLibrarian
protected AbstractArLibrarian(java.lang.String command, java.lang.String identificationArg, java.lang.String[] inputExtensions, java.lang.String[] ignoredExtensions, java.lang.String outputPrefix, java.lang.String outputExtension, boolean isLibtool, AbstractArLibrarian libtoolLibrarian)
-
-
Method Detail
-
addBase
public void addBase(long base, java.util.Vector args)
- Specified by:
addBase
in classCommandLineLinker
-
addFixed
public void addFixed(java.lang.Boolean fixed, java.util.Vector args)
- Specified by:
addFixed
in classCommandLineLinker
-
addImpliedArgs
public void addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)
- Specified by:
addImpliedArgs
in classCommandLineLinker
-
addIncremental
public void addIncremental(boolean incremental, java.util.Vector args)
- Specified by:
addIncremental
in classCommandLineLinker
-
addMap
public void addMap(boolean map, java.util.Vector args)
- Specified by:
addMap
in classCommandLineLinker
-
addStack
public void addStack(int stack, java.util.Vector args)
- Specified by:
addStack
in classCommandLineLinker
-
addEntry
protected void addEntry(java.lang.String entry, java.util.Vector args)
- Specified by:
addEntry
in classCommandLineLinker
-
getCommandFileSwitch
public java.lang.String getCommandFileSwitch(java.lang.String commandFile)
- Specified by:
getCommandFileSwitch
in classCommandLineLinker
-
getLibraryPath
public java.io.File[] getLibraryPath()
Description copied from interface:Linker
returns the library path for the linker
-
getLibraryPatterns
public java.lang.String[] getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)
Description copied from interface:Linker
Returns a set of filename patterns corresponding to library names. For example, "advapi32" would be expanded to "advapi32.dll" by DevStudioLinker and to "libadvapi32.a" and "libadvapi32.so" by GccLinker.- Parameters:
libnames
- array of library names
-
getMaximumCommandLength
public int getMaximumCommandLength()
- Specified by:
getMaximumCommandLength
in classCommandLineLinker
-
getOutputFileNames
public java.lang.String[] getOutputFileNames(java.lang.String baseName, VersionInfo versionInfo)
Description copied from interface:Processor
Output file name (no path components) corresponding to source file- Specified by:
getOutputFileNames
in interfaceProcessor
- Overrides:
getOutputFileNames
in classCommandLineLinker
- Parameters:
baseName
- input file- Returns:
- output file name or null if no output file or name not determined by input file
-
getOutputFileSwitch
public java.lang.String[] getOutputFileSwitch(java.lang.String outputFile)
- Specified by:
getOutputFileSwitch
in classCommandLineLinker
-
isCaseSensitive
public boolean isCaseSensitive()
Description copied from interface:Linker
Returns true if the linker is case-sensitive
-
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:CommandLineLinker
Performs a link using a command line linker- Overrides:
link
in classCommandLineLinker
- Throws:
org.apache.tools.ant.BuildException
-
-