Skip to content

meson: Disable PCH for GCC#13678

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
xokdvium:pch-disable-gcc
Aug 2, 2025
Merged

meson: Disable PCH for GCC#13678
Ericson2314 merged 1 commit intoNixOS:masterfrom
xokdvium:pch-disable-gcc

Conversation

@xokdvium
Copy link
Contributor

@xokdvium xokdvium commented Aug 2, 2025

Motivation

GCC doesn't really benefit as much as Clang does from using precompiled headers. Another aspect to consider is that clangd doesn't really like GCC's PCH flags in the compilation database, so GCC based devshells would continue to work with clangd.

This also has the slight advantage of ensuring that our includes are in order, since we build with both Clang and GCC.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

GCC doesn't really benefit as much as Clang does from
using precompiled headers. Another aspect to consider is that
clangd doesn't really like GCC's PCH flags in the compilation database,
so GCC based devshells would continue to work with clangd.

This also has the slight advantage of ensuring that our includes are in
order, since we build with both Clang and GCC.
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Aug 2, 2025
@Ericson2314 Ericson2314 enabled auto-merge August 2, 2025 23:42
@Ericson2314 Ericson2314 merged commit dbccfc2 into NixOS:master Aug 2, 2025
14 checks passed
@xokdvium xokdvium deleted the pch-disable-gcc branch August 2, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants