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

Side by Side Diff: tools/clang/scripts/generate_compdb.py

Issue 2798233002: Share logic for generating compile DB with run_tool.py (Closed)
Patch Set: thakis comments Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « tools/clang/pylib/clang/compile_db.py ('k') | tools/clang/scripts/generate_win_compdb.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """
7 Helper for generating compile DBs for clang tooling. On non-Windows platforms,
8 this is pretty straightforward. On Windows, the tool does a bit of extra work to
9 integrate the content of response files, force clang tooling to run in clang-cl
10 mode, etc.
11 """
12
13 import argparse
14 import os
15 import sys
16
17 script_dir = os.path.dirname(os.path.realpath(__file__))
18 tool_dir = os.path.abspath(os.path.join(script_dir, '../pylib'))
19 sys.path.insert(0, tool_dir)
20
21 from clang import compile_db
22
23
24 def main(argv):
25 parser = argparse.ArgumentParser()
26 parser.add_argument(
27 'build_path',
28 nargs='?',
29 help='Path to build directory',
30 default='out/Debug')
31 args = parser.parse_args()
32
33 compile_db.GenerateWithNinja(args.build_path)
34
35
36 if __name__ == '__main__':
37 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « tools/clang/pylib/clang/compile_db.py ('k') | tools/clang/scripts/generate_win_compdb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698