net.sf.antcontrib.cpptasks.compiler
public abstract class CommandLineLinker extends AbstractLinker
Constructor Summary | |
---|---|
CommandLineLinker(String command, String identifierArg, String[] extensions, String[] ignoredExtensions, String outputSuffix, boolean isLibtool, CommandLineLinker libtoolLinker) Creates a comand line linker invocation |
Method Summary | |
---|---|
protected abstract void | addBase(long base, Vector args) |
protected abstract void | addEntry(String entry, Vector args) |
protected abstract void | addFixed(Boolean fixed, Vector args) |
protected abstract void | addImpliedArgs(boolean debug, LinkType linkType, Vector args) |
protected abstract void | addIncremental(boolean incremental, Vector args) |
protected String[] | addLibrarySets(CCTask task, LibrarySet[] libsets, Vector preargs, Vector midargs, Vector endargs) |
protected abstract void | addMap(boolean map, Vector args) |
protected abstract void | addStack(int stack, Vector args) |
protected LinkerConfiguration | createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseDefs, LinkerDef specificDef, TargetDef targetPlatform, VersionInfo versionInfo) |
protected String | decorateLinkerOption(StringBuffer buf, String arg)
Allows drived linker to decorate linker option.
|
protected String | getCommand() |
protected abstract String | getCommandFileSwitch(String commandFile) |
String | getIdentifier() |
CommandLineLinker | getLibtoolLinker() |
protected abstract int | getMaximumCommandLength() |
String[] | getOutputFileNames(String baseName, VersionInfo versionInfo) |
protected String[] | getOutputFileSwitch(CCTask task, String outputFile) |
protected abstract String[] | getOutputFileSwitch(String outputFile) |
protected String | getStartupObject(LinkType linkType) |
void | link(CCTask task, File outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config)
Performs a link using a command line linker
|
protected String[] | prepareArguments(CCTask task, String outputDir, String outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config)
Prepares argument list for exec command. |
protected String | prepareFilename(StringBuffer buf, String outputDir, String sourceFile)
Processes filename into argument form
|
protected String[] | prepareResponseFile(File outputFile, String[] args)
Prepares argument list to execute the linker using a
response file.
|
protected String | quoteFilename(StringBuffer buf, String filename) |
protected int | runCommand(CCTask task, File workingDir, String[] cmdline)
This method is exposed so test classes can overload
and test the arguments without actually spawning the
compiler |
protected void | setCommand(String command) |
Parameters: buf buffer that may be used and abused in the decoration process, must not be null. arg linker argument
Parameters: task compilation task. outputFile linker output file sourceFiles linker input files (.obj, .o, .res) config linker configuration
Returns: arguments for runTask
Parameters: outputFile linker output file args output of prepareArguments
Returns: arguments for runTask