Skip to content

Commit d00add2

Browse files
committed
Use the same memory options everywhere
Previously, A max heap of 1G was used for Jenkins which is not enough for Dotty anymore. This commit standardizes on what sbt uses which should be less confusing.
1 parent 9e9f7e6 commit d00add2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

project/Build.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import scala.reflect.io.Path
66

77
object DottyBuild extends Build {
88

9-
val travisMemLimit = List("-Xmx1g", "-Xss2m")
10-
119
val JENKINS_BUILD = "dotty.jenkins.build"
1210

11+
// This is what sbt uses (http://www.scala-sbt.org/0.13/docs/Manual-Installation.html)
12+
val memoryOptions = List("-Xms512M", "-Xmx1536M", "-Xss1M")
13+
1314
val agentOptions = List(
1415
// "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
1516
// "-agentpath:/home/dark/opt/yjp-2013-build-13072/bin/linux-x86-64/libyjpagent.so"
@@ -113,7 +114,7 @@ object DottyBuild extends Build {
113114

114115
val travis_build = // propagate if this is a travis build
115116
if (sys.props.isDefinedAt(JENKINS_BUILD))
116-
List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}") ::: travisMemLimit
117+
List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}")
117118
else
118119
List()
119120

@@ -124,7 +125,7 @@ object DottyBuild extends Build {
124125
else
125126
List()
126127

127-
("-DpartestParentID=" + pid) :: tuning ::: agentOptions ::: travis_build ::: fullpath
128+
("-DpartestParentID=" + pid) :: tuning ::: memoryOptions ::: agentOptions ::: travis_build ::: fullpath
128129
}
129130
) ++ addCommandAlias("partest", ";test:package;package;test:runMain dotc.build;lockPartestFile;test:test;runPartestRunner") ++
130131
addCommandAlias("partest-only", ";test:package;package;test:runMain dotc.build;lockPartestFile;test:test-only dotc.tests;runPartestRunner") ++
@@ -169,7 +170,7 @@ object DottyBuild extends Build {
169170
List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}")
170171
else
171172
List()
172-
val res = agentOptions ::: travis_build ::: fullpath
173+
val res = memoryOptions ::: agentOptions ::: travis_build ::: fullpath
173174
println("Running with javaOptions: " + res)
174175
res
175176
}

0 commit comments

Comments
 (0)