From 4780dd6bc4f33a5340934ac3ff1c47ee682ca395 Mon Sep 17 00:00:00 2001 From: Olivia Crain Date: Tue, 24 Sep 2024 17:23:53 -0500 Subject: build: let meson add compiler flags for libstdc++ assertions We have manually enabled libstdc++ assertions since cl/797. Meson 1.4.0 (the minimum version we mandate) enables this by default, so we can remove the enabling compiler flag from the list of project arguments. With this patch, `-D_GLIBCXX_ASSERTIONS=1` is still present in the compile command logs when building with both gccStdenv and clangStdenv. See: https://gerrit.lix.systems/c/lix/+/797 See: https://mesonbuild.com/Release-notes-for-1-4-0.html#ndebug-setting-now-controls-c-stdlib-assertions Change-Id: I53483fadfe5cbd11ba35544b437d3a9ee8031631 --- meson.build | 6 ------ 1 file changed, 6 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index ea2050b6b..a8c6b9621 100644 --- a/meson.build +++ b/meson.build @@ -493,12 +493,6 @@ add_project_arguments( '-Wdeprecated-copy', '-Wignored-qualifiers', '-Werror=suggest-override', - # Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked - # at ~1% overhead in `nix search`. - # - # FIXME: remove when we get meson 1.4.0 which will default this to on for us: - # https://mesonbuild.com/Release-notes-for-1-4-0.html#ndebug-setting-now-controls-c-stdlib-assertions - '-D_GLIBCXX_ASSERTIONS=1', language : 'cpp', ) -- cgit v1.2.3