File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2308,8 +2308,9 @@ def make_bin_override():
2308
2308
2309
2309
if options .compile_commands_json :
2310
2310
gyp_args += ['-f' , 'compile_commands_json' ]
2311
- os .path .islink ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2312
- os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2311
+ if sys .platform != 'win32' :
2312
+ os .path .lexists ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2313
+ os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2313
2314
2314
2315
# pass the leftover non-whitespace positional arguments to GYP
2315
2316
gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2319,4 +2320,7 @@ def make_bin_override():
2319
2320
2320
2321
print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
2321
2322
run_gyp (gyp_args )
2323
+ if options .compile_commands_json and sys .platform == 'win32' :
2324
+ os .path .isfile ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2325
+ shutil .copy2 ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2322
2326
info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ set openssl_no_asm=
69
69
set no_shared_roheap =
70
70
set doc =
71
71
set extra_msbuild_args =
72
+ set compile_commands =
72
73
set exit_code = 0
73
74
74
75
:next-arg
@@ -145,6 +146,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
145
146
if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
146
147
if /i " %1 " == " doc" set doc = 1& goto arg-ok
147
148
if /i " %1 " == " binlog" set extra_msbuild_args = /binaryLogger:out\%config% \node.binlog& goto arg-ok
149
+ if /i " %1 " == " compile-commands" set compile_commands = 1& goto arg-ok
148
150
149
151
echo Error: invalid command line option `%1 `.
150
152
exit /b 1
@@ -203,6 +205,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
203
205
if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
204
206
if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
205
207
if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
208
+ if defined compile_commands set configure_flags = %configure_flags% -C
206
209
207
210
if " %target_arch% " == " x86" (
208
211
echo " 32-bit Windows builds are not supported anymore."
You can’t perform that action at this time.
0 commit comments