From e8ddb4325b856e17aafd7f7d15c5373e00fc812f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 8 Mar 2025 12:13:31 -0700 Subject: [PATCH] [fontations] Consolidate args a bit --- src/fontations/meson.build | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/fontations/meson.build b/src/fontations/meson.build index d4a9b7ecf..27ed29b42 100644 --- a/src/fontations/meson.build +++ b/src/fontations/meson.build @@ -14,7 +14,14 @@ cargo = find_program('cargo') rustfmt = find_program('rustfmt') rust_flags = '' -cargo_args = [] +cargo_args = [ + '--package', 'harfbuzz_fontations', + '--lib', + '--target-dir', meson.current_build_dir(), + '--manifest-path', meson.current_source_dir() / 'Cargo.toml', + '-Z', 'build-std=std,panic_abort', + '-Z', 'build-std-features=panic_immediate_abort', +] buildtype = get_option('buildtype') if buildtype == 'release' or buildtype == 'debugoptimized' @@ -24,9 +31,6 @@ endif opt_level = get_option('optimization') rust_flags += ' -C opt-level=' + opt_level -cargo_args += ['-Z', 'build-std=std,panic_abort', - '-Z', 'build-std-features=panic_immediate_abort'] - harfbuzz_fontations = custom_target( 'harfbuzz_fontations', input: ['lib.rs', 'Cargo.toml', 'Cargo.lock'], @@ -38,11 +42,8 @@ harfbuzz_fontations = custom_target( command: [ cargo, 'build', ] + cargo_args + [ - '--lib', - '--target-dir', meson.current_build_dir(), '-Z', 'unstable-options', '--artifact-dir', meson.current_build_dir(), - '--manifest-path', meson.current_source_dir() / 'Cargo.toml' ], install: true, install_dir: join_paths(get_option('prefix'), 'lib'), @@ -57,11 +58,8 @@ clippy_fix = run_target( env: ['OUT_DIR=' + meson.current_build_dir()], command: [ cargo, 'clippy', - '--allow-dirty', '--fix', ] + cargo_args + [ - '--lib', '-p', 'harfbuzz_fontations', - '--target-dir', meson.current_build_dir(), - '--manifest-path', meson.current_source_dir() / 'Cargo.toml', + '--allow-dirty', '--fix', ], ) if get_option('tests').enabled() and cargo.found() @@ -72,9 +70,6 @@ if get_option('tests').enabled() and cargo.found() args: [ 'clippy', ] + cargo_args + [ - '--lib', '-p', 'harfbuzz_fontations', - '--target-dir', meson.current_build_dir(), - '--manifest-path', meson.current_source_dir() / 'Cargo.toml', '--', '-D', 'warnings', ], )