Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make -target support JVM 13, 14, 15, and 16 #9481

Merged
merged 1 commit into from Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/ScalaOptionParser.scala
Expand Up @@ -140,5 +140,5 @@ object ScalaOptionParser {
private def scaladocPathSettingNames = List("-doc-root-content", "-diagrams-dot-path")
private def scaladocMultiStringSettingNames = List("-doc-external-doc")

private val targetSettingNames = (8 to 12).map(_.toString).flatMap(v => v :: s"jvm-1.$v" :: s"jvm-$v" :: s"1.$v" :: Nil).toList
private val targetSettingNames = (8 to 16).map(_.toString).flatMap(v => v :: s"jvm-1.$v" :: s"jvm-$v" :: s"1.$v" :: Nil).toList
}
Expand Up @@ -76,6 +76,10 @@ abstract class BackendUtils extends PerRunInit {
case "10" => asm.Opcodes.V10
case "11" => asm.Opcodes.V11
case "12" => asm.Opcodes.V12
case "13" => asm.Opcodes.V13
case "14" => asm.Opcodes.V14
case "15" => asm.Opcodes.V15
case "16" => asm.Opcodes.V16
// to be continued...
})

Expand Down
Expand Up @@ -73,7 +73,7 @@ trait StandardScalaSettings { _: MutableSettings =>
object StandardScalaSettings {
// not final in case some separately compiled client code wanted to depend on updated values
val MinTargetVersion = 8
val MaxTargetVersion = 12 // this one goes to twelve
val MaxTargetVersion = 16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Spinal Tap joke is lost this far past 11...


private val AllTargetVersions = (MinTargetVersion to MaxTargetVersion).map(_.toString).to(List)
}
7 changes: 6 additions & 1 deletion test/junit/scala/tools/nsc/settings/TargetTest.scala
Expand Up @@ -57,8 +57,13 @@ class TargetTest {
check("-target:jvm-12", "12")
check("-target:12", "12")

// (scene missing)

check("-target:jvm-16", "16")
check("-target:16", "16")

checkFail("-target:jvm-6") // no longer
checkFail("-target:jvm-13") // not yet...
checkFail("-target:jvm-17") // not yet...
checkFail("-target:jvm-3000") // not in our lifetime
checkFail("-target:msil") // really?

Expand Down