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 0c20851589ee8c43d5becac6fd2fab4e8a82428c..42c3dc1c6e430158ea4a794391d3bf2bf58aa39a 100644 |
--- a/pkg/analyzer_cli/lib/src/build_mode.dart |
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart |
@@ -86,11 +86,17 @@ class BuildMode { |
if (options.buildSummaryOutput != null) { |
PackageBundleAssembler assembler = new PackageBundleAssembler(); |
for (Source source in explicitSources) { |
- if (context.computeKindOf(source) != SourceKind.LIBRARY) { |
- continue; |
+ if (context.computeKindOf(source) == SourceKind.LIBRARY) { |
+ if (options.buildSummaryFallback) { |
+ assembler.addFallbackLibrary(source); |
+ } else { |
+ LibraryElement libraryElement = context.computeLibraryElement(source); |
+ assembler.serializeLibraryElement(libraryElement); |
+ } |
+ } |
+ if (options.buildSummaryFallback) { |
+ assembler.addFallbackUnit(source); |
} |
- LibraryElement libraryElement = context.computeLibraryElement(source); |
- assembler.serializeLibraryElement(libraryElement); |
} |
// Write the whole package bundle. |
PackageBundleBuilder sdkBundle = assembler.assemble(); |