From ed120a61abc35b2a0a782dfce3935013cc108d50 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 Nov 2024 19:16:27 +0100 Subject: [PATCH] Use -O3 again 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. --- build-utils-meson/common/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-utils-meson/common/meson.build b/build-utils-meson/common/meson.build index 67b6658f5..f0322183e 100644 --- a/build-utils-meson/common/meson.build +++ b/build-utils-meson/common/meson.build @@ -16,3 +16,7 @@ add_project_arguments( '-Wno-deprecated-declarations', language : 'cpp', ) + +if get_option('buildtype') not in ['debug'] + add_project_arguments('-O3', language : 'cpp') +endif