Skip to content

Commit

Permalink
meson: use optimization level 3 and LTO by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorBaker committed Dec 21, 2024
1 parent f72752c commit c94a74c
Show file tree
Hide file tree
Showing 23 changed files with 44 additions and 26 deletions.
4 changes: 0 additions & 4 deletions nix-meson-build-support/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ add_project_arguments(
'-Wno-deprecated-declarations',
language : 'cpp',
)

if get_option('buildtype') not in ['debug']
add_project_arguments('-O3', language : 'cpp')
endif
3 changes: 2 additions & 1 deletion src/libcmd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-cmd', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libexpr-c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-expr-c', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libexpr-test-support/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-expr-test-support', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libexpr-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-expr-tests', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libexpr/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-expr', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libfetchers-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-fetchers-tests', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libfetchers/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-fetchers', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libflake-c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-flake-c', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libflake-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-flake-tests', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libflake/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-flake', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libmain-c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-main-c', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libmain/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-main', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libstore-c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-store-c', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libstore-test-support/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-store-test-support', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libstore-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-store-tests', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libstore/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-store', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
'localstatedir=/nix/var',
],
Expand Down
3 changes: 2 additions & 1 deletion src/libutil-c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-util-c', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libutil-test-support/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-util-test-support', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libutil-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-util-tests', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/libutil/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-util', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.1',
Expand Down
3 changes: 2 additions & 1 deletion src/nix/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix', 'cpp',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
'localstatedir=/nix/var',
],
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ project('nix-functional-tests',
# TODO(Qyriad): increase the warning level
'warning_level=1',
'debug=true',
'optimization=2',
'optimization=3',
'b_lto=true',
'errorlogs=true', # Please print logs for tests that fail
],
meson_version : '>= 1.3',
Expand Down

0 comments on commit c94a74c

Please sign in to comment.