Changeset 167667 in webkit
- Timestamp:
- Apr 22, 2014 10:38:15 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r167650 r167667 1 2014-04-22 ChangSeok Oh <changseok.oh@collabora.com> 2 3 [GTK] YCM choose a newer compile_commands.json in between Release or Debug 4 https://bugs.webkit.org/show_bug.cgi?id=131911 5 6 Reviewed by Martin Robinson. 7 8 common.get_build_path returns release path even though Debug configuration 9 is newer than Release. So YouCompleteMe is used to refer old build setup inadvertently. 10 11 * gtk/ycm_extra_conf.py: 12 (get_build_path): Compare modified time of Release and Debug. And return a recent modified path. 13 (FlagsForFile): 14 1 15 2014-04-21 Brent Fulgham <bfulgham@apple.com> 2 16 -
trunk/Tools/gtk/ycm_extra_conf.py
r167482 r167667 62 62 63 63 64 def get_build_path(): 65 webkitbuild_path = os.path.join(common.get_build_path(fatal=False), '..') 66 if not os.path.exists(webkitbuild_path): 67 return None 68 69 release_build_path = os.path.join(webkitbuild_path, 'Release') 70 debug_build_path = os.path.join(webkitbuild_path, 'Debug') 71 72 try: 73 release_mtime = os.path.getmtime(os.path.join(release_build_path, 'compile_commands.json')) 74 except os.error: 75 release_mtime = 0 76 try: 77 debug_mtime = os.path.getmtime(os.path.join(debug_build_path, 'compile_commands.json')) 78 except os.error: 79 debug_mtime = 0 80 81 return release_build_path if release_mtime >= debug_mtime else debug_build_path 82 83 64 84 def FlagsForFile(filename, **kwargs): 65 85 """This is the main entry point for YCM. Its interface is fixed. … … 89 109 result['flags'].append("-includeconfig.h") 90 110 91 build_path = os.path.normpath( common.get_build_path(fatal=False))111 build_path = os.path.normpath(get_build_path()) 92 112 if not build_path: 93 113 print "Could not find WebKit build path."
Note: See TracChangeset
for help on using the changeset viewer.