fp in env
This commit is contained in:
parent
5f7a00709f
commit
16eb77c20a
1 changed files with 10 additions and 9 deletions
19
meson.build
19
meson.build
|
@ -38,16 +38,17 @@ subdir('po')
|
|||
subdir('resources')
|
||||
subdir('src')
|
||||
|
||||
if get_option('buildtype') == 'debug'
|
||||
rust_args = []
|
||||
rust_target = 'debug'
|
||||
else
|
||||
rust_args = ['--release']
|
||||
rust_target = 'release'
|
||||
endif
|
||||
|
||||
cargo = find_program('cargo')
|
||||
cargo_env = environment()
|
||||
|
||||
if get_option('buildtype') == 'debug'
|
||||
cargo_args = []
|
||||
cargo_env.append('RUSTFLAGS', '-Cforce-frame-pointers=true', separator: ' ')
|
||||
else
|
||||
cargo_args = ['--release']
|
||||
extra_rustflags = []
|
||||
endif
|
||||
|
||||
cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root())
|
||||
cargo_env.set('CARGO_MANIFEST_DIR', meson.project_source_root())
|
||||
cargo_env.set('CARGO_TARGET_DIR', meson.project_build_root() / 'target')
|
||||
|
@ -64,6 +65,6 @@ custom_target(
|
|||
console: true,
|
||||
# means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper
|
||||
output: meson.project_name(),
|
||||
command: [cargo, 'build', rust_args],
|
||||
command: [cargo, 'build', cargo_args],
|
||||
env: cargo_env,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue