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

Unified Diff: tool/patch_sdk.dart

Issue 1322333003: DDC: mostly incremental compilation, fixes #223 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebase Created 5 years, 3 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
Index: tool/patch_sdk.dart
diff --git a/tool/patch_sdk.dart b/tool/patch_sdk.dart
index e8bc7409ef59495f084ba5790cf062e86ac397de..1b6dad29b4b903f22d6fa8b56a4a8435575ebb71 100755
--- a/tool/patch_sdk.dart
+++ b/tool/patch_sdk.dart
@@ -15,8 +15,8 @@ import 'package:analyzer/src/generated/sdk.dart';
import 'package:path/path.dart' as path;
void main(List<String> argv) {
+ var self = path.relative(path.fromUri(Platform.script));
if (argv.length < 2) {
- var self = path.relative(path.fromUri(Platform.script));
var toolDir = path.relative(path.dirname(path.fromUri(Platform.script)));
var inputExample = path.join(toolDir, 'input_sdk');
@@ -32,6 +32,7 @@ void main(List<String> argv) {
print('\$ $self $inputExample $outExample');
exit(1);
}
+ var selfLastModify = new File(self).lastModifiedSync().millisecondsSinceEpoch;
var input = argv[0];
var sdkLibIn = path.join(input, 'lib');
@@ -102,6 +103,9 @@ void main(List<String> argv) {
patchFile.lastModifiedSync().millisecondsSinceEpoch);
}
+ // If the patch_sdk itself was modified, take that into account.
+ inputModifyTime = math.max(inputModifyTime, selfLastModify);
+
// Compute output paths
outPaths = outPaths
.map((p) => path.join(sdkOut, path.relative(p, from: sdkLibIn)))
« lib/src/options.dart ('K') | « tool/build_sdk.sh ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698