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 @@ -2249,8 +2249,9 @@ def make_bin_override():
22492249
22502250if 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
22562257gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2260,4 +2261,7 @@ def make_bin_override():
22602261
22612262print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
22622263run_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' )
22632267info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ set openssl_no_asm=
6666set no_shared_roheap =
6767set doc =
6868set extra_msbuild_args =
69+ set compile_commands =
6970set 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
140141if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
141142if /i " %1 " == " doc" set doc = 1& goto arg-ok
142143if /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
144146echo Error: invalid command line option `%1 `.
145147exit /b 1
@@ -196,6 +198,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
196198if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
197199if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
198200if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
201+ if defined compile_commands set configure_flags = %configure_flags% -C
199202if " %target_arch% " == " x86" if " %PROCESSOR_ARCHITECTURE% " == " AMD64" set configure_flags = %configure_flags% --no-cross-compiling
200203
201204if not exist " %~dp0 deps\icu" goto no-depsicu
You can’t perform that action at this time.
0 commit comments