| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "system_bt_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["system_bt_license"], |
| } |
| |
| rust_defaults { |
| name: "pdl_defaults", |
| srcs: ["src/main.rs"], |
| // LINT.IfChange |
| rustlibs: [ |
| "libanyhow", |
| "libcodespan_reporting", |
| "libpest", |
| "libproc_macro2", |
| "libquote", |
| "libserde", |
| "libserde_json", |
| "libstructopt", |
| "libsyn", |
| "libtempfile", |
| ], |
| proc_macros: [ |
| "libpest_derive", |
| ], |
| // LINT.ThenChange(Cargo.toml) |
| } |
| |
| rust_binary_host { |
| name: "pdl", |
| defaults: ["pdl_defaults"], |
| } |
| |
| rust_test_host { |
| name: "pdl_inline_tests", |
| defaults: ["pdl_defaults"], |
| test_suites: ["general-tests"], |
| enabled: false, // rustfmt is only available on x86. |
| arch: { |
| x86_64: { |
| enabled: true, |
| }, |
| }, |
| required: [ |
| "rustfmt", |
| ], |
| data: [ |
| ":rustfmt", |
| ], |
| } |