File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 65
65
'NODE_PLATFORM="win32"' ,
66
66
'_UNICODE=1' ,
67
67
],
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)' ,
77
73
],
78
74
}, { # POSIX
79
75
'defines' : [ '__POSIX__' ],
Original file line number Diff line number Diff line change @@ -3412,7 +3412,11 @@ def _FinalizeMSBuildSettings(spec, configuration):
3412
3412
)
3413
3413
# Turn on precompiled headers if appropriate.
3414
3414
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 ]
3416
3420
_ToolAppend (msbuild_settings , "ClCompile" , "PrecompiledHeader" , "Use" )
3417
3421
_ToolAppend (
3418
3422
msbuild_settings , "ClCompile" , "PrecompiledHeaderFile" , precompiled_header
Original file line number Diff line number Diff line change 48
48
'type' : 'none' ,
49
49
'toolsets' : ['host' , 'target' ],
50
50
'conditions' : [
51
- ['OS=="win" and clang==0 ' , {
51
+ ['OS=="win"' , {
52
52
'direct_dependent_settings' : {
53
53
'msvs_precompiled_header' : '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h' ,
54
54
'msvs_precompiled_source' : '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc' ,
You can’t perform that action at this time.
0 commit comments