ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/compilers DefaultCompilerAdapter.java Sj.java
Date Thu, 24 Feb 2005 20:18:22 GMT
bodewig     2005/02/24 12:18:22

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java Sj.java
  Log:
  debug=false breaks Symantec compiler
  
  Revision  Changes    Path
  1.755     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.754
  retrieving revision 1.755
  diff -u -r1.754 -r1.755
  --- WHATSNEW	22 Feb 2005 22:15:36 -0000	1.754
  +++ WHATSNEW	24 Feb 2005 20:18:21 -0000	1.755
  @@ -337,6 +337,9 @@
   * NPE when when <presetdef> tries to configure a task that
     cannot be instantiated. Bugzilla Report 33689.
   
  +* <javac debug="false"> created an invalid command line when running
  +  the Symantec Java compiler.
  +
   Changes from Ant 1.6.1 to Ant 1.6.2
   ===================================
   
  
  
  
  1.59      +16 -2     ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- DefaultCompilerAdapter.java	26 Jan 2005 15:11:26 -0000	1.58
  +++ DefaultCompilerAdapter.java	24 Feb 2005 20:18:22 -0000	1.59
  @@ -276,8 +276,8 @@
               } else {
                   cmd.createArgument().setValue("-g");
               }
  -        } else if (!assumeJava11()) {
  -            cmd.createArgument().setValue("-g:none");
  +        } else if (getNoDebugArgument() != null) {
  +            cmd.createArgument().setValue(getNoDebugArgument());
           }
           if (optimize) {
               cmd.createArgument().setValue("-O");
  @@ -608,5 +608,19 @@
           }
           return bp.concatSystemBootClasspath("ignore");
       }
  +
  +    /**
  +     * The argument the compiler wants to see if the debug attribute
  +     * has been set to false.
  +     *
  +     * <p>A return value of <code>null</code> means no argument at all.</p>
  +     *
  +     * @return "-g:none" unless we expect to invoke a JDK 1.1 compiler.
  +     *
  +     * @since Ant 1.6.3
  +     */
  +    protected String getNoDebugArgument() {
  +        return assumeJava11() ? null : "-g:none";
  +    }
   }
   
  
  
  
  1.13      +10 -2     ant/src/main/org/apache/tools/ant/taskdefs/compilers/Sj.java
  
  Index: Sj.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/compilers/Sj.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Sj.java	9 Mar 2004 16:48:13 -0000	1.12
  +++ Sj.java	24 Feb 2005 20:18:22 -0000	1.13
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2004 The Apache Software Foundation
  + * Copyright  2001-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -45,6 +45,14 @@
               executeExternalCompile(cmd.getCommandline(), firstFileName) == 0;
       }
   
  -
  +    /**
  +     * Returns null since sj either has -g for debug=true or no
  +     * argument at all.
  +     *
  +     * @since Ant 1.6.3
  +     */
  +    protected String getNoDebugArgument() {
  +        return null;
  +    }
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message