Skip to content

Commit 5ff1ead

Browse files
authored
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 b0f4233 commit 5ff1ead

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
@@ -2116,6 +2116,8 @@ def make_bin_override():
21162116

21172117
if options.compile_commands_json:
21182118
gyp_args += ['-f', 'compile_commands_json']
2119+
os.path.islink('./compile_commands.json') and os.unlink('./compile_commands.json')
2120+
os.symlink('./out/' + config['BUILDTYPE'] + '/compile_commands.json', './compile_commands.json')
21192121

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

0 commit comments

Comments
 (0)