diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-08-05 14:23:22 +0300 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2017-02-10 00:32:22 +0300 |
commit | 3c46bb9931ecea71167342322e09121ee48cde8e (patch) | |
tree | 1c1bb4608f8ca7f60ef495a67c621f127f5eb1d8 /configure | |
parent | a3bc9a19917b5d31521621e9dfe121b523f15b40 (diff) |
tools: add compile_commands.json gyp generator
Add a compile_commands.json generator for use with clang-based tooling.
Pass the (undocumented) -C switch to configure to make it generate the
files in out/Debug and out/Release.
PR-URL: https://github.com/nodejs/node/pull/7986
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure index 9cadfffbd06..d0b50f80f9f 100755 --- a/configure +++ b/configure @@ -474,6 +474,12 @@ parser.add_option('--without-bundled-v8', help='do not use V8 includes from the bundled deps folder. ' + '(This mode is not officially supported for regular applications)') +# Create compile_commands.json in out/Debug and out/Release. +parser.add_option('-C', + action='store_true', + dest='compile_commands_json', + help=optparse.SUPPRESS_HELP) + (options, args) = parser.parse_args() # Expand ~ in the install prefix now, it gets written to multiple files. @@ -1360,6 +1366,9 @@ elif flavor == 'win' and sys.platform != 'msys': else: gyp_args += ['-f', 'make-' + flavor] +if options.compile_commands_json: + gyp_args += ['-f', 'compile_commands_json'] + gyp_args += args if warn.warned: |