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