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 @@ -2310,8 +2310,9 @@ def make_bin_override():
23102310
23112311if options .compile_commands_json :
23122312 gyp_args += ['-f' , 'compile_commands_json' ]
2313- os .path .islink ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2314- os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2313+ if sys .platform != 'win32' :
2314+ os .path .lexists ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2315+ os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
23152316
23162317# pass the leftover non-whitespace positional arguments to GYP
23172318gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2321,4 +2322,7 @@ def make_bin_override():
23212322
23222323print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
23232324run_gyp (gyp_args )
2325+ if options .compile_commands_json and sys .platform == 'win32' :
2326+ os .path .isfile ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2327+ shutil .copy2 ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
23242328info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ set openssl_no_asm=
7070set no_shared_roheap =
7171set doc =
7272set extra_msbuild_args =
73+ set compile_commands =
7374set exit_code = 0
7475
7576:next-arg
@@ -147,6 +148,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
147148if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
148149if /i " %1 " == " doc" set doc = 1& goto arg-ok
149150if /i " %1 " == " binlog" set extra_msbuild_args = /binaryLogger:out\%config% \node.binlog& goto arg-ok
151+ if /i " %1 " == " compile-commands" set compile_commands = 1& goto arg-ok
150152
151153echo Error: invalid command line option `%1 `.
152154exit /b 1
@@ -205,6 +207,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
205207if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
206208if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
207209if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
210+ if defined compile_commands set configure_flags = %configure_flags% -C
208211
209212if " %target_arch% " == " x86" (
210213 echo " 32-bit Windows builds are not supported anymore."
You can’t perform that action at this time.
0 commit comments