Commit a929c71 1 parent 295f684 commit a929c71 Copy full SHA for a929c71
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 @@ -2307,8 +2307,9 @@ def make_bin_override():
2307
2307
2308
2308
if options .compile_commands_json :
2309
2309
gyp_args += ['-f' , 'compile_commands_json' ]
2310
- os .path .islink ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2311
- os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2310
+ if sys .platform != 'win32' :
2311
+ os .path .lexists ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2312
+ os .symlink ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2312
2313
2313
2314
# pass the leftover non-whitespace positional arguments to GYP
2314
2315
gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2318,4 +2319,7 @@ def make_bin_override():
2318
2319
2319
2320
print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
2320
2321
run_gyp (gyp_args )
2322
+ if options .compile_commands_json and sys .platform == 'win32' :
2323
+ os .path .isfile ('./compile_commands.json' ) and os .unlink ('./compile_commands.json' )
2324
+ shutil .copy2 ('./out/' + config ['BUILDTYPE' ] + '/compile_commands.json' , './compile_commands.json' )
2321
2325
info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ set openssl_no_asm=
70
70
set no_shared_roheap =
71
71
set doc =
72
72
set extra_msbuild_args =
73
+ set compile_commands =
73
74
set exit_code = 0
74
75
75
76
:next-arg
@@ -147,6 +148,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
147
148
if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
148
149
if /i " %1 " == " doc" set doc = 1& goto arg-ok
149
150
if /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
150
152
151
153
echo Error: invalid command line option `%1 `.
152
154
exit /b 1
@@ -205,6 +207,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
205
207
if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
206
208
if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
207
209
if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
210
+ if defined compile_commands set configure_flags = %configure_flags% -C
208
211
if " %target_arch% " == " x86" if " %PROCESSOR_ARCHITECTURE% " == " AMD64" set configure_flags = %configure_flags% --no-cross-compiling
209
212
210
213
if not exist " %~dp0 deps\icu" goto no-depsicu
You can’t perform that action at this time.
0 commit comments