Created
April 17, 2011 07:54
-
-
Save iwadon/923836 to your computer and use it in GitHub Desktop.
Canonicalize target filename when loading depfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/graph.cc b/src/graph.cc | |
| index a4317ba..bbfb8df 100644 | |
| --- a/src/graph.cc | |
| +++ b/src/graph.cc | |
| @@ -148,8 +148,11 @@ bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface, | |
| *err = "expected only one output"; | |
| return false; | |
| } | |
| - if (outputs_[0]->file_->path_ != makefile.out_) { | |
| - *err = "expected makefile to mention '" + outputs_[0]->file_->path_ + "', " | |
| + string output_file_path = outputs_[0]->file_->path_; | |
| + if (!CanonicalizePath(&output_file_path, err)) | |
| + return false; | |
| + if (output_file_path != makefile.out_) { | |
| + *err = "expected makefile to mention '" + output_file_path + "', " | |
| "got '" + makefile.out_ + "'"; | |
| return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment