Compare commits
1 Commits
dead-code-
...
meson-pch-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c105846646 |
@@ -27,3 +27,13 @@ option(
|
||||
value : false,
|
||||
description : 'Build benchmarks (requires gbenchmark)',
|
||||
)
|
||||
|
||||
# Emulating 'auto' options, since we don't want auto_features to affect this
|
||||
# and there's no other way of conditionally defaulting the value.
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
)
|
||||
|
||||
@@ -29,7 +29,11 @@ add_project_arguments(
|
||||
)
|
||||
|
||||
# GCC doesn't benefit much from precompiled headers.
|
||||
do_pch = cxx.get_id() == 'clang'
|
||||
if get_option('pch') == 'auto'
|
||||
do_pch = cxx.get_id() == 'clang'
|
||||
else
|
||||
do_pch = get_option('pch') == 'enabled'
|
||||
endif
|
||||
|
||||
# This is a clang-only option for improving build times.
|
||||
# It forces the instantiation of templates in the PCH itself and
|
||||
@@ -38,7 +42,7 @@ do_pch = cxx.get_id() == 'clang'
|
||||
# bother checking the version.
|
||||
# This feature helps in particular with the expensive nlohmann::json template
|
||||
# instantiations in libutil and libstore.
|
||||
if cxx.get_id() == 'clang'
|
||||
if cxx.get_id() == 'clang' and do_pch
|
||||
add_project_arguments('-fpch-instantiate-templates', language : 'cpp')
|
||||
endif
|
||||
|
||||
|
||||
@@ -13,3 +13,13 @@ option(
|
||||
value : 'editline',
|
||||
description : 'Which library to use for nice line editing with the Nix language REPL',
|
||||
)
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
|
||||
10
src/libexpr-tests/meson.options
Normal file
10
src/libexpr-tests/meson.options
Normal file
@@ -0,0 +1,10 @@
|
||||
# vim: filetype=meson
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
@@ -3,3 +3,13 @@ option(
|
||||
type : 'feature',
|
||||
description : 'enable garbage collection in the Nix expression evaluator (requires Boehm GC)',
|
||||
)
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
|
||||
10
src/libfetchers/meson.options
Normal file
10
src/libfetchers/meson.options
Normal file
@@ -0,0 +1,10 @@
|
||||
# vim: filetype=meson
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
@@ -7,3 +7,13 @@ option(
|
||||
description : 'Build benchmarks (requires gbenchmark)',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
|
||||
@@ -40,3 +40,13 @@ option(
|
||||
value : 'disabled',
|
||||
description : 'Enable curl-based S3 binary cache store support (requires aws-crt-cpp and curl >= 7.75.0)',
|
||||
)
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
|
||||
10
src/libutil-tests/meson.options
Normal file
10
src/libutil-tests/meson.options
Normal file
@@ -0,0 +1,10 @@
|
||||
# vim: filetype=meson
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
@@ -5,3 +5,13 @@ option(
|
||||
type : 'feature',
|
||||
description : 'determine microarchitecture levels with libcpuid (only relevant on x86_64)',
|
||||
)
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
|
||||
@@ -7,3 +7,13 @@ option(
|
||||
value : 'etc/profile.d',
|
||||
description : 'the path to install shell profile files',
|
||||
)
|
||||
|
||||
option(
|
||||
'pch',
|
||||
type : 'combo',
|
||||
choices : [ 'auto', 'enabled', 'disabled' ],
|
||||
value : 'auto',
|
||||
description : 'Use C++ Precompiled Headers to speed up compilation',
|
||||
yield : true,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user