From e820c66a4c367397111093bc7531868e2f0ef2e3 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 1 Oct 2018 23:06:29 +0100 Subject: Teach VisualStudioCCompiler.get_pch_use_args() to handle clang-cl It seems that clang-cl isn't quite compatible with cl in the way it handles pch, and when the precompiled header is used, the pathname of the header is needed, not just its filename. This fixes test\common\13 pch with clang-cl --- mesonbuild/compilers/c.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 24f661f..b185dfb 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1316,6 +1316,8 @@ class VisualStudioCCompiler(CCompiler): def get_pch_use_args(self, pch_dir, header): base = os.path.basename(header) + if self.id == 'clang-cl': + base = header pchname = self.get_pch_name(header) return ['/FI' + base, '/Yu' + base, '/Fp' + os.path.join(pch_dir, pchname)] -- cgit v1.1