summaryrefslogtreecommitdiffstats
path: root/src/ninja.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-08-24 22:49:41 (GMT)
committerEvan Martin <martine@danga.com>2011-08-24 22:52:22 (GMT)
commit210ca80b06c57994851fcfdebf7f3d767c41427b (patch)
treecb0f93fd7136f00133aa6140c4c782ad64a9dd60 /src/ninja.cc
parentb0dac493c41b228f0f725faf65590a1595e2245c (diff)
downloadNinja-210ca80b06c57994851fcfdebf7f3d767c41427b.zip
Ninja-210ca80b06c57994851fcfdebf7f3d767c41427b.tar.gz
Ninja-210ca80b06c57994851fcfdebf7f3d767c41427b.tar.bz2
semantic change: allow reaching into parent directories in paths
This allows generating build files in a subdirectory of your source tree. - Change CanonicalizePath to accept this. - CanonicalizePath no longer has an error condition, so change it to a void function. I profiled the result against Chrome and it might be ~100ms slower, but that might just be Chrome's size working against me. In any case I think there are lower-hanging performance fruit elsewhere.
Diffstat (limited to 'src/ninja.cc')
-rw-r--r--src/ninja.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index b75ddbf..d4e697f 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -119,8 +119,7 @@ bool CollectTargetsFromArgs(State* state, int argc, char* argv[],
} else {
for (int i = 0; i < argc; ++i) {
string path = argv[i];
- if (!CanonicalizePath(&path, err))
- return false;
+ CanonicalizePath(&path);
Node* node = state->LookupNode(path);
if (node) {
targets->push_back(node);