aboutsummaryrefslogtreecommitdiff
path: root/misc/pre-commit.nix
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-05-30 13:44:01 -0700
committerjade <lix@jade.fyi>2024-05-30 21:54:21 +0000
commit0f99ed43f15aba7805ebe6d757a2d98418596205 (patch)
treef90b6b293ffc4036a24ec530566bbb0d383eeb50 /misc/pre-commit.nix
parente6e5cacabeab0959d092aaf4957932a0b6f4b78e (diff)
build-time: remove 20% more by PCH'ing C++ stdlib
It seems like someone implemented precompiled headers a long time ago and then it never got ported to meson or maybe didn't work at all. This is, however, blessedly easy to simply implement. I went looking for `#define` that could affect the result of precompiling the headers, and as far as I can tell we aren't doing any of that, so this should truly just be free build time savings. Previous state: Compilation (551 times): Parsing (frontend): 1302.1 s Codegen & opts (backend): 956.3 s New state: **** Time summary: Compilation (567 times): Parsing (frontend): 1123.0 s Codegen & opts (backend): 1078.1 s I wonder if the "regression" in codegen time is just doing the PCH operation a few times, because meson does it per-target. Change-Id: I664366b8069bab4851308b3a7571bea97ac64022
Diffstat (limited to 'misc/pre-commit.nix')
-rw-r--r--misc/pre-commit.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/pre-commit.nix b/misc/pre-commit.nix
index ed2b152a3..4f54141b3 100644
--- a/misc/pre-commit.nix
+++ b/misc/pre-commit.nix
@@ -87,11 +87,12 @@ pre-commit-run {
"file"
"header"
];
- # generated files; these will never actually be seen by this
- # check, and are left here as documentation
excludes = [
- "(parser|lexer)-tab\\.hh$"
- "\\.gen\\.hh$"
+ ''^src/pch/.*$''
+ # generated files; these will never actually be seen by this
+ # check, and are left here as documentation
+ ''(parser|lexer)-tab\.hh$''
+ ''\.gen\.hh$''
];
entry = lib.getExe pkgs.check-headers;
};