forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share logic for generating compile DB with run_tool.py
BUG=676588 R=thakis@chromium.org Review-Url: https://codereview.chromium.org/2798233002 . Cr-Commit-Position: refs/heads/master@{#462582}
- Loading branch information
1 parent
5ecbba9
commit 886eadc
Showing
4 changed files
with
115 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
""" | ||
Helper for generating compile DBs for clang tooling. On non-Windows platforms, | ||
this is pretty straightforward. On Windows, the tool does a bit of extra work to | ||
integrate the content of response files, force clang tooling to run in clang-cl | ||
mode, etc. | ||
""" | ||
|
||
import argparse | ||
import os | ||
import sys | ||
|
||
script_dir = os.path.dirname(os.path.realpath(__file__)) | ||
tool_dir = os.path.abspath(os.path.join(script_dir, '../pylib')) | ||
sys.path.insert(0, tool_dir) | ||
|
||
from clang import compile_db | ||
|
||
|
||
def main(argv): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
'build_path', | ||
nargs='?', | ||
help='Path to build directory', | ||
default='out/Debug') | ||
args = parser.parse_args() | ||
|
||
compile_db.GenerateWithNinja(args.build_path) | ||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(main(sys.argv[1:])) |
This file was deleted.
Oops, something went wrong.