diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2014-11-13 17:18:53 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2014-11-17 18:54:41 +0100 |
commit | b73ea2fde3949bcd1366cc8778c007619b627481 (patch) | |
tree | 85a678f53e1a70906e9083f2b3ff6ab986f4ae91 /project | |
parent | 7978a5f6a1be13ca9c482c3f2e9c2102018cfcf0 (diff) | |
download | dotty-b73ea2fde3949bcd1366cc8778c007619b627481.tar.gz dotty-b73ea2fde3949bcd1366cc8778c007619b627481.tar.bz2 dotty-b73ea2fde3949bcd1366cc8778c007619b627481.zip |
Add option to optimize the JVM for short-runnning applications
Ideally, dotc should reuse a resident compiler and we should not fork sbt
for every task. Until this happens, this option is useful for
development. Fixes #222.
Usage:
$ sbt -DOshort=""
$ ./bin/dotc -Oshort foo.scala
Diffstat (limited to 'project')
-rw-r--r-- | project/Build.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/project/Build.scala b/project/Build.scala index 33a09a4f7..9e2633136 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -68,7 +68,14 @@ object DottyBuild extends Build { else List() - agentOptions ::: travis_build ::: fullpath + val tuning = + if (sys.props.isDefinedAt("Oshort")) + // Optimize for short-running applications, see https://github.com/lampepfl/dotty/issues/222 + List("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1") + else + List() + + tuning ::: agentOptions ::: travis_build ::: fullpath } ) |