Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: tools/patch_sdk.dart

Issue 2730913002: patch_sdk.dart: Fix Windows build. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698