aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Alexeyev <0x416b617269@gmail.com>2019-02-09 20:11:45 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-02-13 21:24:43 +0200
commitcc8af259c813e239292cccb60bacfbc7641e12a9 (patch)
tree3a5df9d145a7c3f5b9a58d540e6c9b12f302f539
parentebfb09f5d64b8dbb9d10ae57f71a1d7be7fd9137 (diff)
downloadmeson-cc8af259c813e239292cccb60bacfbc7641e12a9.zip
meson-cc8af259c813e239292cccb60bacfbc7641e12a9.tar.gz
meson-cc8af259c813e239292cccb60bacfbc7641e12a9.tar.bz2
ninja: Always treat PCHs as an implicit dependency
In addition to MSVC, which was worked around previously, GCC also does not list includes from the PCH in the depfile by default, unless -fpch-deps is given. I think it's best to stay safe and not rely on any particular behavior from the compiler here.
-rw-r--r--mesonbuild/backend/ninjabackend.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index afef9a9..1df5f81 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2219,14 +2219,7 @@ rule FORTRAN_DEP_HACK%s
elif not self.has_dir_part(d):
d = os.path.join(self.get_target_private_dir(target), d)
element.add_orderdep(d)
- if compiler.id == 'msvc':
- # MSVC does not show includes coming from the PCH with '/showIncludes',
- # thus we must add an implicit dependency to the generated PCH.
- element.add_dep(pch_dep)
- else:
- # All other compilers properly handle includes through the PCH, so only an
- # orderdep is needed to make the initial build without depfile work.
- element.add_orderdep(pch_dep)
+ element.add_dep(pch_dep)
# Convert from GCC-style link argument naming to the naming used by the
# current compiler.
commands = commands.to_native()