Class BorlandLinker
- java.lang.Object
-
- net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
-
- net.sf.antcontrib.cpptasks.compiler.AbstractLinker
-
- net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
-
- net.sf.antcontrib.cpptasks.borland.BorlandLinker
-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBase(long base, java.util.Vector args)protected voidaddEntry(java.lang.String entry, java.util.Vector args)protected voidaddFixed(java.lang.Boolean fixed, java.util.Vector args)protected voidaddImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)protected voidaddIncremental(boolean incremental, java.util.Vector args)protected voidaddMap(boolean map, java.util.Vector args)protected voidaddStack(int stack, java.util.Vector args)voidaddVersionFiles(VersionInfo versionInfo, LinkType linkType, java.io.File outputFile, boolean isDebug, java.io.File objDir, TargetMatcher matcher)Adds source or object files to the bidded fileset to support version information.java.lang.StringgetCommandFileSwitch(java.lang.String commandFile)java.lang.StringgetIdentifier()Retrieve an identifier that identifies the specific version of the compiler.static BorlandLinkergetInstance()java.io.File[]getLibraryPath()returns the library path for the linkerjava.lang.String[]getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)Returns a set of filename patterns corresponding to library names.LinkergetLinker(LinkType type)Gets the linker for the specified link type.intgetMaximumCommandLength()java.lang.String[]getOutputFileSwitch(java.lang.String outFile)protected java.lang.StringgetStartupObject(LinkType linkType)booleanisCaseSensitive()Returns true if the linker is case-sensitiveprotected java.lang.String[]prepareArguments(CCTask task, java.lang.String outputDir, java.lang.String outputName, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config)Prepares argument list for exec command.protected java.lang.String[]prepareResponseFile(java.io.File outputFile, java.lang.String[] args)Prepares argument list to execute the linker using a response file.-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
addLibrarySets, createConfiguration, decorateLinkerOption, getCommand, getLibtoolLinker, getOutputFileNames, getOutputFileSwitch, link, prepareFilename, quoteFilename, runCommand, setCommand
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker
bid, changeEnvironment, createConfiguration, getLibraryKey
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
-
-
-
-
Method Detail
-
getInstance
public static BorlandLinker getInstance()
-
addBase
protected void addBase(long base, java.util.Vector args)- Specified by:
addBasein classCommandLineLinker
-
addFixed
protected void addFixed(java.lang.Boolean fixed, java.util.Vector args)- Specified by:
addFixedin classCommandLineLinker
-
addImpliedArgs
protected void addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)- Specified by:
addImpliedArgsin classCommandLineLinker
-
addIncremental
protected void addIncremental(boolean incremental, java.util.Vector args)- Specified by:
addIncrementalin classCommandLineLinker
-
addMap
protected void addMap(boolean map, java.util.Vector args)- Specified by:
addMapin classCommandLineLinker
-
addStack
protected void addStack(int stack, java.util.Vector args)- Specified by:
addStackin classCommandLineLinker
-
addEntry
protected void addEntry(java.lang.String entry, java.util.Vector args)- Specified by:
addEntryin classCommandLineLinker
-
getCommandFileSwitch
public java.lang.String getCommandFileSwitch(java.lang.String commandFile)
- Specified by:
getCommandFileSwitchin classCommandLineLinker
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:ProcessorRetrieve 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.- Specified by:
getIdentifierin interfaceProcessor- Overrides:
getIdentifierin classCommandLineLinker
-
getLibraryPath
public java.io.File[] getLibraryPath()
Description copied from interface:Linkerreturns the library path for the linker
-
getLibraryPatterns
public java.lang.String[] getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)Description copied from interface:LinkerReturns a set of filename patterns corresponding to library names. For example, "advapi32" would be expanded to "advapi32.dll" by DevStudioLinker and to "libadvapi32.a" and "libadvapi32.so" by GccLinker.- Parameters:
libnames- array of library names
-
getLinker
public Linker getLinker(LinkType type)
Description copied from interface:LinkerGets the linker for the specified link type.- Returns:
- appropriate linker or null, will return this if this linker can handle the specified link type
-
getMaximumCommandLength
public int getMaximumCommandLength()
- Specified by:
getMaximumCommandLengthin classCommandLineLinker
-
getOutputFileSwitch
public java.lang.String[] getOutputFileSwitch(java.lang.String outFile)
- Specified by:
getOutputFileSwitchin classCommandLineLinker
-
getStartupObject
protected java.lang.String getStartupObject(LinkType linkType)
- Overrides:
getStartupObjectin classCommandLineLinker
-
isCaseSensitive
public boolean isCaseSensitive()
Description copied from interface:LinkerReturns true if the linker is case-sensitive
-
prepareArguments
protected java.lang.String[] prepareArguments(CCTask task, java.lang.String outputDir, java.lang.String outputName, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config)
Prepares argument list for exec command.- Overrides:
prepareArgumentsin classCommandLineLinker- Parameters:
outputDir- linker output directoryoutputName- linker output namesourceFiles- linker input files (.obj, .o, .res)config- linker configurationtask- compilation task.- Returns:
- arguments for runTask
-
prepareResponseFile
protected java.lang.String[] prepareResponseFile(java.io.File outputFile, java.lang.String[] args) throws java.io.IOExceptionPrepares argument list to execute the linker using a response file.- Overrides:
prepareResponseFilein classCommandLineLinker- Parameters:
outputFile- linker output fileargs- output of prepareArguments- Returns:
- arguments for runTask
- Throws:
java.io.IOException
-
addVersionFiles
public void addVersionFiles(VersionInfo versionInfo, LinkType linkType, java.io.File outputFile, boolean isDebug, java.io.File objDir, TargetMatcher matcher) throws java.io.IOException
Adds source or object files to the bidded fileset to support version information.- Specified by:
addVersionFilesin interfaceLinker- Overrides:
addVersionFilesin classAbstractLinker- Parameters:
versionInfo- version informationlinkType- link typeisDebug- true if debug buildoutputFile- name of generated executableobjDir- directory for generated filesmatcher- bidded fileset- Throws:
java.io.IOException
-
-