Index: pkg/dev_compiler/lib/src/compiler/command.dart |
diff --git a/pkg/dev_compiler/lib/src/compiler/command.dart b/pkg/dev_compiler/lib/src/compiler/command.dart |
index af34e95f711c3490304d9cd70cff1f4cfdcaa5f6..dfce39705c426951ebaa9a5bf0e1d53685a5c4fa 100644 |
--- a/pkg/dev_compiler/lib/src/compiler/command.dart |
+++ b/pkg/dev_compiler/lib/src/compiler/command.dart |
@@ -180,8 +180,12 @@ void _compile(ArgResults argResults, AnalyzerOptions analyzerOptions, |
modulePath = path.basenameWithoutExtension(firstOutPath); |
} |
- var unit = new BuildUnit(modulePath, libraryRoot, argResults.rest, |
- (source) => _moduleForLibrary(moduleRoot, source, compilerOpts)); |
+ var unit = new BuildUnit( |
+ modulePath, |
+ libraryRoot, |
+ argResults.rest, |
+ (source) => |
+ _moduleForLibrary(moduleRoot, source, analyzerOptions, compilerOpts)); |
var module = compiler.compile(unit, compilerOpts); |
module.errors.forEach(printFn); |
@@ -217,10 +221,15 @@ void _compile(ArgResults argResults, AnalyzerOptions analyzerOptions, |
} |
} |
-String _moduleForLibrary( |
- String moduleRoot, Source source, CompilerOptions compilerOpts) { |
+String _moduleForLibrary(String moduleRoot, Source source, |
+ AnalyzerOptions analyzerOptions, CompilerOptions compilerOpts) { |
if (source is InSummarySource) { |
var summaryPath = source.summaryPath; |
+ |
+ if (analyzerOptions.customSummaryModules.containsKey(summaryPath)) { |
+ return analyzerOptions.customSummaryModules[summaryPath]; |
+ } |
+ |
var ext = '.${compilerOpts.summaryExtension}'; |
if (path.isWithin(moduleRoot, summaryPath) && summaryPath.endsWith(ext)) { |
var buildUnitPath = |