You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2009/01/29 06:23:55 UTC
svn commit: r738761 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW
contributors.xml docs/manual/CoreTasks/javac.html
src/main/org/apache/tools/ant/taskdefs/Javac.java
src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
Author: bodewig
Date: Thu Jan 29 05:23:52 2009
New Revision: 738761
URL: http://svn.apache.org/viewvc?rev=738761&view=rev
Log:
support source/target on gcj. PR 46617. Based on patch by Paweł Zuzelski
Modified:
ant/core/trunk/CONTRIBUTORS
ant/core/trunk/WHATSNEW
ant/core/trunk/contributors.xml
ant/core/trunk/docs/manual/CoreTasks/javac.html
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=738761&r1=738760&r2=738761&view=diff
==============================================================================
Binary files - no diff available.
Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=738761&r1=738760&r2=738761&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jan 29 05:23:52 2009
@@ -655,6 +655,10 @@
these were eliminated in the interest of behaving in the manner
of a "path."
+ * <javac>'s source and target attributes are no longer ignored when
+ using gcj.
+ Bugzilla Issue 46617.
+
Changes from Ant 1.7.0 TO Ant 1.7.1
=============================================
Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=738761&r1=738760&r2=738761&view=diff
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Thu Jan 29 05:23:52 2009
@@ -924,6 +924,10 @@
<last>Gaspar</last>
</name>
<name>
+ <first>PaweÅ</first>
+ <last>Zuzelski</last>
+ </name>
+ <name>
<first>Peter</first>
<middle>B.</middle>
<last>West</last>
Modified: ant/core/trunk/docs/manual/CoreTasks/javac.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/javac.html?rev=738761&r1=738760&r2=738761&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/javac.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/javac.html Thu Jan 29 05:23:52 2009
@@ -358,9 +358,11 @@
<td valign="top">Value of the <code>-source</code> command-line
switch; will be ignored by all implementations prior to
<code>javac1.4</code> (or <code>modern</code> when Ant is not
- running in a 1.3 VM) and <code>jikes</code>.<br> If you use this
- attribute together with <code>jikes</code>, you must make sure
- that your version of jikes supports the <code>-source</code>
+ running in a 1.3 VM), <code>gcj</code> and <code>jikes</code>.<br>
+ If you use this attribute together with <code>gcj</code>
+ or <code>jikes</code>, you must make sure that your version
+ supports the <code>-source</code> (or <code>-fsource</code> for
+ gcj)
switch. By default, no <code>-source</code> argument will be used
at all.<br>
<b>Note that the default value depends on the JVM that is running
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java?rev=738761&r1=738760&r2=738761&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java Thu Jan 29 05:23:52 2009
@@ -186,13 +186,16 @@
}
/**
- * Value of the -source command-line switch; will be ignored
- * by all implementations except modern and jikes.
+ * Value of the -source command-line switch; will be ignored by
+ * all implementations except modern, jikes and gcj (gcj uses
+ * -fsource).
+ *
+ * <p>If you use this attribute together with jikes or gcj, you
+ * must make sure that your version of jikes supports the -source
+ * switch.</p>
*
- * If you use this attribute together with jikes, you must make
- * sure that your version of jikes supports the -source switch.
- * Legal values are 1.3, 1.4, 1.5, and 5 - by default, no
- * -source argument will be used at all.
+ * <p>Legal values are 1.3, 1.4, 1.5, and 5 - by default, no
+ * -source argument will be used at all.</p>
*
* @param v Value to assign to source.
*/
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java?rev=738761&r1=738760&r2=738761&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java Thu Jan 29 05:23:52 2009
@@ -114,6 +114,16 @@
cmd.createArgument().setValue("-C");
}
+ if (attributes.getSource() != null) {
+ String source = attributes.getSource();
+ cmd.createArgument().setValue("-fsource=" + source);
+ }
+
+ if (attributes.getTarget() != null) {
+ String target = attributes.getTarget();
+ cmd.createArgument().setValue("-ftarget=" + target);
+ }
+
addCurrentCompilerArgs(cmd);
return cmd;