Skip to content

Commit 075c57e

Browse files
juanarboltargos
authored andcommitted
build: add symlink to compile_commands.json file if needed
Usually lsp servers needs the `compile_commands.json` file in the root directory. Signed-off-by: Juan José Arboleda <[email protected]> PR-URL: #49260 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 651e450 commit 075c57e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

configure.py

+2
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,8 @@ def make_bin_override():
21692169

21702170
if options.compile_commands_json:
21712171
gyp_args += ['-f', 'compile_commands_json']
2172+
os.path.islink('./compile_commands.json') and os.unlink('./compile_commands.json')
2173+
os.symlink('./out/' + config['BUILDTYPE'] + '/compile_commands.json', './compile_commands.json')
21722174

21732175
# override the variable `python` defined in common.gypi
21742176
if bin_override is not None:

0 commit comments

Comments
 (0)