File tree 1 file changed +8
-1
lines changed
compilation/src/main/scalac/scala/tools/benchmark 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
package scala .tools .benchmark
2
2
3
+ import java .io .File
3
4
import java .nio .file ._
5
+
4
6
import scala .tools .nsc ._
5
7
6
8
trait BenchmarkDriver extends BaseBenchmarkDriver {
7
9
private var driver : MainClass = _
8
10
private var files : List [String ] = _
9
11
12
+ private def findScalaJars = {
13
+ sys.props(" java.class.path" ).split(File .pathSeparatorChar).filter(_.matches(""" .*\bscala-(reflect|compiler|library).*\.jar""" )).mkString(" :" )
14
+ }
15
+
10
16
// MainClass is copy-pasted from compiler for source compatibility with 2.10.x - 2.13.x
11
17
private class MainClass extends Driver with EvalLoop {
12
18
var compiler : Global = _
@@ -15,11 +21,12 @@ trait BenchmarkDriver extends BaseBenchmarkDriver {
15
21
compiler
16
22
}
17
23
24
+
18
25
override protected def processSettingsHook (): Boolean = {
19
26
if (source == " scala" )
20
27
settings.sourcepath.value = Paths .get(s " ../corpus/ $source/ $corpusVersion/library " ).toAbsolutePath.normalize.toString
21
28
else
22
- settings.usejavacp .value = true
29
+ settings.classpath .value = findScalaJars
23
30
settings.outdir.value = tempDir.getAbsolutePath
24
31
settings.nowarn.value = true
25
32
if (depsClasspath != null )
You can’t perform that action at this time.
0 commit comments