Commit 02ba58d5 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[ycm] Fix python script

This fixes the youcompleteme config script to look for ninja_output.py
in tools/vim instead of tools/ninja (it was moved there in
https://crrev.com/c/2797536), and makes a minor adjustment for python3
compatibility.

R=machenbach@chromium.org

Bug: v8:11879
Change-Id: Ia825903fb6019865244c5529bf2d23935a10ad5e
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059077Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75984}
parent 2049e188
......@@ -114,7 +114,7 @@ def GetClangCommandFromNinjaForFilename(v8_root, filename):
# should contain most/all of the interesting flags for other targets too.
filename = os.path.join(v8_root, 'src', 'utils', 'utils.cc')
sys.path.append(os.path.join(v8_root, 'tools', 'ninja'))
sys.path.append(os.path.join(v8_root, 'tools', 'vim'))
from ninja_output import GetNinjaOutputDirectory
out_dir = os.path.realpath(GetNinjaOutputDirectory(v8_root))
......@@ -133,7 +133,7 @@ def GetClangCommandFromNinjaForFilename(v8_root, filename):
# Ninja might execute several commands to build something. We want the last
# clang command.
clang_line = None
for line in reversed(stdout.split('\n')):
for line in reversed(stdout.decode('utf-8').splitlines()):
if 'clang' in line:
clang_line = line
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment