1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 21:16:02 +01:00

meson: Disable PCH for GCC

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.
This commit is contained in:
Sergei Zimmerman 2025-08-03 00:07:03 +03:00
parent bbd14173b5
commit 5db50e3f77
No known key found for this signature in database
6 changed files with 8 additions and 5 deletions

View file

@ -178,7 +178,7 @@ this_library = library(
link_args: linker_export_flags,
prelink : true, # For C++ static initializers
install : true,
cpp_pch : ['pch/precompiled-headers.hh']
cpp_pch : do_pch ? ['pch/precompiled-headers.hh'] : []
)
install_headers(headers, subdir : 'nix/expr', preserve_path : true)