diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-10-01 23:06:29 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-11-04 15:42:06 +0000 |
commit | e820c66a4c367397111093bc7531868e2f0ef2e3 (patch) | |
tree | bedf175046ec0d698e98eb6c72e8207556e5f116 /mesonbuild | |
parent | b5b7e5b94ae7aaacc04a9d15e60892c385e9388e (diff) | |
download | meson-e820c66a4c367397111093bc7531868e2f0ef2e3.zip meson-e820c66a4c367397111093bc7531868e2f0ef2e3.tar.gz meson-e820c66a4c367397111093bc7531868e2f0ef2e3.tar.bz2 |
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
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/c.py | 2 |
1 files changed, 2 insertions, 0 deletions
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)] |