Index: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart |
index b503d0fb4b2fa83c34fd8ad36dde1ee774086223..896fd3db126a077ef741008f53ea7960dd53b831 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart |
@@ -271,18 +271,29 @@ class KernelTarget extends TargetImplementation { |
} |
} |
- Future writeDepsFile(Uri output, Uri depsFile) async { |
+ Future writeDepsFile(Uri output, Uri depsFile, |
+ {Iterable<Uri> extraDependencies}) async { |
+ Uri base = depsFile.resolve("."); |
+ String toRelativeFilePath(Uri uri) { |
+ return Uri.parse(relativizeUri(uri, base: base)).toFilePath(); |
+ } |
+ |
if (loader.first == null) return null; |
StringBuffer sb = new StringBuffer(); |
- Uri base = depsFile.resolve("."); |
- sb.write(Uri.parse(relativizeUri(output, base: base)).toFilePath()); |
+ sb.write(toRelativeFilePath(output)); |
sb.write(":"); |
- for (Uri dependency in loader.getDependencies()) { |
+ Set<String> allDependencies = new Set<String>(); |
+ allDependencies.addAll(loader.getDependencies().map(toRelativeFilePath)); |
+ if (extraDependencies != null) { |
+ allDependencies.addAll(extraDependencies.map(toRelativeFilePath)); |
+ } |
+ for (String path in allDependencies) { |
sb.write(" "); |
- sb.write(Uri.parse(relativizeUri(dependency, base: base)).toFilePath()); |
+ sb.write(path); |
} |
sb.writeln(); |
await new File.fromUri(depsFile).writeAsString("$sb"); |
+ ticker.logMs("Wrote deps file"); |
} |
Program erroneousProgram(bool isFullProgram) { |