Class GccCCompiler
- java.lang.Object
-
public final class GccCCompiler extends GccCompatibleCCompiler
Adapter for the GCC C/C++ compiler
-
-
Field Summary
Fields Modifier and Type Field Description private static GccCCompilercppInstanceprivate static GccCCompilerg77Instanceprivate static GccCCompilergppInstanceprivate static java.lang.String[]headerExtensionsprivate java.lang.Stringidentifierprivate java.io.File[]includePathprivate static GccCCompilerinstanceprivate booleanisPICMeaningfulprivate static java.lang.String[]sourceExtensions-
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
-
-
Constructor Summary
Constructors Modifier Constructor Description privateGccCCompiler(java.lang.String command, java.lang.String[] sourceExtensions, java.lang.String[] headerExtensions, boolean isLibtool, GccCCompiler libtoolCompiler, boolean newEnvironment, org.apache.tools.ant.types.Environment env)Private constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImpliedArgs(java.util.Vector args, boolean debug, boolean multithreaded, boolean exceptions, LinkType linkType, java.lang.Boolean rtti, OptimizationEnum optimization)ProcessorchangeEnvironment(boolean newEnvironment, org.apache.tools.ant.types.Environment env)protected java.lang.Objectclone()voidcompile(CCTask task, java.io.File outputDir, java.lang.String[] sourceFiles, java.lang.String[] args, java.lang.String[] endArgs, boolean relentless, CommandLineCompilerConfiguration config, ProgressMonitor monitor)Compiles a source file.protected ParsercreateParser(java.io.File source)Create parser to determine dependencies.static GccCCompilergetCppInstance()Gets c++ adapterjava.io.File[]getEnvironmentIncludePath()static GccCCompilergetG77Instance()Gets g77 adapterstatic GccCCompilergetGppInstance()Gets gpp adapterjava.lang.StringgetIdentifier()Retrieve an identifier that identifies the specific version of the compiler.static GccCCompilergetInstance()Gets gcc adapterLinkergetLinker(LinkType linkType)Gets the linker that is associated with this processorsintgetMaximumCommandLength()private voidsupercompile(CCTask task, java.io.File outputDir, java.lang.String[] sourceFiles, java.lang.String[] args, java.lang.String[] endArgs, boolean relentless, CommandLineCompilerConfiguration config, ProgressMonitor monitor)-
Methods inherited from class net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler
addIncludePath, addWarningSwitch, getDefineSwitch, getIncludeDirSwitch, getUndefineSwitch
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler
addIncludes, buildDefineArguments, createConfiguration, getArgumentCountPerInputFile, getCommand, getInputFileArgument, getLibtool, getLibtoolCompiler, getMaximumInputFilesPerCommand, getTotalArgumentLengthForInputFile, runCommand, setCommand
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
canParse, createConfiguration, getBaseOutputName, getOutputFileNames, parseIncludes, resolveInclude
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
bid, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
-
-
-
-
Field Detail
-
headerExtensions
private static final java.lang.String[] headerExtensions
-
sourceExtensions
private static final java.lang.String[] sourceExtensions
-
cppInstance
private static final GccCCompiler cppInstance
-
g77Instance
private static final GccCCompiler g77Instance
-
gppInstance
private static final GccCCompiler gppInstance
-
instance
private static final GccCCompiler instance
-
identifier
private java.lang.String identifier
-
includePath
private java.io.File[] includePath
-
isPICMeaningful
private boolean isPICMeaningful
-
-
Constructor Detail
-
GccCCompiler
private GccCCompiler(java.lang.String command, java.lang.String[] sourceExtensions, java.lang.String[] headerExtensions, boolean isLibtool, GccCCompiler libtoolCompiler, boolean newEnvironment, org.apache.tools.ant.types.Environment env)Private constructor. Use GccCCompiler.getInstance() to get singleton instance of this class.
-
-
Method Detail
-
getCppInstance
public static GccCCompiler getCppInstance()
Gets c++ adapter
-
getG77Instance
public static GccCCompiler getG77Instance()
Gets g77 adapter
-
getGppInstance
public static GccCCompiler getGppInstance()
Gets gpp adapter
-
getInstance
public static GccCCompiler getInstance()
Gets gcc adapter
-
addImpliedArgs
public void addImpliedArgs(java.util.Vector args, boolean debug, boolean multithreaded, boolean exceptions, LinkType linkType, java.lang.Boolean rtti, OptimizationEnum optimization)- Overrides:
addImpliedArgsin classGccCompatibleCCompiler
-
changeEnvironment
public Processor changeEnvironment(boolean newEnvironment, org.apache.tools.ant.types.Environment env)
- Specified by:
changeEnvironmentin interfaceProcessor- Overrides:
changeEnvironmentin classAbstractProcessor
-
clone
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classAbstractProcessor- Throws:
java.lang.CloneNotSupportedException
-
compile
public void compile(CCTask task, java.io.File outputDir, java.lang.String[] sourceFiles, java.lang.String[] args, java.lang.String[] endArgs, boolean relentless, CommandLineCompilerConfiguration config, ProgressMonitor monitor) throws org.apache.tools.ant.BuildException
Description copied from class:CommandLineCompilerCompiles a source file.- Overrides:
compilein classCommandLineCompiler- Throws:
org.apache.tools.ant.BuildException
-
createParser
protected Parser createParser(java.io.File source)
Create parser to determine dependencies. Will create appropriate parser (C++, FORTRAN) based on file extension.- Overrides:
createParserin classCommandLineCCompiler
-
getEnvironmentIncludePath
public java.io.File[] getEnvironmentIncludePath()
- Overrides:
getEnvironmentIncludePathin classGccCompatibleCCompiler
-
getIdentifier
public java.lang.String getIdentifier() throws org.apache.tools.ant.BuildExceptionDescription 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 classCommandLineCompiler- Throws:
org.apache.tools.ant.BuildException
-
getLinker
public Linker getLinker(LinkType linkType)
Description copied from interface:ProcessorGets the linker that is associated with this processors
-
getMaximumCommandLength
public int getMaximumCommandLength()
- Specified by:
getMaximumCommandLengthin classCommandLineCompiler
-
supercompile
private void supercompile(CCTask task, java.io.File outputDir, java.lang.String[] sourceFiles, java.lang.String[] args, java.lang.String[] endArgs, boolean relentless, CommandLineCompilerConfiguration config, ProgressMonitor monitor) throws org.apache.tools.ant.BuildException
- Throws:
org.apache.tools.ant.BuildException
-
-