File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tools/gyp/pylib/gyp/generator Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3416,7 +3416,11 @@ def _FinalizeMSBuildSettings(spec, configuration):
34163416 )
34173417 # Turn on precompiled headers if appropriate.
34183418 if precompiled_header :
3419- precompiled_header = os .path .split (precompiled_header )[1 ]
3419+ # While MSVC works with just file name eg. "v8_pch.h", ClangCL requires
3420+ # the full path eg. "tools/msvs/pch/v8_pch.h" to find the file.
3421+ # P.S. Only ClangCL defines msbuild_toolset, for MSVC it is None.
3422+ if configuration .get ("msbuild_toolset" ) != 'ClangCL' :
3423+ precompiled_header = os .path .split (precompiled_header )[1 ]
34203424 _ToolAppend (msbuild_settings , "ClCompile" , "PrecompiledHeader" , "Use" )
34213425 _ToolAppend (
34223426 msbuild_settings , "ClCompile" , "PrecompiledHeaderFile" , precompiled_header
You can’t perform that action at this time.
0 commit comments