@@ -318,8 +318,8 @@ object Build {
318318 lazy val commonBenchmarkSettings = Seq (
319319 outputStrategy := Some (StdoutOutput ),
320320 mainClass in (Jmh , run) := Some (" dotty.tools.benchmarks.Bench" ), // custom main for jmh:run
321- javaOptions += " -DBENCH_COMPILER_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-bootstrapped`, Compile )).value).mkString(" " , " : " , " " ),
322- javaOptions += " -DBENCH_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-library-bootstrapped`, Compile )).value).mkString(" " , " : " , " " )
321+ javaOptions += " -DBENCH_COMPILER_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-bootstrapped`, Compile )).value).mkString(" " , File .pathSeparator , " " ),
322+ javaOptions += " -DBENCH_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-library-bootstrapped`, Compile )).value).mkString(" " , File .pathSeparator , " " )
323323 )
324324
325325 // sbt >= 0.13.12 will automatically rewrite transitive dependencies on
@@ -453,7 +453,7 @@ object Build {
453453 def findLib (attList : Seq [Attributed [File ]], name : String ) = attList
454454 .map(_.data.getAbsolutePath)
455455 .find(_.contains(name))
456- .toList.mkString(" : " )
456+ .toList.mkString(File .pathSeparator )
457457
458458 // Settings shared between dotty-compiler and dotty-compiler-bootstrapped
459459 lazy val commonDottyCompilerSettings = Seq (
@@ -682,13 +682,13 @@ object Build {
682682 else if (debugFromTasty) " dotty.tools.dotc.fromtasty.Debug"
683683 else " dotty.tools.dotc.Main"
684684
685- var extraClasspath = s " $scalaLib: $dottyLib"
686- if ((decompile || printTasty) && ! args.contains(" -classpath" )) extraClasspath += " : ."
685+ var extraClasspath = s " $scalaLib${ File .pathSeparator} $dottyLib"
686+ if ((decompile || printTasty) && ! args.contains(" -classpath" )) extraClasspath += s " ${ File .pathSeparator} . "
687687 if (args0.contains(" -with-compiler" )) {
688688 if (! isDotty.value) {
689689 throw new MessageOnlyException (" -with-compiler can only be used with a bootstrapped compiler" )
690690 }
691- extraClasspath += s " : $dottyCompiler"
691+ extraClasspath += s " ${ File .pathSeparator} $dottyCompiler"
692692 }
693693
694694 val fullArgs = main :: insertClasspathInArgs(args, extraClasspath)
@@ -698,7 +698,7 @@ object Build {
698698
699699 def insertClasspathInArgs (args : List [String ], cp : String ): List [String ] = {
700700 val (beforeCp, fromCp) = args.span(_ != " -classpath" )
701- val classpath = fromCp.drop(1 ).headOption.fold(cp)(_ + " : " + cp)
701+ val classpath = fromCp.drop(1 ).headOption.fold(cp)(_ + File .pathSeparator + cp)
702702 " -classpath" :: classpath :: beforeCp ::: fromCp.drop(2 )
703703 }
704704
@@ -1112,7 +1112,7 @@ object Build {
11121112 // Discover classpaths
11131113
11141114 def cpToString (cp : Seq [File ]) =
1115- cp.map(_.getAbsolutePath).mkString(java.io. File .pathSeparator)
1115+ cp.map(_.getAbsolutePath).mkString(File .pathSeparator)
11161116
11171117 val compilerCp = Attributed .data((fullClasspath in (`dotty-compiler`, Compile )).value)
11181118 val cpStr = cpToString(classpath ++ compilerCp)
0 commit comments