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

libutil-tests: Improve compile times with PCH

(Before)

**** Time summary:
Compilation (30 times):
  Parsing (frontend):           98.2 s
  Codegen & opts (backend):     27.7 s

(After)

**** Time summary:
Compilation (31 times):
  Parsing (frontend):           34.9 s
  Codegen & opts (backend):     28.1 s
This commit is contained in:
Sergei Zimmerman 2025-08-17 00:57:06 +03:00
parent d6973e105c
commit f13aeaf2f1
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View file

@ -89,6 +89,7 @@ this_exe = executable(
link_args : linker_export_flags + [ '-lrapidcheck' ],
# get main from gtest
install : true,
cpp_pch : do_pch ? [ 'pch/precompiled-headers.hh' ] : [],
)
test(

View file

@ -0,0 +1,5 @@
#include "nix/util/util.hh"
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <rapidcheck/gtest.h>