[ycm] More robust detection of V8 checkout

Do not enforce the checkout to be called "v8".
Just check that there is a `.git` directory in it.

R=olivf@chromium.org

No-Try: true
Change-Id: I22f596206f713cb0d2f0213f0a859d398ec558bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7782120
Reviewed-by: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#106664}
This commit is contained in:
Clemens Backes authored and v8-scoped@luci-project-accounts.iam.gserviceaccount.com committed 2026-04-21 08:01:19 -07:00
1 parent 2148d0ad59
commit fceca5e53c
1 file changed
+2 -4
+2 -4
View File
@@ -63,14 +63,12 @@ def FindV8SrcFromFilename(filename):
(String) Path of 'v8/', or None if unable to find.
"""
curdir = os.path.normpath(os.path.dirname(filename))
while not (PathExists(curdir, 'v8') and PathExists(curdir, 'v8', 'DEPS')
and (PathExists(curdir, '.gclient')
or PathExists(curdir, 'v8', '.git'))):
while not PathExists(curdir, '.git'):
nextdir = os.path.normpath(os.path.join(curdir, '..'))
if nextdir == curdir:
return None
curdir = nextdir
return os.path.join(curdir, 'v8')
return curdir
def GetClangCommandFromNinjaForFilename(v8_root, filename):