diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-07 09:24:44 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-03-07 16:35:16 +0200 |
| commit | 8cc1a394b53d92be4d6127c4adb4c493486fef65 (patch) | |
| tree | 7aae7ac7aa2642cd5b877fee54857190f00fb168 | |
| parent | f89a587753618a73996e2b44f46bdd11707fce2e (diff) | |
| download | meson-8cc1a394b53d92be4d6127c4adb4c493486fef65.tar.gz | |
clang-tidy: do not add target if PCHs are not in clang format
If a project uses PCH and they are for e.g. GCC, it will not help to build
them before running clang-tidy. Just skip creating the clang-tidy and
clang-tidy-fix targets in that case.
| -rw-r--r-- | mesonbuild/backend/ninjabackend.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 2ae696311..316d2253c 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -3743,6 +3743,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) return if target_name in self.all_outputs: return + if need_pch and not set(self.all_pch.keys()) <= {'clang'}: + return + cmd = self.environment.get_build_command() + \ ['--internal', 'clang' + name, self.environment.source_dir, self.environment.build_dir] + \ extra_args |
