Struct crossbundle_tools::types::AndroidNdk
source · [−]pub struct AndroidNdk { /* private fields */ }
Expand description
Helper structure that contains information about the Android NDK Path and returns paths to the tools.
Implementations
sourceimpl AndroidNdk
impl AndroidNdk
sourcepub fn toolchain_dir(&self) -> Result<PathBuf>
pub fn toolchain_dir(&self) -> Result<PathBuf>
Operating system type
sourcepub fn clang(
&self,
target: AndroidTarget,
platform: u32
) -> Result<(PathBuf, PathBuf)>
pub fn clang(
&self,
target: AndroidTarget,
platform: u32
) -> Result<(PathBuf, PathBuf)>
Path to Clang
sourcepub fn toolchain_bin(
&self,
name: &str,
build_target: AndroidTarget
) -> Result<PathBuf>
pub fn toolchain_bin(
&self,
name: &str,
build_target: AndroidTarget
) -> Result<PathBuf>
Path to bin
sourcepub fn readelf(&self, build_target: AndroidTarget) -> Result<Command>
pub fn readelf(&self, build_target: AndroidTarget) -> Result<Command>
Displaying various information
sourcepub fn sysroot_platform_lib_dir(
&self,
build_target: AndroidTarget,
min_sdk_version: u32
) -> Result<PathBuf>
pub fn sysroot_platform_lib_dir(
&self,
build_target: AndroidTarget,
min_sdk_version: u32
) -> Result<PathBuf>
Sysroot and lib platform
sourcepub fn find_ndk_path<F>(platform: u32, path_builder: F) -> Result<PathBuf> where
F: Fn(u32) -> PathBuf,
pub fn find_ndk_path<F>(platform: u32, path_builder: F) -> Result<PathBuf> where
F: Fn(u32) -> PathBuf,
Helper function for looking for a path based on the platform version Calls a closure for each attempt and then return the PathBuf for the first file that exists. Uses approach that NDK build tools use which is described at: https://developer.android.com/ndk/guides/application_mk “ - The platform version matching APP_PLATFORM.
- The next available API level below APP_PLATFORM. For example, android-19 will be used when APP_PLATFORM is android-20, since there were no new native APIs in android-20.
- The minimum API level supported by the NDK.“
sourcepub fn tool_root(&self) -> CargoResult<PathBuf>
pub fn tool_root(&self) -> CargoResult<PathBuf>
Return tool root from the toolchain directory
sourcepub fn linker_path(&self, build_target: &AndroidTarget) -> CargoResult<PathBuf>
pub fn linker_path(&self, build_target: &AndroidTarget) -> CargoResult<PathBuf>
Return path to linker
sourcepub fn gcc_lib_path(&self, build_target: &AndroidTarget) -> CargoResult<PathBuf>
pub fn gcc_lib_path(&self, build_target: &AndroidTarget) -> CargoResult<PathBuf>
Return path to gcc library
sourcepub fn sysroot(&self) -> CargoResult<PathBuf>
pub fn sysroot(&self) -> CargoResult<PathBuf>
Return path to sysroot
sourcepub fn sysroot_lib_dir(&self, build_target: &AndroidTarget) -> Result<PathBuf>
pub fn sysroot_lib_dir(&self, build_target: &AndroidTarget) -> Result<PathBuf>
Return path to sysroot library
sourcepub fn version_specific_libraries_path(
&self,
target_sdk_version: u32,
build_target: &AndroidTarget
) -> CargoResult<PathBuf>
pub fn version_specific_libraries_path(
&self,
target_sdk_version: u32,
build_target: &AndroidTarget
) -> CargoResult<PathBuf>
Return path to version specific libraries
Trait Implementations
sourceimpl Clone for AndroidNdk
impl Clone for AndroidNdk
sourcefn clone(&self) -> AndroidNdk
fn clone(&self) -> AndroidNdk
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for AndroidNdk
impl Send for AndroidNdk
impl Sync for AndroidNdk
impl Unpin for AndroidNdk
impl UnwindSafe for AndroidNdk
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more