File tree 2 files changed +9
-2
lines changed
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():
2249
2249
2250
2250
if options .compile_commands_json :
2251
2251
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' )
2254
2255
2255
2256
# pass the leftover non-whitespace positional arguments to GYP
2256
2257
gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2260,4 +2261,7 @@ def make_bin_override():
2260
2261
2261
2262
print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
2262
2263
run_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' )
2263
2267
info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ set openssl_no_asm=
66
66
set no_shared_roheap =
67
67
set doc =
68
68
set extra_msbuild_args =
69
+ set compile_commands =
69
70
set exit_code = 0
70
71
71
72
:next-arg
@@ -140,6 +141,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
140
141
if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
141
142
if /i " %1 " == " doc" set doc = 1& goto arg-ok
142
143
if /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
143
145
144
146
echo Error: invalid command line option `%1 `.
145
147
exit /b 1
@@ -196,6 +198,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
196
198
if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
197
199
if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
198
200
if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
201
+ if defined compile_commands set configure_flags = %configure_flags% -C
199
202
if " %target_arch% " == " x86" if " %PROCESSOR_ARCHITECTURE% " == " AMD64" set configure_flags = %configure_flags% --no-cross-compiling
200
203
201
204
if not exist " %~dp0 deps\icu" goto no-depsicu
You can’t perform that action at this time.
0 commit comments