File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ source "$PROG_HOME/bin/common"
29
29
30
30
default_java_opts=" -Xmx768m -Xms768m"
31
31
bootcp=true
32
+ withCompiler=true
32
33
33
34
CompilerMain=dotty.tools.dotc.Main
34
35
DecompilerMain=dotty.tools.dotc.decompiler.Main
@@ -89,6 +90,7 @@ case "$1" in
89
90
-nobootcp) unset bootcp && shift ;;
90
91
-colors) colors=true && shift ;;
91
92
-no-colors) unset colors && shift ;;
93
+ -with-compiler) jvm_cp_args=" $PSEP$DOTTY_COMP " && shift ;;
92
94
93
95
# break out -D and -J options and add them to JAVA_OPTS as well
94
96
# so they reach the JVM in time to do some good. The -D options
Original file line number Diff line number Diff line change @@ -639,18 +639,19 @@ object Build {
639
639
640
640
def runCompilerMain (repl : Boolean = false ) = Def .inputTaskDyn {
641
641
val dottyLib = packageAll.value(" dotty-library" )
642
+ lazy val dottyCompiler = packageAll.value(" dotty-compiler" )
642
643
val args0 : List [String ] = spaceDelimited(" <arg>" ).parsed.toList
643
644
val decompile = args0.contains(" -decompile" )
644
- val args = args0.filter(arg => arg != " -repl" || arg != " -decompile" )
645
+ val args = args0.filter(arg => arg != " -repl" && arg != " -decompile" && arg != " -with-compiler " )
645
646
646
647
val main =
647
648
if (repl) " dotty.tools.repl.Main"
648
649
else if (decompile) " dotty.tools.dotc.decompiler.Main"
649
650
else " dotty.tools.dotc.Main"
650
651
651
- val extraClasspath =
652
- if (decompile && ! args.contains(" -classpath" )) dottyLib + " :."
653
- else dottyLib
652
+ var extraClasspath = dottyLib
653
+ if (decompile && ! args.contains(" -classpath" )) extraClasspath += " :."
654
+ if (args0.contains( " -with-compiler " )) extraClasspath += s " : $dottyCompiler "
654
655
655
656
val fullArgs = main :: insertClasspathInArgs(args, extraClasspath)
656
657
You can’t perform that action at this time.
0 commit comments