Loading android/app/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ cc_library { include_dirs: [ "packages/modules/Bluetooth/system/types", ], whole_static_libs: [ static_libs: [ "libbte", "libbt-bta-core", "libbt-common", Loading system/gd/dumpsys/bundler/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ genrule { visibility: [ "//packages/modules/Bluetooth/system/gd", "//packages/modules/Bluetooth/system/main", "//packages/modules/Bluetooth/system/rust", ], tools: [ "flatc", Loading system/gd/rust/common/Cargo.toml +4 −0 Original line number Diff line number Diff line Loading @@ -36,3 +36,7 @@ tokio = { version = "1.0", features = ['bytes', 'macros', 'net', 'rt-multi-threa [lib] crate-type = ["rlib"] [features] default = ["keystore"] keystore = [] system/gd/rust/common/build.rs +9 −7 Original line number Diff line number Diff line fn main() { let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap(); // Link the keystore static lib and make sure to use -lc++ #[cfg(feature = "keystore")] { let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap(); println!("cargo:rustc-link-lib=static=bt_keystore_cc"); println!("cargo:rustc-link-search=native={}", target_dir.clone().into_string().unwrap()); println!("cargo:rustc-link-lib=c++"); // Re-run if static libs or this file changed. // Re-run if this file changed. println!("cargo:rerun-if-changed={}", target_dir.into_string().unwrap()); } println!("cargo:rerun-if-changed=build.rs"); } system/gd/rust/shim/Android.bp +4 −4 Original line number Diff line number Diff line Loading @@ -50,6 +50,10 @@ rust_defaults { static_libs: [ "libbt_callbacks_cxx", ], apex_available: [ "com.android.btservices", ], min_sdk_version: "30", } rust_library_rlib { Loading @@ -60,10 +64,6 @@ rust_library_rlib { rust_ffi_static { name: "libbt_shim_ffi", defaults: ["libbt_shim_defaults"], apex_available: [ "com.android.btservices", ], min_sdk_version: "30", } cc_library_static { Loading Loading
android/app/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ cc_library { include_dirs: [ "packages/modules/Bluetooth/system/types", ], whole_static_libs: [ static_libs: [ "libbte", "libbt-bta-core", "libbt-common", Loading
system/gd/dumpsys/bundler/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ genrule { visibility: [ "//packages/modules/Bluetooth/system/gd", "//packages/modules/Bluetooth/system/main", "//packages/modules/Bluetooth/system/rust", ], tools: [ "flatc", Loading
system/gd/rust/common/Cargo.toml +4 −0 Original line number Diff line number Diff line Loading @@ -36,3 +36,7 @@ tokio = { version = "1.0", features = ['bytes', 'macros', 'net', 'rt-multi-threa [lib] crate-type = ["rlib"] [features] default = ["keystore"] keystore = []
system/gd/rust/common/build.rs +9 −7 Original line number Diff line number Diff line fn main() { let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap(); // Link the keystore static lib and make sure to use -lc++ #[cfg(feature = "keystore")] { let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap(); println!("cargo:rustc-link-lib=static=bt_keystore_cc"); println!("cargo:rustc-link-search=native={}", target_dir.clone().into_string().unwrap()); println!("cargo:rustc-link-lib=c++"); // Re-run if static libs or this file changed. // Re-run if this file changed. println!("cargo:rerun-if-changed={}", target_dir.into_string().unwrap()); } println!("cargo:rerun-if-changed=build.rs"); }
system/gd/rust/shim/Android.bp +4 −4 Original line number Diff line number Diff line Loading @@ -50,6 +50,10 @@ rust_defaults { static_libs: [ "libbt_callbacks_cxx", ], apex_available: [ "com.android.btservices", ], min_sdk_version: "30", } rust_library_rlib { Loading @@ -60,10 +64,6 @@ rust_library_rlib { rust_ffi_static { name: "libbt_shim_ffi", defaults: ["libbt_shim_defaults"], apex_available: [ "com.android.btservices", ], min_sdk_version: "30", } cc_library_static { Loading