net.sf.antcontrib.cpptasks
Class LinkerDef

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.types.DataType
              |
              +--net.sf.antcontrib.cpptasks.ProcessorDef
                    |
                    +--net.sf.antcontrib.cpptasks.LinkerDef

public class LinkerDef
extends ProcessorDef

A linker definition. linker elements may be placed either as children of a cc element or the project element. A linker element with an id attribute may be referenced by linker elements with refid or extends attributes.

Author:
Adam Murdoch, Curt Arnold

Fields inherited from class org.apache.tools.ant.types.DataType
checked, description, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
LinkerDef()
           
 
Method Summary
 void addConfiguredLinkerArg(LinkerArgument arg)
          Adds a linker command-line arg.
 void addLibset(LibrarySet libset)
          Adds a system library set.
 void addSyslibset(SystemLibrarySet libset)
          Adds a system library set.
 ProcessorConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef baseDef)
          Creates a configuration
 void execute()
           
 LibrarySet[] getActiveLibrarySets(LinkerDef[] defaultProviders, int index)
          Returns an array of active library sets for this linker definition.
 LibrarySet[] getActiveSystemLibrarySets(LinkerDef[] defaultProviders, int index)
          Returns an array of active library sets for this linker definition.
 LibrarySet[] getActiveUserLibrarySets(LinkerDef[] defaultProviders, int index)
          Returns an array of active library sets for this linker definition.
 long getBase(LinkerDef[] defaultProviders, int index)
           
 java.lang.Boolean getFixed(LinkerDef[] defaultProviders, int index)
           
 boolean getIncremental(LinkerDef[] defaultProviders, int index)
           
 boolean getMap(LinkerDef[] defaultProviders, int index)
           
 Processor getProcessor()
          Obtains the appropriate processor (compiler, linker)
 int getStack(LinkerDef[] defaultProviders, int index)
           
 void setBase(FlexLong base)
          Sets the base address.
 void setEntry(java.lang.String entry)
          Sets the starting address.
 void setFixed(boolean fixed)
          If true, marks the file to be loaded only at its preferred address.
 void setIncremental(boolean incremental)
          If true, allows incremental linking.
 void setMap(boolean map)
          If set to true, a map file will be produced.
 void setName(LinkerEnum name)
          Sets linker type.
protected  void setProcessor(Processor proc)
          Sets the processor
 void setStack(org.apache.tools.ant.types.FlexInteger stack)
          Sets stack size in bytes.
 void visitSystemLibraries(Linker linker, FileVisitor libraryVisitor)
           
 void visitUserLibraries(Linker linker, FileVisitor libraryVisitor)
           
 
Methods inherited from class net.sf.antcontrib.cpptasks.ProcessorDef
addConfiguredProcessorArg, addFileset, booleanValueOf, getActiveProcessorArgs, getDebug, getDefaultProviders, getExtends, getInherit, getLibtool, getRebuild, hasFileSets, isActive, setClassname, setDebug, setDescription, setExtends, setId, setIf, setInherit, setLibtool, setRebuild, setRefid, setUnless, visitFiles
 
Methods inherited from class org.apache.tools.ant.types.DataType
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, tooManyAttributes
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkerDef

public LinkerDef()
Method Detail

setName

public void setName(LinkerEnum name)
             throws org.apache.tools.ant.BuildException
Sets linker type. Supported linkers
gccGcc Linker
ldLd Linker
arGcc Librarian
msvcMicrosoft Linker
bccBorland Linker
dfCompaq Visual Fortran Linker
iclIntel Linker for Windows (IA-32)
eclIntel Linker for Windows (IA-64)
iccIntel Linker for Linux (IA-32)
eccIntel Linker for Linux (IA-64)
CCSun ONE Linker
aCCHP aC++ Linker
os390OS390 Linker
os390batchOS390 Linker
os400IccLinker
sunc89C89 Linker
xlCVisualAge Linker

setProcessor

protected void setProcessor(Processor proc)
                     throws org.apache.tools.ant.BuildException
Description copied from class: ProcessorDef
Sets the processor
Overrides:
setProcessor in class ProcessorDef
Tags copied from class: ProcessorDef
Parameters:
processor - processor, may not be null.
Throws:
org.apache.tools.ant.BuildException - if ProcessorDef is a reference
java.lang.NullPointerException - if processor is null

addConfiguredLinkerArg

public void addConfiguredLinkerArg(LinkerArgument arg)
Adds a linker command-line arg.

addSyslibset

public void addSyslibset(SystemLibrarySet libset)
Adds a system library set.

addLibset

public void addLibset(LibrarySet libset)
Adds a system library set.

getProcessor

public Processor getProcessor()
Description copied from class: ProcessorDef
Obtains the appropriate processor (compiler, linker)
Overrides:
getProcessor in class ProcessorDef
Tags copied from class: ProcessorDef
Returns:
processor

setBase

public void setBase(FlexLong base)
Sets the base address. May be specified in either decimal or hex.
Parameters:
base - base address

getBase

public long getBase(LinkerDef[] defaultProviders,
                    int index)

setStack

public void setStack(org.apache.tools.ant.types.FlexInteger stack)
Sets stack size in bytes.

getStack

public int getStack(LinkerDef[] defaultProviders,
                    int index)

setMap

public void setMap(boolean map)
If set to true, a map file will be produced.

setIncremental

public void setIncremental(boolean incremental)
If true, allows incremental linking.

setFixed

public void setFixed(boolean fixed)
If true, marks the file to be loaded only at its preferred address.

setEntry

public void setEntry(java.lang.String entry)
Sets the starting address.
Parameters:
name - function name

getFixed

public java.lang.Boolean getFixed(LinkerDef[] defaultProviders,
                                  int index)

getMap

public boolean getMap(LinkerDef[] defaultProviders,
                      int index)

getIncremental

public boolean getIncremental(LinkerDef[] defaultProviders,
                              int index)

getActiveLibrarySets

public LibrarySet[] getActiveLibrarySets(LinkerDef[] defaultProviders,
                                         int index)
Returns an array of active library sets for this linker definition.

getActiveUserLibrarySets

public LibrarySet[] getActiveUserLibrarySets(LinkerDef[] defaultProviders,
                                             int index)
Returns an array of active library sets for this linker definition.

getActiveSystemLibrarySets

public LibrarySet[] getActiveSystemLibrarySets(LinkerDef[] defaultProviders,
                                               int index)
Returns an array of active library sets for this linker definition.

visitUserLibraries

public void visitUserLibraries(Linker linker,
                               FileVisitor libraryVisitor)

visitSystemLibraries

public void visitSystemLibraries(Linker linker,
                                 FileVisitor libraryVisitor)

createConfiguration

public ProcessorConfiguration createConfiguration(CCTask task,
                                                  LinkType linkType,
                                                  ProcessorDef baseDef)
Description copied from class: ProcessorDef
Creates a configuration
Overrides:
createConfiguration in class ProcessorDef
Tags copied from class: ProcessorDef
Parameters:
baseDef - reference to def from containing element, may be null
Returns:
configuration

execute

public void execute()
             throws org.apache.tools.ant.BuildException


Copyright © 2001-2002 Ant-Contrib project. All Rights Reserved.