Commit 95e4bfd7 authored by dzhioev's avatar dzhioev Committed by Commit bot

YCM works correctly when 'out' directory is a symlink (continued).

It used to work after my previous fix 37accc2c, but then it broke again.
This CL changes the way how "-I" arguments are transformed.

BUG=NONE
TEST=manually
NOTRY=true

Review URL: https://codereview.chromium.org/528293002

Cr-Commit-Position: refs/heads/master@{#293519}
parent 87119864
...@@ -166,12 +166,11 @@ def GetClangCommandFromNinjaForFilename(chrome_root, filename): ...@@ -166,12 +166,11 @@ def GetClangCommandFromNinjaForFilename(chrome_root, filename):
# try to use the default flags. # try to use the default flags.
return chrome_flags return chrome_flags
out_dir = GetNinjaOutputDirectory(chrome_root) out_dir = os.path.realpath(GetNinjaOutputDirectory(chrome_root))
# Ninja needs the path to the source file relative to the output build # Ninja needs the path to the source file relative to the output build
# directory. # directory.
rel_filename = os.path.relpath(os.path.realpath(filename), rel_filename = os.path.relpath(os.path.realpath(filename), out_dir)
os.path.realpath(out_dir))
# Ask ninja how it would build our source file. # Ask ninja how it would build our source file.
p = subprocess.Popen(['ninja', '-v', '-C', out_dir, '-t', p = subprocess.Popen(['ninja', '-v', '-C', out_dir, '-t',
......
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