@@ -102,8 +102,8 @@ object CompilerCommand {
102102 }
103103
104104 def isStandard (s : Setting [? ]): Boolean = ! isAdvanced(s) && ! isPrivate(s)
105- def isAdvanced (s : Setting [? ]): Boolean = s.name startsWith " -X"
106- def isPrivate (s : Setting [? ]) : Boolean = s.name startsWith " -Y"
105+ def isAdvanced (s : Setting [? ]): Boolean = s.name. startsWith( " -X " ) && s.name != " -X"
106+ def isPrivate (s : Setting [? ]) : Boolean = s.name. startsWith( " -Y " ) && s.name != " -Y"
107107
108108 /** Messages explaining usage and options */
109109 def usageMessage = createUsageMsg(" where possible standard" , shouldExplain = false , isStandard)
@@ -112,7 +112,14 @@ object CompilerCommand {
112112
113113 def shouldStopWithInfo = {
114114 import settings ._
115- Set (help, Xhelp , Yhelp , showPlugins) exists (_.value)
115+ Set (help, Xhelp , Yhelp , showPlugins, XshowPhases ) exists (_.value)
116+ }
117+
118+ def phasesMessage : String = {
119+ (new Compiler ()).phases.map(phasegroup => {
120+ if (phasegroup.length == 1 ) phasegroup.head.phaseName
121+ else phasegroup.mkString(" {" , " , " , " }" )
122+ }).mkString(" \n " )
116123 }
117124
118125 def infoMessage : String = {
@@ -121,6 +128,7 @@ object CompilerCommand {
121128 else if (Xhelp .value) xusageMessage
122129 else if (Yhelp .value) yusageMessage
123130 else if (showPlugins.value) ctx.pluginDescriptions
131+ else if (XshowPhases .value) phasesMessage
124132 else " "
125133 }
126134
0 commit comments