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 @@ -2164,8 +2164,9 @@ def make_bin_override():
21642164
21652165if options .compile_commands_json :
21662166 gyp_args += ['-f' , 'compile_commands_json' ]
2167- os .path .islink ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2168- os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2167+ if sys .platform != 'win32' :
2168+ os .path .islink ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2169+ os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
21692170
21702171# pass the leftover non-whitespace positional arguments to GYP
21712172gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2175,4 +2176,7 @@ def make_bin_override():
21752176
21762177print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
21772178run_gyp (gyp_args )
2179+ if sys .platform == 'win32' :
2180+ os .path .isfile ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2181+ shutil .copy2 ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
21782182info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ set openssl_no_asm=
7171set no_shared_roheap =
7272set doc =
7373set extra_msbuild_args =
74+ set compile_commands =
7475set exit_code = 0
7576
7677:next-arg
@@ -144,6 +145,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
144145if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
145146if /i " %1 " == " doc" set doc = 1& goto arg-ok
146147if /i " %1 " == " binlog" set extra_msbuild_args = /binaryLogger:%config% \node.binlog& goto arg-ok
148+ if /i " %1 " == " compile-commands" set compile_commands = 1& goto arg-ok
147149
148150echo Error: invalid command line option `%1 `.
149151exit /b 1
@@ -199,6 +201,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
199201if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
200202if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
201203if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
204+ if defined compile_commands set configure_flags = %configure_flags% -C
202205if " %target_arch% " == " x86" if " %PROCESSOR_ARCHITECTURE% " == " AMD64" set configure_flags = %configure_flags% --no-cross-compiling
203206
204207if not exist " %~dp0 deps\icu" goto no-depsicu
You can’t perform that action at this time.
0 commit comments