Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Unified Diff: tools/vim/ninja_output.py

Issue 904143003: [ycm] The YouCompleteMe configuration is not VIM specific. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/vim/ninja-build.vim ('k') | tools/vim/v8.ycm_extra_conf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/vim/ninja_output.py
diff --git a/tools/vim/ninja_output.py b/tools/vim/ninja_output.py
deleted file mode 100644
index ec4d27e097f845c4c889b7cb64c0c133fa86b64a..0000000000000000000000000000000000000000
--- a/tools/vim/ninja_output.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 2015 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import os
-import os.path
-
-
-def GetNinjaOutputDirectory(v8_root, configuration=None):
- """Returns <v8_root>/<output_dir>/(Release|Debug).
-
- The configuration chosen is the one most recently generated/built, but can be
- overriden via the <configuration> parameter. Detects a custom output_dir
- specified by GYP_GENERATOR_FLAGS."""
-
- output_dir = 'out'
- generator_flags = os.getenv('GYP_GENERATOR_FLAGS', '').split(' ')
- for flag in generator_flags:
- name_value = flag.split('=', 1)
- if len(name_value) == 2 and name_value[0] == 'output_dir':
- output_dir = name_value[1]
-
- root = os.path.join(v8_root, output_dir)
- if configuration:
- return os.path.join(root, configuration)
-
- debug_path = os.path.join(root, 'Debug')
- release_path = os.path.join(root, 'Release')
-
- def is_release_newer(test_path):
- try:
- debug_mtime = os.path.getmtime(os.path.join(debug_path, test_path))
- except os.error:
- debug_mtime = 0
- try:
- rel_mtime = os.path.getmtime(os.path.join(release_path, test_path))
- except os.error:
- rel_mtime = 0
- return rel_mtime >= debug_mtime
-
- if is_release_newer('.ninja_log') or is_release_newer('.ninja_deps'):
- return release_path
- return debug_path
« no previous file with comments | « tools/vim/ninja-build.vim ('k') | tools/vim/v8.ycm_extra_conf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698