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 /bin/dotc | |
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 'bin/dotc')
-rwxr-xr-x | bin/dotc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -185,6 +185,9 @@ case "$1" in -d|-debug) debug=true && shift ;; -q|-quiet) quiet=true && shift ;; + # Optimize for short-running applications, see https://github.com/lampepfl/dotty/issues/222 + -Oshort) addJava "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" && shift ;; + -repl) main_class=$ReplMain && shift ;; -compile) main_class=$CompilerMain && shift ;; -run) main_class=$ReplMain && shift ;; |