Skip to content

Commit 8da137b

Browse files
committed
Rename -Xlink-optimise to -Xlink
1 parent aae7b80 commit 8da137b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class ScalaSettings extends Settings.SettingGroup {
114114
val YoptPhases = PhasesSetting("-Yopt-phases", "Restrict the optimisation phases to execute under -optimise.")
115115
val YoptFuel = IntSetting("-Yopt-fuel", "Maximum number of optimisations performed under -optimise.", -1)
116116
val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying local optimisations to the .program") withAbbreviation "-optimize"
117-
val XlinkOptimise = BooleanSetting("-Xlink-optimise", "Recompile library code with the application.").withAbbreviation("-Xlink-optimize")
117+
val Xlink = BooleanSetting("-Xlink", "Recompile library code with the application.")
118118

119119
/** Dottydoc specific settings */
120120
val siteRoot = StringSetting(

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class ClassfileLoader(val classfile: AbstractFile) extends SymbolLoader {
326326
val (classRoot, moduleRoot) = rootDenots(root.asClass)
327327
val classfileParser = new ClassfileParser(classfile, classRoot, moduleRoot)(ctx)
328328
val result = classfileParser.run()
329-
if (ctx.settings.YretainTrees.value || ctx.settings.XlinkOptimise.value) {
329+
if (ctx.settings.YretainTrees.value || ctx.settings.Xlink.value) {
330330
result match {
331331
case Some(unpickler: tasty.DottyUnpickler) =>
332332
classRoot.symbol.asClass.unpickler = unpickler

compiler/src/dotty/tools/dotc/core/Symbols.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ object Symbols {
604604

605605
/** If this is either:
606606
* - a top-level class and `-Yretain-trees` is set
607-
* - a top-level class loaded from TASTY and `-Xlink-optimise` is set
607+
* - a top-level class loaded from TASTY and `-Xlink` is set
608608
* then return the TypeDef tree (possibly wrapped inside PackageDefs) for this class, otherwise EmptyTree.
609609
* This will force the info of the class.
610610
*/

compiler/src/dotty/tools/dotc/transform/LinkAll.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class LinkAll extends Phase {
6464
}
6565

6666
private def doLink(implicit ctx: Context): Boolean = {
67-
val link = ctx.settings.XlinkOptimise
67+
val link = ctx.settings.Xlink
6868
if (link.value) {
6969
val out = ctx.settings.outputDir
7070
if (out.value.extension != "jar")
@@ -77,7 +77,7 @@ class LinkAll extends Phase {
7777
object LinkAll {
7878

7979
private[LinkAll] def loadCompilationUnit(clsd: ClassDenotation)(implicit ctx: Context): Option[CompilationUnit] = {
80-
assert(ctx.settings.XlinkOptimise.value)
80+
assert(ctx.settings.Xlink.value)
8181
val tree = clsd.symbol.asClass.tree
8282
if (tree.isEmpty) None
8383
else {

compiler/test/dotty/tools/dotc/LinkOptimiseTests.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class LinkOptimiseTests extends ParallelTesting {
4242

4343
// Setup class paths
4444
def mkLinkClassFlags(libPath: String) =
45-
TestFlags(mkClassPath(libPath :: Jars.dottyTestDeps), mkClassPath(Jars.dottyTestDeps), basicDefaultOptions :+ "-Xlink-optimise")
45+
TestFlags(mkClassPath(libPath :: Jars.dottyTestDeps), mkClassPath(Jars.dottyTestDeps), basicDefaultOptions :+ "-Xlink")
4646
val strawmanClassPath = mkLinkClassFlags(defaultOutputDir + "strawmanLibrary/main/")
4747
val customLibClassFlags = mkLinkClassFlags(defaultOutputDir + "linkCustomLib/custom-lib")
4848

compiler/test/dotty/tools/vulpix/TestFlags.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final case class TestFlags(
1313

1414
def all: Array[String] = Array("-classpath", defaultClassPath) ++ options
1515

16-
def isLinkTest: Boolean = options.contains("-Xlink-optimise")
16+
def isLinkTest: Boolean = options.contains("-Xlink")
1717
}
1818

1919
object TestFlags {

0 commit comments

Comments
 (0)