aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-13 22:29:32 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-17 18:38:51 +0100
commitd1877e1ff89b318d16ad0637bcd923e540080140 (patch)
tree32b790a675a70faf668b8dc4f22b70d7a6d8db62 /src/dotty/tools/backend/jvm/DottyBackendInterface.scala
parent5e8023335e641c9c05c6517a82764571e7ef6386 (diff)
downloaddotty-d1877e1ff89b318d16ad0637bcd923e540080140.tar.gz
dotty-d1877e1ff89b318d16ad0637bcd923e540080140.tar.bz2
dotty-d1877e1ff89b318d16ad0637bcd923e540080140.zip
Make output directory overridable
The interpreter needs to install a virtual directory as output directory. This is not supported with the -d option in ScalaSettings. The solution is to make the output directory overridable in the GenBCode phase.
Diffstat (limited to 'src/dotty/tools/backend/jvm/DottyBackendInterface.scala')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index b6adba85a..5776cc8e2 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -32,7 +32,7 @@ import NameOps._
import StdNames.nme
import NameOps._
-class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
+class DottyBackendInterface(outputDirectory: AbstractFile)(implicit ctx: Context) extends BackendInterface{
type Symbol = Symbols.Symbol
type Type = Types.Type
type Tree = tpd.Tree
@@ -734,7 +734,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
def setter(clz: Symbol): Symbol = decorateSymbol(sym).setter
def moduleSuffix: String = "" // todo: validate that names already have $ suffix
- def outputDirectory: AbstractFile = new PlainDirectory(new Directory(new JFile(ctx.settings.d.value)))
+ def outputDirectory: AbstractFile = DottyBackendInterface.this.outputDirectory
def pos: Position = sym.pos
def throwsAnnotations: List[Symbol] = Nil