Skip to content

Commit

Permalink
build: add symlink to compile_commands.json file if needed
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
juanarbol authored Aug 24, 2023
1 parent b0f4233 commit 5ff1ead
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,8 @@ def make_bin_override():

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

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

0 comments on commit 5ff1ead

Please sign in to comment.