mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
Merge pull request #13678 from xokdvium/pch-disable-gcc
meson: Disable PCH for GCC
This commit is contained in:
commit
dbccfc277f
6 changed files with 8 additions and 5 deletions
|
|
@ -19,6 +19,9 @@ add_project_arguments(
|
||||||
language : 'cpp',
|
language : 'cpp',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# GCC doesn't benefit much from precompiled headers.
|
||||||
|
do_pch = cxx.get_id() == 'clang'
|
||||||
|
|
||||||
# This is a clang-only option for improving build times.
|
# This is a clang-only option for improving build times.
|
||||||
# It forces the instantiation of templates in the PCH itself and
|
# It forces the instantiation of templates in the PCH itself and
|
||||||
# not every translation unit it's included in.
|
# not every translation unit it's included in.
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ this_library = library(
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
cpp_pch : ['pch/precompiled-headers.hh']
|
cpp_pch : do_pch ? ['pch/precompiled-headers.hh'] : []
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers(headers, subdir : 'nix/cmd', preserve_path : true)
|
install_headers(headers, subdir : 'nix/cmd', preserve_path : true)
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ this_library = library(
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
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)
|
install_headers(headers, subdir : 'nix/expr', preserve_path : true)
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ this_library = library(
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
cpp_pch : ['pch/precompiled-headers.hh']
|
cpp_pch : do_pch ? ['pch/precompiled-headers.hh'] : []
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers(headers, subdir : 'nix/store', preserve_path : true)
|
install_headers(headers, subdir : 'nix/store', preserve_path : true)
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ this_library = library(
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
cpp_pch : 'pch/precompiled-headers.hh'
|
cpp_pch : do_pch ? ['pch/precompiled-headers.hh'] : []
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers(headers, subdir : 'nix/util', preserve_path : true)
|
install_headers(headers, subdir : 'nix/util', preserve_path : true)
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ this_exe = executable(
|
||||||
include_directories : include_dirs,
|
include_directories : include_dirs,
|
||||||
link_args: linker_export_flags,
|
link_args: linker_export_flags,
|
||||||
install : true,
|
install : true,
|
||||||
cpp_pch : ['pch/precompiled-headers.hh']
|
cpp_pch : do_pch ? ['pch/precompiled-headers.hh'] : []
|
||||||
)
|
)
|
||||||
|
|
||||||
meson.override_find_program('nix', this_exe)
|
meson.override_find_program('nix', this_exe)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue