Package 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
- All Implemented Interfaces:
Cloneable
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private String
private Boolean
private Boolean
private final Vector
private Boolean
private int
private final Vector
Fields inherited from class net.sf.antcontrib.cpptasks.ProcessorDef
newEnvironment
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addActiveLibrarySet
(org.apache.tools.ant.Project project, Vector libsets, Vector srcSets) private void
addActiveSystemLibrarySets
(org.apache.tools.ant.Project project, Vector libsets) private void
addActiveUserLibrarySets
(org.apache.tools.ant.Project project, Vector libsets) void
Adds a linker command-line arg.void
Adds a compiler command-line arg.void
addLibset
(LibrarySet libset) Adds a system library set.void
addSyslibset
(SystemLibrarySet libset) Adds a system library set.void
execute()
getActiveLibrarySets
(LinkerDef[] defaultProviders, int index) Returns an array of active library sets for this linker definition.getActiveSystemLibrarySets
(LinkerDef[] defaultProviders, int index) Returns an array of active library sets for this linker definition.getActiveUserLibrarySets
(LinkerDef[] defaultProviders, int index) Returns an array of active library sets for this linker definition.long
boolean
getIncremental
(LinkerDef[] defaultProviders, int index) boolean
Obtains the appropriate processor (compiler, linker)getProcessor
(LinkType linkType) Obtains the appropriate processor (compiler, linker) based on the LinkType.int
void
Sets the base address.void
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 processorvoid
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, addConfiguredProcessorParam, addEnv, addFileset, booleanValueOf, createConfiguration, getActiveProcessorArgs, getActiveProcessorParams, getDebug, getDefaultProviders, getExtends, getInherit, getLibtool, getRebuild, hasFileSets, isActive, setClassname, setDebug, setDescription, setExtends, setId, setIf, setInherit, setLibtool, setNewenvironment, setRebuild, setRefid, setUnless, visitFiles
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toString
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setLocation, setProject
-
Field Details
-
base
private long base -
entry
-
fixed
-
incremental
-
librarySets
-
map
-
stack
private int stack -
sysLibrarySets
-
-
Constructor Details
-
LinkerDef
public LinkerDef()Default constructor- See Also:
-
-
Method Details
-
addActiveLibrarySet
-
addActiveSystemLibrarySets
-
addActiveUserLibrarySets
-
addConfiguredLinkerArg
Adds a linker command-line arg. -
addConfiguredLinkerParam
Adds a compiler command-line arg. -
addLibset
Adds a system library set. -
addSyslibset
Adds a system library set. -
execute
public void execute() throws org.apache.tools.ant.BuildException- Throws:
org.apache.tools.ant.BuildException
-
getActiveLibrarySets
Returns an array of active library sets for this linker definition. -
getActiveSystemLibrarySets
Returns an array of active library sets for this linker definition. -
getActiveUserLibrarySets
Returns an array of active library sets for this linker definition. -
getBase
-
getFixed
-
getIncremental
-
getMap
-
getEntry
-
getProcessor
Description copied from class:ProcessorDef
Obtains the appropriate processor (compiler, linker)- Overrides:
getProcessor
in classProcessorDef
- Returns:
- processor
-
getProcessor
Description copied from class:ProcessorDef
Obtains the appropriate processor (compiler, linker) based on the LinkType.- Overrides:
getProcessor
in classProcessorDef
- Returns:
- processor
-
getStack
-
setBase
Sets the base address. May be specified in either decimal or hex.- Parameters:
base
- base address
-
setEntry
Sets the starting address.- Parameters:
entry
- function name
-
setFixed
public void setFixed(boolean fixed) If true, marks the file to be loaded only at its preferred address. -
setIncremental
public void setIncremental(boolean incremental) If true, allows incremental linking. -
setMap
public void setMap(boolean map) If set to true, a map file will be produced. -
setName
Sets linker type.Supported linkers
gcc Gcc Linker g++ G++ Linker ld Ld Linker ar Gcc Librarian msvc Microsoft Linker bcc Borland Linker df Compaq Visual Fortran Linker icl Intel Linker for Windows (IA-32) ecl Intel Linker for Windows (IA-64) icc Intel Linker for Linux (IA-32) ecc Intel Linker for Linux (IA-64) CC Sun ONE Linker aCC HP aC++ Linker os390 OS390 Linker os390batch OS390 Linker os400 IccLinker sunc89 C89 Linker xlC VisualAge Linker wcl OpenWatcom C/C++ linker wfl OpenWatcom FORTRAN linker - Throws:
org.apache.tools.ant.BuildException
-
setProcessor
Description copied from class:ProcessorDef
Sets the processor- Overrides:
setProcessor
in classProcessorDef
- Parameters:
proc
- processor, may not be null.- Throws:
org.apache.tools.ant.BuildException
- if ProcessorDef is a reference
-
setStack
public void setStack(org.apache.tools.ant.types.FlexInteger stack) Sets stack size in bytes. -
visitSystemLibraries
-
visitUserLibraries
-