build: Add ci profile that uses --release

As we add more rust crates in performance-critical places,
we run into some performance issues with debug builds.
This makes it hard to get a good feel for the performance
of the application, as something may be slow simply because
it's not been optimized by the compiler.

This commit adds a ci profile to our meson options,
and adjusts our CI configuration to use it. Regular
builds should continue to use the development profile.

Also renames `default` to `release`
This commit is contained in:
Christopher Davis 2023-03-01 08:42:22 -05:00
parent 6857f2c921
commit 5bcf534142
4 changed files with 11 additions and 8 deletions

View file

@ -18,13 +18,13 @@ run_command(
cargo_options = [ '--manifest-path', source_root / 'Cargo.toml' ]
cargo_options += [ '--target-dir', build_root / 'src' ]
if get_option('profile') == 'default'
if get_option('profile') == 'development'
rust_target = 'debug'
message('Building in debug mode')
else
cargo_options += [ '--release' ]
rust_target = 'release'
message('Building in release mode')
else
rust_target = 'debug'
message('Building in debug mode')
endif
cargo_env = { 'CARGO_HOME': build_root / 'cargo-home' }