Edit: Documentation for Scala Compiler Options has been posted.
Most of us get by with scalac -help
, scalac -X
and scalac -Y
.
Don't forget to scala -help
, too.
Edit: sbt
user can do the usual:
> set scalacOptions in Compile += "-X"
> compile
[snip]
[info] -Xcheck-null Warn upon selection of nullable reference.
[info] -Xcheckinit Wrap field accessors to throw an exception on uninitialized access.
[info] -Xdisable-assertions Generate no assertions or assumptions.
[info] -Xdivergence211 Turn on the 2.11 behavior of implicit divergence not terminating recursive implicit searches (SI-7291).
[info] -Xelide-below <n> Calls to @elidable methods are omitted if method priority is lower than argument
[info] -Xexperimental Enable experimental extensions.
[info] -Xfatal-warnings Fail the compilation if there are any warnings.
[snip]
At least the man page was updated recently:
https://issues.scala-lang.org/browse/SI-7824
[error] Usage: -target: where choices are jvm-1.5, jvm-1.6, jvm-1.7, jvm-1.8 (default: jvm-1.8).
vs
– Donald Duck Nov 19 '20 at 12:25docs: -target:TARGET or --target:TARGET Target platform for object files. ([8],9,10,11,12)