Debian Codegraph @

subprojects/packagefiles/syn-2-rs/meson.build

raw
1 project(
2 'syn',
3 'rust',
4 version : '2.0.87',
5 license : 'MIT OR Apache-2.0',
6 meson_version : '>= 1.7.0',
7 )
8
9 rc = meson.get_compiler('rust')
10
11
12 rust_args = [
13 '--cfg', 'feature="default"',
14 '--cfg', 'feature="derive"',
15 '--cfg', 'feature="parsing"',
16 '--cfg', 'feature="printing"',
17 '--cfg', 'feature="clone-impls"',
18 '--cfg', 'feature="proc-macro"',
19 '--cfg', 'feature="quote"',
20 '--cfg', 'feature="full"',
21 '--cfg', 'feature="visit-mut"',
22 ]
23 if rc.version().version_compare('< 1.36')
24 rust_args += ['--cfg', 'syn_omit_await_from_token_macro']
25 endif
26 if rc.version().version_compare('< 1.39')
27 rust_args += ['--cfg', 'syn_no_const_vec_new']
28 endif
29 if rc.version().version_compare('< 1.40')
30 rust_args += ['--cfg', 'syn_no_non_exhaustive']
31 endif
32 if rc.version().version_compare('< 1.56')
33 rust_args += ['--cfg', 'syn_no_negative_literal_parse']
34 endif
35
36 u_ind = subproject('unicode-ident-1-rs').get_variable('lib')
37 quote = subproject('quote-1-rs').get_variable('lib')
38 pm2 = subproject('proc-macro2-1-rs').get_variable('lib')
39
40
41 lib = static_library(
42 'syn',
43 'src/lib.rs',
44 rust_args : rust_args,
45 override_options : ['rust_std=2021', 'build.rust_std=2021', 'warning_level=0'],
46 link_with : [u_ind, quote, pm2],
47 rust_abi : 'rust',
48 native : true,
49 )
50
51 dep_syn = declare_dependency(
52 link_with : [lib, u_ind, quote, pm2],
53 )