From 075c57e88bed3b4d7ec7f6aefbffc6a36321e960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9?= Date: Thu, 24 Aug 2023 09:02:04 -0500 Subject: [PATCH] build: add symlink to `compile_commands.json` file if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Usually lsp servers needs the `compile_commands.json` file in the root directory. Signed-off-by: Juan José Arboleda PR-URL: https://github.com/nodejs/node/pull/49260 Reviewed-By: Rafael Gonzaga Reviewed-By: Yagiz Nizipli --- configure.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.py b/configure.py index e5e1a77155551f..4638f04b6ae622 100755 --- a/configure.py +++ b/configure.py @@ -2169,6 +2169,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: