net.sf.antcontrib.cpptasks.borland

Class BorlandLinker

Implemented Interfaces:
Cloneable, Linker, Processor

public final class BorlandLinker
extends CommandLineLinker

Adapter for the Borland(r) ilink32 linker
Author:
Curt Arnold

Field Summary

Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID

Method Summary

protected void
addBase(long base, Vector args)
protected void
addEntry(String entry, Vector args)
protected void
addFixed(Boolean fixed, Vector args)
protected void
addImpliedArgs(boolean debug, LinkType linkType, Vector args)
protected void
addIncremental(boolean incremental, Vector args)
protected void
addMap(boolean map, Vector args)
protected void
addStack(int stack, Vector args)
void
addVersionFiles(VersionInfo versionInfo, LinkType linkType, File outputFile, boolean isDebug, File objDir, TargetMatcher matcher)
Adds source or object files to the bidded fileset to support version information.
String
getCommandFileSwitch(String commandFile)
String
getIdentifier()
static BorlandLinker
getInstance()
File[]
getLibraryPath()
String[]
getLibraryPatterns(String[] libnames, LibraryTypeEnum libType)
Linker
getLinker(LinkType type)
int
getMaximumCommandLength()
String[]
getOutputFileSwitch(String outFile)
protected String
getStartupObject(LinkType linkType)
boolean
isCaseSensitive()
protected String[]
prepareArguments(CCTask task, String outputDir, String outputName, String[] sourceFiles, CommandLineLinkerConfiguration config)
Prepares argument list for exec command.
protected String[]
prepareResponseFile(File outputFile, String[] args)
Prepares argument list to execute the linker using a response file.

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker

addBase, addEntry, addFixed, addImpliedArgs, addIncremental, addLibrarySets, addMap, addStack, createConfiguration, decorateLinkerOption, getCommand, getCommandFileSwitch, getIdentifier, getLibtoolLinker, getMaximumCommandLength, getOutputFileNames, getOutputFileSwitch, getOutputFileSwitch, getStartupObject, link, prepareArguments, prepareFilename, prepareResponseFile, quoteFilename, runCommand, setCommand

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker

addVersionFiles, bid, changeEnvironment, createConfiguration, createConfiguration, getLibraryKey, getOutputFileNames

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString

Method Details

addBase

protected void addBase(long base,
                       Vector args)
Overrides:
addBase in interface CommandLineLinker

addEntry

protected void addEntry(String entry,
                        Vector args)
Overrides:
addEntry in interface CommandLineLinker

addFixed

protected void addFixed(Boolean fixed,
                        Vector args)
Overrides:
addFixed in interface CommandLineLinker

addImpliedArgs

protected void addImpliedArgs(boolean debug,
                              LinkType linkType,
                              Vector args)
Overrides:
addImpliedArgs in interface CommandLineLinker

addIncremental

protected void addIncremental(boolean incremental,
                              Vector args)
Overrides:
addIncremental in interface CommandLineLinker

addMap

protected void addMap(boolean map,
                      Vector args)
Overrides:
addMap in interface CommandLineLinker

addStack

protected void addStack(int stack,
                        Vector args)
Overrides:
addStack in interface CommandLineLinker

addVersionFiles

public void addVersionFiles(VersionInfo versionInfo,
                            LinkType linkType,
                            File outputFile,
                            boolean isDebug,
                            File objDir,
                            TargetMatcher matcher)
            throws IOException
Adds source or object files to the bidded fileset to support version information.
Specified by:
addVersionFiles in interface Linker
Overrides:
addVersionFiles in interface AbstractLinker
Parameters:
versionInfo - version information
linkType - link type
isDebug - true if debug build
objDir - directory for generated files
matcher - bidded fileset

getCommandFileSwitch

public String getCommandFileSwitch(String commandFile)
Overrides:
getCommandFileSwitch in interface CommandLineLinker

getIdentifier

public String getIdentifier()
Specified by:
getIdentifier in interface Processor
Overrides:
getIdentifier in interface CommandLineLinker

getInstance

public static BorlandLinker getInstance()

getLibraryPath

public File[] getLibraryPath()
Specified by:
getLibraryPath in interface Linker

getLibraryPatterns

public String[] getLibraryPatterns(String[] libnames,
                                   LibraryTypeEnum libType)
Specified by:
getLibraryPatterns in interface Linker

getLinker

public Linker getLinker(LinkType type)
Specified by:
getLinker in interface Linker
getLinker in interface Processor

getMaximumCommandLength

public int getMaximumCommandLength()
Overrides:
getMaximumCommandLength in interface CommandLineLinker

getOutputFileSwitch

public String[] getOutputFileSwitch(String outFile)
Overrides:
getOutputFileSwitch in interface CommandLineLinker

getStartupObject

protected String getStartupObject(LinkType linkType)
Overrides:
getStartupObject in interface CommandLineLinker

isCaseSensitive

public boolean isCaseSensitive()
Specified by:
isCaseSensitive in interface Linker

prepareArguments

protected String[] prepareArguments(CCTask task,
                                    String outputDir,
                                    String outputName,
                                    String[] sourceFiles,
                                    CommandLineLinkerConfiguration config)
Prepares argument list for exec command.
Overrides:
prepareArguments in interface CommandLineLinker
Parameters:
sourceFiles - linker input files (.obj, .o, .res)
Returns:
arguments for runTask

prepareResponseFile

protected String[] prepareResponseFile(File outputFile,
                                       String[] args)
            throws IOException
Prepares argument list to execute the linker using a response file.
Overrides:
prepareResponseFile in interface CommandLineLinker
Parameters:
outputFile - linker output file
args - output of prepareArguments
Returns:
arguments for runTask

Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.