1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
project(
'quote',
'rust',
version : '1.0.33',
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,
)
|