From a8d7b9a2a118ac3763935664309c031b91d48ca0 Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Fri, 28 Aug 2020 12:09:43 -0400 Subject: Deprecate CompilerAnnotation (#1870) * CompilerAnnotation$ emits RunFirrtlTransform Change the CompilerAnnotation object to emit RunFirrtlTransformAnnotations containing the associated emitter. This requires a fix in the Driver compatibility layer to know how to enable one-file-per module emission if either a CompilerAnnotation or a RunFirrtlTransformAnnotation(_: Emitter) is present. Signed-off-by: Schuyler Eldridge * Add ConvertCompilerAnnotation phase Add a phase, ConvertCompilerAnnotation, that converts a CompilerAnnotation to a RunFirrtlTransformAnnotation. This provides a warning to the user if this path is taken. Signed-off-by: Schuyler Eldridge * Add test of ConvertCompilerAnnotation Signed-off-by: Schuyler Eldridge * Deprecate CompilerAnnotation$, move helper methods Deprecate the CompilerAnnotation companion object and move it's private utility inside the RunFirrtlTransformAnnotation companion object. Signed-off-by: Schuyler Eldridge * Make ConvertCompilerAnnotations private[firrtl] Make this phase private to avoid adding a deprecation warning. Also, remove an unused string value. Signed-off-by: Schuyler Eldridge * Fix incorrect string in test Signed-off-by: Schuyler Eldridge * Add test that '-X verilog', no emitter yields file Signed-off-by: Schuyler Eldridge --- src/main/scala/firrtl/ExecutionOptionsManager.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/scala/firrtl/ExecutionOptionsManager.scala') diff --git a/src/main/scala/firrtl/ExecutionOptionsManager.scala b/src/main/scala/firrtl/ExecutionOptionsManager.scala index 50fb30a6..e673a5af 100644 --- a/src/main/scala/firrtl/ExecutionOptionsManager.scala +++ b/src/main/scala/firrtl/ExecutionOptionsManager.scala @@ -343,7 +343,7 @@ case class FirrtlExecutionOptions( List() ++ (if (inputFileNameOverride.nonEmpty) Seq(FirrtlFileAnnotation(inputFileNameOverride)) else Seq()) ++ (if (outputFileNameOverride.nonEmpty) { Some(OutputFileAnnotation(outputFileNameOverride)) } else { None }) ++ - Some(CompilerAnnotation(compilerName)) ++ + Some(RunFirrtlTransformAnnotation.stringToEmitter(compilerName)) ++ Some(InfoModeAnnotation(infoModeName)) ++ firrtlSource.map(FirrtlSourceAnnotation(_)) ++ customTransforms.map(t => RunFirrtlTransformAnnotation(t)) ++ -- cgit v1.2.3