mirror of https://github.com/sbt/sbt.git
Merge pull request #2920 from eed3si9n/fport/2754
[fport] SD-232 Recycle classloaders to be anti-hostile to JIT
This commit is contained in:
commit
84ab6bf5e4
|
|
@ -307,8 +307,22 @@ object Defaults extends BuildCommon {
|
|||
if (plugin) scalaBase / ("sbt-" + sbtv) else scalaBase
|
||||
}
|
||||
|
||||
def compilersSetting = compilers := Compiler.compilers(scalaInstance.value, classpathOptions.value, javaHome.value,
|
||||
bootIvyConfiguration.value, fileToStore.value, scalaCompilerBridgeSource.value)(appConfiguration.value, streams.value.log)
|
||||
def compilersSetting = {
|
||||
compilers := {
|
||||
val compilers = Compiler.compilers(
|
||||
scalaInstance.value, classpathOptions.value, javaHome.value, bootIvyConfiguration.value,
|
||||
fileToStore.value, scalaCompilerBridgeSource.value
|
||||
)(appConfiguration.value, streams.value.log)
|
||||
if (java.lang.Boolean.getBoolean("sbt.disable.interface.classloader.cache")) compilers else {
|
||||
compilers.withScalac(
|
||||
compilers.scalac match {
|
||||
case x: AnalyzingCompiler => x.withClassLoaderCache(state.value.classLoaderCache)
|
||||
case x => x
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lazy val configTasks = docTaskSettings(doc) ++ inTask(compile)(compileInputsSettings) ++ configGlobal ++ compileAnalysisSettings ++ Seq(
|
||||
compile := compileTask.value,
|
||||
|
|
|
|||
Loading…
Reference in New Issue