ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TAKAHASHI Hideo(BSD-M1G)" <>
Subject I want to specify no -g flags to javac
Date Wed, 10 Apr 2002 02:24:24 GMT

Based on the boolean "debug" attribute of the javac task, ant will
specifiy either "-g" or "-g:none" to javac. However -g:none is actually
not the same as not specifying "-g" at all to javac, as for javac.exe of
JDK1.3 and JDK1.4 AFAIK.  I happen to want to do a build with no -g
flags at all.

As of JDK1.3 and 1.4:
-g:none will produce no debugging information at all, and makes trouble
shooting very hard -- i.e. you won't be able to get an informative stack

No -g flags is an alias to -g:source,lines and is helpful for trouble
shooting, without revealing the variable information.  We want to use
this for production build.

-g is an alias to -g:source,lines,vars and is helpful for use with a
debugger.  This is OK for a development phase build.

My chances seems to be:

(1) Change the source to alter the behaviour of debug="false", but that
isn't very nice.   I don't want to make a branch.

(2) Make an enhancement request, however it seems that the javac task is
designed to define a common set of options that can be applied to all
supported compilers, so making compiler dependend flags specifiable
would probably be against the current design policy.

Maybe I will have to choose (1) for the present.

Are there any better way to address this?

Hideo Takahashi
Business Solutions Division, Hitachi Ltd.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message