From 8543327654443db1981142bbe18f3878e464e981 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 18 Oct 2016 17:38:28 -0700 Subject: 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. --- find.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'find.cc') 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; -- cgit v1.2.3