Skip to content

Commit c5a7780

Browse files
committed
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: nodejs/node#49260 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 679ee23 commit c5a7780

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graal-nodejs/configure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,8 @@ def make_bin_override():
22112211

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

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

0 commit comments

Comments
 (0)