Skip to content

Commit dc552c6

Browse files
StefanStojanovicmarco-ippolito
authored andcommitted
build,win: enable pch for clang-cl
Fixes: #55208 PR-URL: #55249 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 93447ab commit dc552c6

File tree

1 file changed

+5
-1
lines changed
  • tools/gyp/pylib/gyp/generator

1 file changed

+5
-1
lines changed

tools/gyp/pylib/gyp/generator/msvs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy