From 706691a7152d88c110068ea7bb4c3725ff6916c7 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 15 Apr 2024 11:19:50 -0700 Subject: [PATCH] nouveau: require cbindgen >= 0.25 So we can use the --depfile option, and not have to worry about new files. Since it's Rust, the expectation is that you're going to have up to date dependencies anyway. Reviewed-by: Faith Ekstrand Part-of: --- src/nouveau/nil/meson.build | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/nouveau/nil/meson.build b/src/nouveau/nil/meson.build index ef904f9f0c5..40f2edfcf0e 100644 --- a/src/nouveau/nil/meson.build +++ b/src/nouveau/nil/meson.build @@ -12,7 +12,7 @@ if rc.version().version_compare('< 1.73.0') error('nil_rs requires Rust 1.73.0') endif -prog_cbindgen = find_program('cbindgen', required : false, native : true) +prog_cbindgen = find_program('cbindgen', required : false, native : true, version : '>= 0.25') dep_paste = dependency('paste', version : '>= 1.0.14', @@ -38,16 +38,6 @@ _libnil_format_table = static_library( gnu_symbol_visibility: 'hidden', ) -# Thanks to cbindgen, this does need to include everything -_libnil_files = files( - 'lib.rs', # lib.rs has to come first - 'extent.rs', - 'format.rs', - 'image.rs', - 'tic.rs', - 'tiling.rs', -) - _libnil_deps = [ dep_paste, idep_bitview_rs, @@ -113,12 +103,14 @@ _libnil = static_library( _nil_h = custom_target( 'nil_h', - input : [files('cbindgen.toml'), _libnil_files], + input : [files('cbindgen.toml'), 'lib.rs'], output : ['nil.h'], command : [ prog_cbindgen, '-q', '--config', '@INPUT0@', '--lang', 'c', - '--output', '@OUTPUT0@', '--', '@INPUT1@' + '--output', '@OUTPUT0@', '--depfile', '@DEPFILE@', + '--', '@INPUT1@', ], + depfile : 'nil.h.d', ) idep_nil = declare_dependency(