msvc: Do not include pch obj when b_pch=false

Fixes: #12494
This commit is contained in:
Xavier Claessens 2023-11-10 13:03:49 -05:00 committed by Xavier Claessens
parent 2ea284bac1
commit 42898bb455
1 changed files with 1 additions and 1 deletions

View File

@ -896,7 +896,7 @@ class Backend:
result.append(s.relative_name())
# MSVC generate an object file for PCH
if extobj.pch:
if extobj.pch and self.target_uses_pch(extobj.target):
for lang, pch in extobj.target.pch.items():
compiler = extobj.target.compilers[lang]
if compiler.get_argument_syntax() == 'msvc':