aboutsummaryrefslogtreecommitdiff
path: root/find.cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-10-18 17:38:28 -0700
committerDan Willemsen <dwillemsen@google.com>2016-10-19 15:18:14 -0700
commit8543327654443db1981142bbe18f3878e464e981 (patch)
tree69c7de7d5540e69496fe55024f9662c88f34912c /find.cc
parentd2dcfa22410021ea9a328fa9447e55522b0f63c5 (diff)
downloadkati-8543327654443db1981142bbe18f3878e464e981.tar.gz
Remove "out" special case handling from FindEmulator
We removed the special casing of $OUT_DIR from our findleaves commands to fix problems where $OUT_DIR was named the same as a real directory. But now TEST_FIND_EMULATOR (and regen) is broken, since the real command finds out/Android.mk, but the emulated version does not. Since we're already traversing output directories that aren't called "out", just remove the "out" special casing from the find emulator. This raises the time to init the find emulator from 0.85s to 1.12s on my machine with one product built. But this only happens when you're about to read all of the makefiles anyways, not during regen. The node count goes from 683196 to 894396.
Diffstat (limited to 'find.cc')
-rw-r--r--find.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/find.cc b/find.cc
index 2539212..1d9252f 100644
--- a/find.cc
+++ b/find.cc
@@ -726,8 +726,7 @@ class FindEmulatorImpl : public FindEmulator {
return (!HasPrefix(s, "../") &&
!HasPrefix(s, "/") &&
!HasPrefix(s, ".repo") &&
- !HasPrefix(s, ".git") &&
- !HasPrefix(s, "out"));
+ !HasPrefix(s, ".git"));
}
const DirentNode* FindDir(StringPiece d, bool* should_fallback) {
@@ -874,8 +873,7 @@ class FindEmulatorImpl : public FindEmulator {
if (!strcmp(ent->d_name, ".") ||
!strcmp(ent->d_name, "..") ||
!strcmp(ent->d_name, ".repo") ||
- !strcmp(ent->d_name, ".git") ||
- !strcmp(ent->d_name, "out"))
+ !strcmp(ent->d_name, ".git"))
continue;
string npath = path;