|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.antcontrib.cpptasks.compiler.AbstractProcessor | +--net.sf.antcontrib.cpptasks.compiler.AbstractLinker | +--net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
An abstract Linker implementation that performs the link via an external command.
Constructor Summary | |
CommandLineLinker(java.lang.String command,
java.lang.String identifierArg,
java.lang.String[] extensions,
java.lang.String[] ignoredExtensions,
java.lang.String outputSuffix,
boolean isLibtool,
CommandLineLinker libtoolLinker)
Creates a comand line linker invocation |
Method Summary | |
protected abstract void |
addBase(long base,
java.util.Vector args)
|
protected abstract void |
addFixed(java.lang.Boolean fixed,
java.util.Vector args)
|
protected abstract void |
addImpliedArgs(boolean debug,
LinkType linkType,
java.util.Vector args)
|
protected abstract void |
addIncremental(boolean incremental,
java.util.Vector args)
|
protected java.lang.String[] |
addLibrarySets(CCTask task,
LibrarySet[] libsets,
java.util.Vector preargs,
java.util.Vector midargs,
java.util.Vector endargs)
|
protected abstract void |
addMap(boolean map,
java.util.Vector args)
|
protected abstract void |
addStack(int stack,
java.util.Vector args)
|
protected LinkerConfiguration |
createConfiguration(CCTask task,
LinkType linkType,
ProcessorDef[] baseDefs,
LinkerDef specificDef)
|
protected java.lang.String |
decorateLinkerOption(java.lang.StringBuffer buf,
java.lang.String arg)
Allows drived linker to decorate linker option. |
protected java.lang.String |
getCommand()
|
protected abstract java.lang.String |
getCommandFileSwitch(java.lang.String commandFile)
|
java.lang.String |
getIdentifier()
Retrieve an identifier that identifies the specific version of the compiler. |
CommandLineLinker |
getLibtoolLinker()
|
protected abstract int |
getMaximumCommandLength()
|
java.lang.String |
getOutputFileName(java.lang.String baseName)
Output file name (no path components) corresponding to source file |
protected java.lang.String[] |
getOutputFileSwitch(CCTask task,
java.lang.String outputFile)
|
protected abstract java.lang.String[] |
getOutputFileSwitch(java.lang.String outputFile)
|
protected java.lang.String |
getStartupObject(LinkType linkType)
|
void |
link(CCTask task,
java.io.File outputFile,
java.lang.String[] sourceFiles,
CommandLineLinkerConfiguration config)
Performs a link using a command line linker |
protected java.lang.String[] |
prepareArguments(CCTask task,
java.lang.String outputDir,
java.lang.String outputFile,
java.lang.String[] sourceFiles,
CommandLineLinkerConfiguration config)
Prepares argument list for exec command. |
protected java.lang.String |
prepareFilename(java.lang.StringBuffer buf,
java.lang.String outputDir,
java.lang.String sourceFile)
Processes filename into argument form |
protected java.lang.String[] |
prepareResponseFile(java.io.File outputFile,
java.lang.String[] args)
Prepares argument list to execute the linker using a response file. |
protected java.lang.String |
quoteFilename(java.lang.StringBuffer buf,
java.lang.String filename)
|
protected int |
runCommand(CCTask task,
java.io.File workingDir,
java.lang.String[] cmdline)
This method is exposed so test classes can overload and test the arguments without actually spawning the compiler |
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker |
bid,
createConfiguration,
getLibraryKey |
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor |
getIdentifier,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public CommandLineLinker(java.lang.String command, java.lang.String identifierArg, java.lang.String[] extensions, java.lang.String[] ignoredExtensions, java.lang.String outputSuffix, boolean isLibtool, CommandLineLinker libtoolLinker)
Method Detail |
protected final java.lang.String getCommand()
protected abstract void addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)
protected abstract void addFixed(java.lang.Boolean fixed, java.util.Vector args)
protected abstract void addMap(boolean map, java.util.Vector args)
protected abstract void addIncremental(boolean incremental, java.util.Vector args)
protected abstract void addBase(long base, java.util.Vector args)
protected abstract void addStack(int stack, java.util.Vector args)
protected java.lang.String[] getOutputFileSwitch(CCTask task, java.lang.String outputFile)
protected abstract java.lang.String[] getOutputFileSwitch(java.lang.String outputFile)
protected abstract int getMaximumCommandLength()
protected abstract java.lang.String getCommandFileSwitch(java.lang.String commandFile)
public final CommandLineLinker getLibtoolLinker()
protected java.lang.String getStartupObject(LinkType linkType)
protected java.lang.String[] addLibrarySets(CCTask task, LibrarySet[] libsets, java.util.Vector preargs, java.util.Vector midargs, java.util.Vector endargs)
public java.lang.String getOutputFileName(java.lang.String baseName)
inputFile
- input fileprotected LinkerConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseDefs, LinkerDef specificDef)
protected java.lang.String quoteFilename(java.lang.StringBuffer buf, java.lang.String filename)
protected java.lang.String[] prepareArguments(CCTask task, java.lang.String outputDir, java.lang.String outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config)
outputFile
- linker output filesourceFiles
- linker input files (.obj, .o, .res)args
- linker argumentsprotected java.lang.String prepareFilename(java.lang.StringBuffer buf, java.lang.String outputDir, java.lang.String sourceFile)
protected java.lang.String[] prepareResponseFile(java.io.File outputFile, java.lang.String[] args) throws java.io.IOException
outputFile
- linker output fileargs
- output of prepareArgumentsprotected java.lang.String decorateLinkerOption(java.lang.StringBuffer buf, java.lang.String arg)
buf
- buffer that may be used and abused in the decoration process,
must not be null.arg
- linker argumentpublic void link(CCTask task, java.io.File outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config) throws org.apache.tools.ant.BuildException
protected int runCommand(CCTask task, java.io.File workingDir, java.lang.String[] cmdline) throws org.apache.tools.ant.BuildException
public java.lang.String getIdentifier()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |