public abstract class CommandLineLinker extends AbstractLinker
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
构造器和说明 |
---|
CommandLineLinker(String command,
String identifierArg,
String[] extensions,
String[] ignoredExtensions,
String outputSuffix,
boolean isLibtool,
CommandLineLinker libtoolLinker)
Creates a comand line linker invocation
|
限定符和类型 | 方法和说明 |
---|---|
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, getLibraryKey
clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, isWindows, toString
getLibraryPath, getLibraryPatterns, getLinker, isCaseSensitive
protected 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
在类中 AbstractLinker
protected 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()
Processor
getIdentifier
在接口中 Processor
getIdentifier
在类中 AbstractProcessor
public final CommandLineLinker getLibtoolLinker()
protected abstract int getMaximumCommandLength()
public String[] getOutputFileNames(String baseName, VersionInfo versionInfo)
Processor
getOutputFileNames
在接口中 Processor
getOutputFileNames
在类中 AbstractLinker
baseName
- input filepublic void link(CCTask task, File outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
protected 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 prepareArgumentsIOException
protected 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.BuildException
protected final void setCommand(String command)
Copyright © 2005-2017 NAR Maven Plugin developers. All Rights Reserved.