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():
2164
2164
2165
2165
if options .compile_commands_json :
2166
2166
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' )
2169
2170
2170
2171
# pass the leftover non-whitespace positional arguments to GYP
2171
2172
gyp_args += [arg for arg in args if not str .isspace (arg )]
@@ -2175,4 +2176,7 @@ def make_bin_override():
2175
2176
2176
2177
print_verbose ("running: \n " + " " .join (['python' , 'tools/gyp_node.py' ] + gyp_args ))
2177
2178
run_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' )
2178
2182
info ('configure completed successfully' )
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ set openssl_no_asm=
71
71
set no_shared_roheap =
72
72
set doc =
73
73
set extra_msbuild_args =
74
+ set compile_commands =
74
75
set exit_code = 0
75
76
76
77
:next-arg
@@ -144,6 +145,7 @@ if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
144
145
if /i " %1 " == " no-shared-roheap" set no_shared_roheap = 1& goto arg-ok
145
146
if /i " %1 " == " doc" set doc = 1& goto arg-ok
146
147
if /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
147
149
148
150
echo Error: invalid command line option `%1 `.
149
151
exit /b 1
@@ -199,6 +201,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
199
201
if defined openssl_no_asm set configure_flags = %configure_flags% --openssl-no-asm
200
202
if defined no_shared_roheap set configure_flags = %configure_flags% --disable-shared-readonly-heap
201
203
if defined DEBUG_HELPER set configure_flags = %configure_flags% --verbose
204
+ if defined compile_commands set configure_flags = %configure_flags% -C
202
205
if " %target_arch% " == " x86" if " %PROCESSOR_ARCHITECTURE% " == " AMD64" set configure_flags = %configure_flags% --no-cross-compiling
203
206
204
207
if not exist " %~dp0 deps\icu" goto no-depsicu
You can’t perform that action at this time.
0 commit comments