xref: /openbmc/qemu/rust/hw/char/pl011/meson.build (revision f7214f99)
1subproject('bilge-0.2-rs', required: true)
2subproject('bilge-impl-0.2-rs', required: true)
3
4bilge_dep = dependency('bilge-0.2-rs')
5bilge_impl_dep = dependency('bilge-impl-0.2-rs')
6
7_libpl011_rs = static_library(
8  'pl011',
9  files('src/lib.rs'),
10  override_options: ['rust_std=2021', 'build.rust_std=2021'],
11  rust_abi: 'rust',
12  dependencies: [
13    bilge_dep,
14    bilge_impl_dep,
15    qemu_api,
16    qemu_api_macros,
17  ],
18)
19
20rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency(
21  link_whole: [_libpl011_rs],
22  # Putting proc macro crates in `dependencies` is necessary for Meson to find
23  # them when compiling the root per-target static rust lib.
24  dependencies: [bilge_impl_dep, qemu_api_macros],
25  variables: {'crate': 'pl011'},
26)])
27