Files
third_party_mesa3d/subprojects/packagefiles/quote/meson.build
Faith Ekstrand 5a80c2e89a meson: Pull in syn from crates.io
We don't have real crates.io support yet so this uses a hack where it
pulls wraps from my personal github.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:07 +00:00

33 lines
794 B
Meson

project(
'quote',
'rust',
version : '1.0.25',
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,
)