Index: pkg/analyzer_cli/lib/src/build_mode.dart |
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart |
index 869a87e93c06f226e8bc9057f51099d1bbc98f53..f5c3b1f95b3e8d0a803fd98f02e51b6681f4394f 100644 |
--- a/pkg/analyzer_cli/lib/src/build_mode.dart |
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart |
@@ -325,7 +325,10 @@ class BuildMode { |
]); |
// Set context options. |
- Driver.setAnalysisContextOptions(resourceProvider, context, options); |
+ Driver.declareVariables(context.declaredVariables, options); |
+ AnalysisOptionsImpl analysisOptions = Driver |
+ .createAnalysisOptionsForCommandLineOptions(resourceProvider, options); |
+ context.analysisOptions = analysisOptions; |
if (!options.buildSummaryOnly) { |
// Configure using summaries. |