mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
build,win: enable pch for clang-cl
Fixes: https://github.com/nodejs/node/issues/55208 PR-URL: https://github.com/nodejs/node/pull/55249 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
parent
93447abe2b
commit
dc552c6739
@ -3416,7 +3416,11 @@ def _FinalizeMSBuildSettings(spec, configuration):
|
||||
)
|
||||
# Turn on precompiled headers if appropriate.
|
||||
if precompiled_header:
|
||||
precompiled_header = os.path.split(precompiled_header)[1]
|
||||
# While MSVC works with just file name eg. "v8_pch.h", ClangCL requires
|
||||
# the full path eg. "tools/msvs/pch/v8_pch.h" to find the file.
|
||||
# P.S. Only ClangCL defines msbuild_toolset, for MSVC it is None.
|
||||
if configuration.get("msbuild_toolset") != 'ClangCL':
|
||||
precompiled_header = os.path.split(precompiled_header)[1]
|
||||
_ToolAppend(msbuild_settings, "ClCompile", "PrecompiledHeader", "Use")
|
||||
_ToolAppend(
|
||||
msbuild_settings, "ClCompile", "PrecompiledHeaderFile", precompiled_header
|
||||
|
||||
Loading…
Reference in New Issue
Block a user