public abstract class CommandLineLinker extends AbstractLinker
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID| Constructor and Description |
|---|
CommandLineLinker(String command,
String identifierArg,
String[] extensions,
String[] ignoredExtensions,
String outputSuffix,
boolean isLibtool,
CommandLineLinker libtoolLinker)
Creates a comand line linker invocation
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBase(CCTask task,
long base,
Vector<String> args) |
protected void |
addEntry(CCTask task,
String entry,
Vector<String> args) |
protected void |
addFixed(CCTask task,
Boolean fixed,
Vector<String> args) |
protected void |
addImpliedArgs(CCTask task,
boolean debug,
LinkType linkType,
Vector<String> args) |
protected void |
addIncremental(CCTask task,
boolean incremental,
Vector<String> args) |
protected void |
addLibraryDirectory(File libraryDirectory,
Vector<String> preargs) |
protected void |
addLibraryPath(Vector<String> preargs,
String path) |
protected String[] |
addLibrarySets(CCTask task,
LibrarySet[] libsets,
Vector<String> preargs,
Vector<String> midargs,
Vector<String> endargs) |
protected void |
addMap(CCTask task,
boolean map,
Vector<String> args) |
protected void |
addStack(CCTask task,
int stack,
Vector<String> 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 |
getCommandWithPath(CommandLineLinkerConfiguration config) |
String |
getIdentifier()
Retrieve an identifier that identifies the specific version of the
compiler.
|
CommandLineLinker |
getLibtoolLinker() |
protected abstract int |
getMaximumCommandLength() |
String[] |
getOutputFileNames(String baseName,
VersionInfo versionInfo)
Output file name (no path components) corresponding to source file
|
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) |
addVersionFiles, bid, changeEnvironment, createConfiguration, getLibraryKeyclone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, isWindows, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLibraryPath, getLibraryPatterns, getLinker, isCaseSensitiveprotected void addImpliedArgs(CCTask task, boolean debug, LinkType linkType, Vector<String> args)
protected void addLibraryDirectory(File libraryDirectory, Vector<String> preargs)
protected String[] addLibrarySets(CCTask task, LibrarySet[] libsets, Vector<String> preargs, Vector<String> midargs, Vector<String> endargs)
protected LinkerConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseDefs, LinkerDef specificDef, TargetDef targetPlatform, VersionInfo versionInfo)
createConfiguration in class AbstractLinkerprotected String decorateLinkerOption(StringBuffer buf, String arg)
buf - buffer that may be used and abused in the decoration process,
must not be null.arg - linker argumentprotected final String getCommand()
public String getCommandWithPath(CommandLineLinkerConfiguration config)
public String getIdentifier()
ProcessorgetIdentifier in interface ProcessorgetIdentifier in class AbstractProcessorpublic final CommandLineLinker getLibtoolLinker()
protected abstract int getMaximumCommandLength()
public String[] getOutputFileNames(String baseName, VersionInfo versionInfo)
ProcessorgetOutputFileNames in interface ProcessorgetOutputFileNames in class AbstractLinkerbaseName - input filepublic void link(CCTask task, File outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildExceptionprotected String[] prepareArguments(CCTask task, String outputDir, String outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config)
task - compilation task.outputFile - linker output filesourceFiles - linker input files (.obj, .o, .res)config - linker configurationprotected String prepareFilename(StringBuffer buf, String outputDir, String sourceFile)
protected String[] prepareResponseFile(File outputFile, String[] args) throws IOException
outputFile - linker output fileargs - output of prepareArgumentsIOExceptionprotected String quoteFilename(StringBuffer buf, String filename)
protected int runCommand(CCTask task, File workingDir, String[] cmdline) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildExceptionprotected final void setCommand(String command)
Copyright © 2005-2016 NAR Maven Plugin developers. All Rights Reserved.