git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@738761 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -226,6 +226,7 @@ Paul Christmann | |||||
| Paul Galbraith | Paul Galbraith | ||||
| Paul King | Paul King | ||||
| Paulo Gaspar | Paulo Gaspar | ||||
| Pawel Zuzelski | |||||
| Peter B. West | Peter B. West | ||||
| Peter Donald | Peter Donald | ||||
| Peter Doornbosch | Peter Doornbosch | ||||
| @@ -655,6 +655,10 @@ Other changes: | |||||
| these were eliminated in the interest of behaving in the manner | these were eliminated in the interest of behaving in the manner | ||||
| of a "path." | 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 | Changes from Ant 1.7.0 TO Ant 1.7.1 | ||||
| ============================================= | ============================================= | ||||
| @@ -923,6 +923,10 @@ | |||||
| <first>Paulo</first> | <first>Paulo</first> | ||||
| <last>Gaspar</last> | <last>Gaspar</last> | ||||
| </name> | </name> | ||||
| <name> | |||||
| <first>Paweł</first> | |||||
| <last>Zuzelski</last> | |||||
| </name> | |||||
| <name> | <name> | ||||
| <first>Peter</first> | <first>Peter</first> | ||||
| <middle>B.</middle> | <middle>B.</middle> | ||||
| @@ -358,9 +358,11 @@ invoking the compiler.</p> | |||||
| <td valign="top">Value of the <code>-source</code> command-line | <td valign="top">Value of the <code>-source</code> command-line | ||||
| switch; will be ignored by all implementations prior to | switch; will be ignored by all implementations prior to | ||||
| <code>javac1.4</code> (or <code>modern</code> when Ant is not | <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 | switch. By default, no <code>-source</code> argument will be used | ||||
| at all.<br> | at all.<br> | ||||
| <b>Note that the default value depends on the JVM that is running | <b>Note that the default value depends on the JVM that is running | ||||
| @@ -186,13 +186,16 @@ public class Javac extends MatchingTask { | |||||
| } | } | ||||
| /** | /** | ||||
| * 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). | |||||
| * | * | ||||
| * 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>If you use this attribute together with jikes or gcj, you | |||||
| * must make sure that your version of jikes supports the -source | |||||
| * switch.</p> | |||||
| * | |||||
| * <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. | * @param v Value to assign to source. | ||||
| */ | */ | ||||
| @@ -114,6 +114,16 @@ public class Gcj extends DefaultCompilerAdapter { | |||||
| cmd.createArgument().setValue("-C"); | 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); | addCurrentCompilerArgs(cmd); | ||||
| return cmd; | return cmd; | ||||