mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 11:36:03 +01:00
Merge pull request #13512 from xokdvium/speed-up-builds-pch
Reintroduce precompiled headers
This commit is contained in:
commit
6ec50ba736
10 changed files with 28 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ this_library = library(
|
|||
link_args: linker_export_flags,
|
||||
prelink : true, # For C++ static initializers
|
||||
install : true,
|
||||
cpp_pch : ['pch/precompiled-headers.hh']
|
||||
)
|
||||
|
||||
install_headers(headers, subdir : 'nix/cmd', preserve_path : true)
|
||||
|
|
|
|||
4
src/libcmd/pch/precompiled-headers.hh
Normal file
4
src/libcmd/pch/precompiled-headers.hh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#include "nix/cmd/installables.hh"
|
||||
#include "nix/expr/eval.hh"
|
||||
#include "nix/util/util.hh"
|
||||
#include "nix/flake/flake.hh"
|
||||
|
|
@ -178,6 +178,7 @@ this_library = library(
|
|||
link_args: linker_export_flags,
|
||||
prelink : true, # For C++ static initializers
|
||||
install : true,
|
||||
cpp_pch : ['pch/precompiled-headers.hh']
|
||||
)
|
||||
|
||||
install_headers(headers, subdir : 'nix/expr', preserve_path : true)
|
||||
|
|
|
|||
1
src/libexpr/pch/precompiled-headers.hh
Normal file
1
src/libexpr/pch/precompiled-headers.hh
Normal file
|
|
@ -0,0 +1 @@
|
|||
#include "nix/expr/eval.hh"
|
||||
|
|
@ -348,6 +348,7 @@ this_library = library(
|
|||
link_args: linker_export_flags,
|
||||
prelink : true, # For C++ static initializers
|
||||
install : true,
|
||||
cpp_pch : ['pch/precompiled-headers.hh']
|
||||
)
|
||||
|
||||
install_headers(headers, subdir : 'nix/store', preserve_path : true)
|
||||
|
|
|
|||
8
src/libstore/pch/precompiled-headers.hh
Normal file
8
src/libstore/pch/precompiled-headers.hh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include "nix/store/store-api.hh"
|
||||
#include "nix/store/realisation.hh"
|
||||
#include "nix/store/derived-path.hh"
|
||||
#include "nix/store/derivations.hh"
|
||||
#include "nix/store/local-store.hh"
|
||||
#include "nix/util/util.hh"
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
|
@ -191,6 +191,7 @@ this_library = library(
|
|||
link_args: linker_export_flags,
|
||||
prelink : true, # For C++ static initializers
|
||||
install : true,
|
||||
cpp_pch : 'pch/precompiled-headers.hh'
|
||||
)
|
||||
|
||||
install_headers(headers, subdir : 'nix/util', preserve_path : true)
|
||||
|
|
|
|||
7
src/libutil/pch/precompiled-headers.hh
Normal file
7
src/libutil/pch/precompiled-headers.hh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include "nix/util/util.hh"
|
||||
#include "nix/util/file-system.hh"
|
||||
#include "nix/util/serialise.hh"
|
||||
#include "nix/util/signals.hh"
|
||||
#include "nix/util/source-accessor.hh"
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
|
@ -186,6 +186,7 @@ this_exe = executable(
|
|||
include_directories : include_dirs,
|
||||
link_args: linker_export_flags,
|
||||
install : true,
|
||||
cpp_pch : ['pch/precompiled-headers.hh']
|
||||
)
|
||||
|
||||
meson.override_find_program('nix', this_exe)
|
||||
|
|
|
|||
3
src/nix/pch/precompiled-headers.hh
Normal file
3
src/nix/pch/precompiled-headers.hh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include "nix/cmd/command.hh"
|
||||
#include "nix/expr/eval.hh"
|
||||
#include "nix/main/shared.hh"
|
||||
Loading…
Add table
Add a link
Reference in a new issue