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

Unified Diff: mojo/dart/embedder/snapshotter/main.cc

Issue 1607613007: Regenerate .mojo file if any dependent .dart sources change (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 | mojo/public/dart/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/embedder/snapshotter/main.cc
diff --git a/mojo/dart/embedder/snapshotter/main.cc b/mojo/dart/embedder/snapshotter/main.cc
index 4768543296d6b4579475b9358f4c83443bc17af5..b522d1c8dadab3b554e093a5d8fb6e70029512ed 100644
--- a/mojo/dart/embedder/snapshotter/main.cc
+++ b/mojo/dart/embedder/snapshotter/main.cc
@@ -81,7 +81,16 @@ void WriteDepfile(base::FilePath path,
std::string output = build_output + ":";
for (const auto& i : deps) {
output += " ";
- output += current_directory.Append(i).MaybeAsASCII();
+ base::FilePath file = base::FilePath(i);
+ if (!file.IsAbsolute()) {
+ file = current_directory.Append(i);
+ }
+ base::FilePath resolved_file;
+ if (!ReadSymbolicLink(file, &resolved_file)) {
+ // Not a symbolic link.
+ resolved_file = file;
+ }
+ output += resolved_file.MaybeAsASCII();
}
const char* data = output.c_str();
const intptr_t data_length = output.size();
« no previous file with comments | « no previous file | mojo/public/dart/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698