mesa/subprojects/packagefiles/quote/meson.build
Gurchetan Singh 62e36aeb95 subprojects: update quote to 1.0.35
Debian is at 1.0.37

https://tracker.debian.org/pkg/rust-quote

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00

32 lines
795 B
Meson

project(
'quote',
'rust',
version : '1.0.35',
license : 'MIT OR Apache-2.0',
)
rc = meson.get_compiler('rust')
if rc.version().version_compare('< 1.31')
error('Minimum rustc supported version is 1.31')
endif
rust_args = ['--cfg', 'feature="default"', '--cfg', 'feature="proc-macro"']
if rc.version().version_compare('< 1.53')
rust_args += ['--cfg', 'needs_invalid_span_workaround']
endif
pm2 = subproject('proc-macro2').get_variable('lib')
# XXX: workround for meson bug: https://github.com/mesonbuild/meson/issues/11306
rust_args += ['-L', 'dependency=subprojects/unicode-ident']
lib = static_library(
'quote',
'src/lib.rs',
rust_args : rust_args,
override_options : ['rust_std=2018', 'build.rust_std=2018'],
link_with : pm2,
rust_abi : 'rust',
native : true,
)