diff options
Diffstat (limited to 'src')
-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) |