mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
This was lost in the switch to the new build system. -O3 provides around a 10% performance gain compared to -O2, see e.g. nix-env.qaAggressive.time in https://hydra.nixos.org/job/nix/master/metrics.nixpkgs#tabs-charts.
22 lines
599 B
Meson
22 lines
599 B
Meson
# This is only conditional to work around
|
|
# https://github.com/mesonbuild/meson/issues/13293. It should be
|
|
# unconditional.
|
|
if not (host_machine.system() == 'windows' and cxx.get_id() == 'gcc')
|
|
deps_private += dependency('threads')
|
|
endif
|
|
|
|
add_project_arguments(
|
|
'-Wdeprecated-copy',
|
|
'-Werror=suggest-override',
|
|
'-Werror=switch',
|
|
'-Werror=switch-enum',
|
|
'-Werror=unused-result',
|
|
'-Wignored-qualifiers',
|
|
'-Wimplicit-fallthrough',
|
|
'-Wno-deprecated-declarations',
|
|
language : 'cpp',
|
|
)
|
|
|
|
if get_option('buildtype') not in ['debug']
|
|
add_project_arguments('-O3', language : 'cpp')
|
|
endif
|