From be639f5299bd1adbfa0b2504b8e9dacba5212d1a Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Fri, 6 Dec 2024 08:34:41 -0800 Subject: [PATCH] Fix build in AOSP (#27) This patch is upstream of AOSP change. [1] [1] https://android-review.git.corp.google.com/c/platform/external/rust/cros-libva/+/3393139 Co-authored-by: Hirokazu Honda --- android/Android.bp | 6 ++++++ cargo_embargo.json | 1 - lib/Android.bp | 32 +------------------------------- 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/android/Android.bp b/android/Android.bp index 009b856..ba91773 100644 --- a/android/Android.bp +++ b/android/Android.bp @@ -17,6 +17,12 @@ rust_binary_host { clippy_lints: "android", vendor: true, + enabled: false, + arch: { + x86_64: { + enabled: true, + }, + }, } rust_bindgen { diff --git a/cargo_embargo.json b/cargo_embargo.json index f97ac4d..f4e52c7 100644 --- a/cargo_embargo.json +++ b/cargo_embargo.json @@ -6,5 +6,4 @@ } }, "run_cargo": false, - "tests": true } diff --git a/lib/Android.bp b/lib/Android.bp index 79c7378..923895c 100644 --- a/lib/Android.bp +++ b/lib/Android.bp @@ -9,36 +9,6 @@ package { default_applicable_licenses: ["external_rust_cros-libva_license"], } -rust_test { - name: "cros-libva_test_src_lib", - crate_name: "cros_libva", - cargo_env_compat: true, - cargo_pkg_version: "0.0.8", - crate_root: "src/lib.rs", - test_suites: ["general-tests"], - auto_gen_config: true, - test_options: { - unit_test: true, - }, - edition: "2021", - rustlibs: [ - "libbitflags", - "libcrc32fast", - "liblog_rust", - "libthiserror", - ], - - vendor: true, - enabled: false, - arch: { - x86_64: { - enabled: true, - // Bindgen-generated bindings of our local libva headers. - srcs: [":libcros_libva_bindgen"], - }, - }, -} - rust_library { name: "libcros_libva", crate_name: "cros_libva", @@ -70,7 +40,7 @@ rust_library { enabled: true, // Bindgen-generated bindings of our local libva headers. srcs: [":libcros_libva_bindgen"], - shared_libs: [ "libva" ], + shared_libs: ["libva"], }, }, }