master
build 26 lines 692 Bytes
Raw
1 _libpl011_bindings_inc_rs = rust.bindgen(
2 args: bindgen_args_common + [
3 '--allowlist-file', meson.project_source_root() / 'include/hw/char/pl011.h',
4 '--blocklist-file',
5 meson.project_source_root() /
6 'include/(block\|chardev/|exec/|hw/core/|qemu/|qom/|system/).*',
7 ],
8 kwargs: bindgen_kwargs,
9 )
10
11 _libpl011_rs = cargo_ws.package('pl011').library(
12 structured_sources(
13 [
14 'src/lib.rs',
15 'src/bindings.rs',
16 'src/device.rs',
17 'src/registers.rs',
18 ],
19 {'.' : _libpl011_bindings_inc_rs},
20 ),
21 )
22
23 rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency(
24 link_whole: [_libpl011_rs],
25 variables: {'crate': 'pl011'},
26 )])