GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — build: add the option to generate compile_commands.json in vcbuild.bat · nodejs/node@f25760c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • configure.py
  • vcbuild.bat
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,8 +2249,9 @@ def make_bin_override():
22492249

22502250
if options.compile_commands_json:
22512251
gyp_args += ['-f', 'compile_commands_json']
2252-
os.path.islink('./compile_commands.json') and os.unlink('./compile_commands.json')
2253-
os.symlink('./out/' + config['BUILDTYPE'] + '/compile_commands.json', './compile_commands.json')
2252+
if sys.platform != 'win32':
2253+
os.path.lexists('./compile_commands.json') and os.unlink('./compile_commands.json')
2254+
os.symlink('./out/' + config['BUILDTYPE'] + '/compile_commands.json', './compile_commands.json')
22542255

22552256
# pass the leftover non-whitespace positional arguments to GYP
22562257
gyp_args += [arg for arg in args if not str.isspace(arg)]
@@ -2260,4 +2261,7 @@ def make_bin_override():
22602261

22612262
print_verbose("running: \n " + " ".join(['python', 'tools/gyp_node.py'] + gyp_args))
22622263
run_gyp(gyp_args)
2264+
if options.compile_commands_json and sys.platform == 'win32':
2265+
os.path.isfile('./compile_commands.json') and os.unlink('./compile_commands.json')
2266+
shutil.copy2('./out/' + config['BUILDTYPE'] + '/compile_commands.json', './compile_commands.json')
22632267
info('configure completed successfully')
Collapse file

‎vcbuild.bat‎

Copy file name to clipboardExpand all lines: vcbuild.bat
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ set openssl_no_asm=
6666
set no_shared_roheap=
6767
set doc=
6868
set extra_msbuild_args=
69+
set compile_commands=
6970
set exit_code=0
7071

7172
:next-arg
@@ -140,6 +141,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
140141
if /i "%1"=="no-shared-roheap" set no_shared_roheap=1&goto arg-ok
141142
if /i "%1"=="doc" set doc=1&goto arg-ok
142143
if /i "%1"=="binlog" set extra_msbuild_args=/binaryLogger:out\%config%\node.binlog&goto arg-ok
144+
if /i "%1"=="compile-commands" set compile_commands=1&goto arg-ok
143145

144146
echo Error: invalid command line option `%1`.
145147
exit /b 1
@@ -196,6 +198,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
196198
if defined openssl_no_asm set configure_flags=%configure_flags% --openssl-no-asm
197199
if defined no_shared_roheap set configure_flags=%configure_flags% --disable-shared-readonly-heap
198200
if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose
201+
if defined compile_commands set configure_flags=%configure_flags% -C
199202
if "%target_arch%"=="x86" if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set configure_flags=%configure_flags% --no-cross-compiling
200203

201204
if not exist "%~dp0deps\icu" goto no-depsicu

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.