summaryrefslogtreecommitdiff
path: root/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java')
-rw-r--r--src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java b/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
index 24c1a1f..54a3406 100644
--- a/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
+++ b/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
@@ -65,7 +65,7 @@ public abstract class ProcessorDef extends DataType {
*/
private String ifProp;
/**
- * if true, processor definition inherits values from containing <cc>
+ * if true, processor definition inherits values from containing cc
* element
*/
private boolean inherit;
@@ -126,7 +126,7 @@ public abstract class ProcessorDef extends DataType {
/**
* Adds a <compilerarg>or <linkerarg>
*
- * @param arg
+ * @param param
* command line argument, must not be null
* @throws NullPointerException
* if arg is null
@@ -175,7 +175,7 @@ public abstract class ProcessorDef extends DataType {
* Creates a configuration
*
* @param baseDef
- * reference to def from containing <cc>element, may be null
+ * reference to def from containing cc element, may be null
* @return configuration
*
*/
@@ -188,11 +188,11 @@ public abstract class ProcessorDef extends DataType {
baseDef, targetPlatform, versionInfo);
}
ProcessorDef[] defaultProviders = getDefaultProviders(baseDef);
- Processor proc = getProcessor();
+ Processor proc = getProcessor(linkType);
return proc.createConfiguration(task, linkType, defaultProviders, this, targetPlatform, versionInfo);
}
/**
- * Prepares list of processor arguments ( <compilerarg>, <linkerarg>) that
+ * Prepares list of processor arguments ( compilerarg, linkerarg ) that
* are active for the current project settings.
*
* @return active compiler arguments
@@ -219,7 +219,7 @@ public abstract class ProcessorDef extends DataType {
return array;
}
/**
- * Prepares list of processor arguments ( <compilerarg>, <linkerarg>) that
+ * Prepares list of processor arguments ( compilerarg, linkerarg) that
* are active for the current project settings.
*
* @return active compiler arguments
@@ -315,7 +315,7 @@ public abstract class ProcessorDef extends DataType {
}
/**
* Gets the inherit attribute. If the inherit value is true, this processor
- * definition will inherit default values from the containing <cc>element.
+ * definition will inherit default values from the containing cc element.
*
* @return if true then properties from the containing <cc>element are
* used.
@@ -358,6 +358,17 @@ public abstract class ProcessorDef extends DataType {
}
return processor;
}
+
+ /**
+ * Obtains the appropriate processor (compiler, linker) based on the
+ * LinkType.
+ *
+ * @return processor
+ */
+ protected Processor getProcessor(LinkType linkType) {
+ // by default ignore the linkType.
+ return getProcessor();
+ }
/**
* Gets a boolean value indicating whether all targets must be rebuilt
* regardless of dependency analysis.
@@ -523,7 +534,7 @@ public abstract class ProcessorDef extends DataType {
}
/**
* If inherit has the default value of true, defines, includes and other
- * settings from the containing <cc>element will be inherited.
+ * settings from the containing cc element will be inherited.
*
* @param inherit
* new value