Commit f2591539 authored by Jason Rhinelander's avatar Jason Rhinelander

Revert clang system path hack

It isn't needed after all; the bug was actually a debian ycmd problem
(debian bug 825905).
parent 300b653f
......@@ -6,6 +6,7 @@ flags = [
'-Wall',
'-Wextra',
'-std=c++11',
'-x', 'c++',
'-I', '.',
'-I', '/usr/include/eigen3',
'-DERIS_TESTS' # Needed for test scripts to compile
......@@ -42,22 +43,8 @@ def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
new_flags.append( new_flag )
return new_flags
# Dirty hack until ycm #2330 is solved
def LoadSystemIncludes():
regex = re.compile(ur'(?:\#include \<...\> search starts here\:)(?P<list>.*?)(?:End of search list)', re.DOTALL);
process = subprocess.Popen(['clang', '-v', '-E', '-x', 'c++', '-'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE);
process_out, process_err = process.communicate('');
output = process_out + process_err;
includes = [];
for p in re.search(regex, output).group('list').split('\n'):
p = p.strip();
if len(p) > 0 and p.find('(framework directory)') < 0:
includes.append('-isystem');
includes.append(p);
return includes;
def FlagsForFile( filename, **kwargs ):
final_flags = MakeRelativePathsInFlagsAbsolute( flags, DirectoryOfThisScript() ) + LoadSystemIncludes()
final_flags = MakeRelativePathsInFlagsAbsolute( flags, DirectoryOfThisScript() )
return {
'flags': final_flags,
'do_cache': True
......
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