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():
23082308
23092309if options .compile_commands_json :
23102310 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' )
23132314
23142315# pass the leftover non-whitespace positional arguments to GYP
23152316gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2319,4 +2320,7 @@ def make_bin_override():
23192320
23202321print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
23212322run_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' )
23222326info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ set openssl_no_asm=
6969set no_shared_roheap =
7070set doc =
7171set extra_msbuild_args =
72+ set compile_commands =
7273set exit_code = 0
7374
7475:next-arg
@@ -145,6 +146,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
145146if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
146147if /i " %1 " == " doc" set doc = 1& goto arg-ok
147148if /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
148150
149151echo Error: invalid command line option `%1 `.
150152exit /b 1
@@ -203,6 +205,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
203205if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
204206if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
205207if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
208+ if defined compile_commands set configure_flags = %configure_flags% -C
206209
207210if " %target_arch% " == " x86" (
208211 echo " 32-bit Windows builds are not supported anymore."
You can’t perform that action at this time.
0 commit comments