diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2008-10-30 15:04:59 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2008-10-30 15:04:59 +0000 |
commit | eae38f8340adfb5a125dd2f4459488ca394437d3 (patch) | |
tree | e3c9f5477bcbb4042060414d1502901abad26a3b /src/compiler | |
parent | 219412ebb7c8c7d574c4953983c317cf7a62e92d (diff) | |
download | scala-eae38f8340adfb5a125dd2f4459488ca394437d3.tar.gz scala-eae38f8340adfb5a125dd2f4459488ca394437d3.tar.bz2 scala-eae38f8340adfb5a125dd2f4459488ca394437d3.zip |
updated ScalacFork ant task to accept arbitry a...
updated ScalacFork ant task to accept arbitry arguments forwarded to the
forked jvm.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/ant/sabbus/ScalacFork.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala index 74928ec7ce..e973672bf3 100644 --- a/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala +++ b/src/compiler/scala/tools/ant/sabbus/ScalacFork.scala @@ -18,14 +18,14 @@ class ScalacFork extends MatchingTask with TaskArgs { timeout = Some(input) } - def setMaxMemory(input: String): Unit = { - maxmemory = Some(input) + def setJvmArgs(input: String): Unit = { + jvmArgs = Some(input) } private var sourceDir: Option[File] = None private var failOnError: Boolean = true private var timeout: Option[Long] = None - private var maxmemory: Option[String] = None + private var jvmArgs: Option[String] = None override def execute() { if (compilerPath.isEmpty) error("Mandatory attribute 'compilerpath' is not set.") @@ -57,10 +57,11 @@ class ScalacFork extends MatchingTask with TaskArgs { val java = new Java(this) // set this as owner java.setFork(true) + // using 'setLine' creates multiple arguments out of a space-separated string + if (!jvmArgs.isEmpty) java.createJvmarg().setLine(jvmArgs.get) java.setClasspath(compilerPath.get) java.setClassname("scala.tools.nsc.Main") if (!timeout.isEmpty) java.setTimeout(timeout.get) - if (!maxmemory.isEmpty) java.setMaxmemory(maxmemory.get) for (arg <- settings.toArgs) java.createArg().setValue(arg) for (file <- includedFiles) |