Index: tools/patch_sdk.dart |
diff --git a/tools/patch_sdk.dart b/tools/patch_sdk.dart |
index 3e587840e616ba0cb1631817cb8c1ed7f238cc38..bcdc635f68c0070f280a96440520b089e461ffe2 100644 |
--- a/tools/patch_sdk.dart |
+++ b/tools/patch_sdk.dart |
@@ -241,7 +241,7 @@ Future main(List<String> argv) async { |
'--packages', |
new Uri.file(packagesFile).toString(), |
'--platform', |
- platform, // platform.dill that was just generated |
+ new Uri.file(platform).toString(), // platform.dill |
Platform.script.toString() // patch_sdk.dart |
], (CompilerContext c) async { |
CompileTask task = |
@@ -253,10 +253,12 @@ Future main(List<String> argv) async { |
// Read depfile generated by Fasta and append deps that we have collected |
// during generation of patched_sdk to it. |
- final list = new File(depfile).readAsStringSync().split(':'); |
+ // Note: we are splitting by ': ' because Windows paths can start with |
+ // drive letter followed by a colon. |
+ final list = new File(depfile).readAsStringSync().split(': '); |
assert(list.length == 2); |
deps.addAll(list[1].split(' ').where((str) => str.isNotEmpty)); |
- assert(list[0] == 'patched_sdk/platform.dill'); |
+ assert(list[0] == path.join('patched_sdk', 'platform.dill')); |
new File(depfile).writeAsStringSync("${list[0]}: ${deps.join(' ')}\n"); |
}, zoneSpecification: new ZoneSpecification(print: (_, _2, _3, line) { |
capturedLines.add(line); |