File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 6565 'NODE_PLATFORM="win32"' ,
6666 '_UNICODE=1' ,
6767 ],
68- 'conditions' : [
69- ['clang==0' , {
70- 'msvs_precompiled_header' : 'tools/msvs/pch/node_pch.h' ,
71- 'msvs_precompiled_source' : 'tools/msvs/pch/node_pch.cc' ,
72- 'sources' : [
73- '<(_msvs_precompiled_header)' ,
74- '<(_msvs_precompiled_source)' ,
75- ],
76- }],
68+ 'msvs_precompiled_header' : 'tools/msvs/pch/node_pch.h' ,
69+ 'msvs_precompiled_source' : 'tools/msvs/pch/node_pch.cc' ,
70+ 'sources' : [
71+ '<(_msvs_precompiled_header)' ,
72+ '<(_msvs_precompiled_source)' ,
7773 ],
7874 }, { # POSIX
7975 'defines' : [ '__POSIX__' ],
Original file line number Diff line number Diff line change @@ -3412,7 +3412,11 @@ def _FinalizeMSBuildSettings(spec, configuration):
34123412 )
34133413 # Turn on precompiled headers if appropriate.
34143414 if precompiled_header :
3415- precompiled_header = os .path .split (precompiled_header )[1 ]
3415+ # While MSVC works with just file name eg. "v8_pch.h", ClangCL requires
3416+ # the full path eg. "tools/msvs/pch/v8_pch.h" to find the file.
3417+ # P.S. Only ClangCL defines msbuild_toolset, for MSVC it is None.
3418+ if configuration .get ("msbuild_toolset" ) != 'ClangCL' :
3419+ precompiled_header = os .path .split (precompiled_header )[1 ]
34163420 _ToolAppend (msbuild_settings , "ClCompile" , "PrecompiledHeader" , "Use" )
34173421 _ToolAppend (
34183422 msbuild_settings , "ClCompile" , "PrecompiledHeaderFile" , precompiled_header
Original file line number Diff line number Diff line change 4848 'type' : 'none' ,
4949 'toolsets' : ['host' , 'target' ],
5050 'conditions' : [
51- ['OS=="win" and clang==0 ' , {
51+ ['OS=="win"' , {
5252 'direct_dependent_settings' : {
5353 'msvs_precompiled_header' : '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h' ,
5454 'msvs_precompiled_source' : '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc' ,
You can’t perform that action at this time.
0 commit comments