An abstract Linker implementation that performs the link via an external
command.
addBase
protected abstract void addBase(long base,
Vector args)
addEntry
protected abstract void addEntry(String entry,
Vector args)
addFixed
protected abstract void addFixed(Boolean fixed,
Vector args)
addImpliedArgs
protected abstract void addImpliedArgs(boolean debug,
LinkType linkType,
Vector args)
addIncremental
protected abstract void addIncremental(boolean incremental,
Vector args)
addLibrarySets
protected String[] addLibrarySets(CCTask task,
LibrarySet[] libsets,
Vector preargs,
Vector midargs,
Vector endargs)
addMap
protected abstract void addMap(boolean map,
Vector args)
addStack
protected abstract void addStack(int stack,
Vector args)
decorateLinkerOption
protected 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.
buf
- buffer that may be used and abused in the decoration process,
must not be null.arg
- linker argument
getCommand
protected final String getCommand()
getCommandFileSwitch
protected abstract String getCommandFileSwitch(String commandFile)
getIdentifier
public String getIdentifier()
Retrieve an identifier that identifies the specific version of the
compiler. Compilers with the same identifier should produce the same
output files for the same input files and command line switches.
- getIdentifier in interface Processor
- getIdentifier in interface AbstractProcessor
getMaximumCommandLength
protected abstract int getMaximumCommandLength()
getOutputFileSwitch
protected abstract String[] getOutputFileSwitch(String outputFile)
getOutputFileSwitch
protected String[] getOutputFileSwitch(CCTask task,
String outputFile)
getStartupObject
protected String getStartupObject(LinkType linkType)
prepareArguments
protected String[] prepareArguments(CCTask task,
String outputDir,
String outputFile,
String[] sourceFiles,
CommandLineLinkerConfiguration config)
Prepares argument list for exec command. Will return null
if command line would exceed allowable command line buffer.
outputFile
- linker output filesourceFiles
- linker input files (.obj, .o, .res)
prepareFilename
protected String prepareFilename(StringBuffer buf,
String outputDir,
String sourceFile)
Processes filename into argument form
prepareResponseFile
protected String[] prepareResponseFile(File outputFile,
String[] args)
throws IOException
Prepares argument list to execute the linker using a
response file.
outputFile
- linker output fileargs
- output of prepareArguments
quoteFilename
protected String quoteFilename(StringBuffer buf,
String filename)
runCommand
protected int runCommand(CCTask task,
File workingDir,
String[] cmdline)
throws BuildException
This method is exposed so test classes can overload
and test the arguments without actually spawning the
compiler
setCommand
protected final void setCommand(String command)