1*0534248aSZhao Liu_libhpet_rs = static_library( 2*0534248aSZhao Liu 'hpet', 3*0534248aSZhao Liu files('src/lib.rs'), 4*0534248aSZhao Liu override_options: ['rust_std=2021', 'build.rust_std=2021'], 5*0534248aSZhao Liu rust_abi: 'rust', 6*0534248aSZhao Liu dependencies: [ 7*0534248aSZhao Liu qemu_api, 8*0534248aSZhao Liu qemu_api_macros, 9*0534248aSZhao Liu ], 10*0534248aSZhao Liu) 11*0534248aSZhao Liu 12*0534248aSZhao Liurust_devices_ss.add(when: 'CONFIG_X_HPET_RUST', if_true: [declare_dependency( 13*0534248aSZhao Liu link_whole: [_libhpet_rs], 14*0534248aSZhao Liu # Putting proc macro crates in `dependencies` is necessary for Meson to find 15*0534248aSZhao Liu # them when compiling the root per-target static rust lib. 16*0534248aSZhao Liu dependencies: [qemu_api_macros], 17*0534248aSZhao Liu variables: {'crate': 'hpet'}, 18*0534248aSZhao Liu)]) 19