This page is no longer maintained — Please continue to the home page at www.scala-lang.org

passing -Dscala.timings to scalac via ant

3 replies
adriaanm
Joined: 2010-02-08,
User offline. Last seen 31 weeks 4 days ago.
I tried 
0) scalac -Dscala.timings // this works, but I want to pass this option to an entire ant strap
none of this works:
1) ant -Dscala.timings
2) in the task I'm running:     <param name="scalac.args.all" value="-Dscala.timings"/>
3)  <property name="scala.timings" value="1"/> --> ant does not support this in ant.call apparently...
4)  <param name="jvm.opts" value="-Dscala.timings"/>

anyone!?

thanks!adriaan
Stefan Zeiger
Joined: 2008-12-21,
User offline. Last seen 27 weeks 3 days ago.
Re: passing -Dscala.timings to scalac via ant

On 2011-12-15 10:15, Adriaan Moors wrote:
> 4)

I think you need to put this into the jvm.opts *property*, not some
param. Or set it directly in scalacfork.jvmargs if you only want it for
scalac:

-sz

Hubert Plociniczak
Joined: 2009-09-12,
User offline. Last seen 42 years 45 weeks ago.
Re: passing -Dscala.timings to scalac via ant
Have a look at tools/epfl-build.

hubert

On 12/15/2011 10:15 AM, Adriaan Moors wrote:
CAJQegsg25FXHuawbar4bzCe_Gyu1-4-e5FZTpGyas7hiDgE5jw [at] mail [dot] gmail [dot] com" type="cite"> I tried 
0) scalac -Dscala.timings // this works, but I want to pass this option to an entire ant strap
none of this works:
1) ant -Dscala.timings
2) in the task I'm running:      <param name="scalac.args.all" value="-Dscala.timings"/>
3)  <property name="scala.timings" value="1"/> --> ant does not support this in ant.call apparently...
4)  <param name="jvm.opts" value="-Dscala.timings"/>

anyone!?

thanks! adriaan

adriaanm
Joined: 2010-02-08,
User offline. Last seen 31 weeks 4 days ago.
Re: passing -Dscala.timings to scalac via ant
thanks for the suggestions everyone!
I think you need to put this into the jvm.opts *property*, not some param. Or set it directly in scalacfork.jvmargs if you only want it for scalac:
<property
     name="scalacfork.jvmargs"
     value="${env.ANT_OPTS} ${jvm.opts} -Dscala.timings"/> 
Stefan, I don't know what I'm doing wrong, but that also didn't work (I pasted your suggestion inside my <target> at https://github.com/adriaanm/scala-dev/blob/topic/virtpatmat-bootstrap/build.xml#L1855)
I ended up just changing the <property name="jvm.opts" value="-Dscala.timings"/> at the top-level
that worked, and to be honest, I have no desire to become an ant maven, so I'm just leaving it at that :-)

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland