1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5rust_binary { 6 name: "fsfdt", 7 crate_name: "fsfdt", 8 defaults: ["avf_build_flags_rust"], 9 edition: "2021", 10 srcs: ["src/main.rs"], 11 prefer_rlib: true, 12 rustlibs: [ 13 "libanyhow", 14 "libclap", 15 "libfsfdt", 16 "liblibfdt", 17 ], 18} 19 20rust_defaults { 21 name: "libfsfdt_default", 22 crate_name: "fsfdt", 23 defaults: ["avf_build_flags_rust"], 24 edition: "2021", 25 srcs: ["src/lib.rs"], 26 prefer_rlib: true, 27 rustlibs: [ 28 "liblibfdt", 29 "libanyhow", 30 ], 31 apex_available: ["com.android.virt"], 32} 33 34rust_library_rlib { 35 name: "libfsfdt", 36 defaults: ["libfsfdt_default"], 37} 38 39rust_test { 40 name: "libfsfdt_test", 41 defaults: ["libfsfdt_default"], 42 data: ["testdata/**/*"], 43 data_bins: ["dtc_static"], 44 prefer_rlib: true, 45 rustlibs: ["libdts"], 46 compile_multilib: "first", 47} 48