Skip to content

Commit

Permalink
cargo-apk: Use ndk-gdb from the NDK root directory instead of expec…
Browse files Browse the repository at this point in the history
…ting it in $PATH (#257)

Hardly anyone has the root directory of the NDK in their `$PATH` or
installed globally.  Thus, just like any other tool, invoke it from the
detected and selected NDK directly.
  • Loading branch information
MarijnS95 authored Apr 19, 2022
1 parent 8ecfe68 commit 7116fd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cargo-apk/src/apk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ impl<'a> ApkBuilder<'a> {
jni_dir.join("Android.mk"),
format!("APP_ABI=\"{}\"\nTARGET_OUT=\"\"\n", abi.android_abi()),
)?;
Command::new("ndk-gdb").current_dir(target_dir).status()?;
Command::new(self.ndk.ndk().join("ndk-gdb"))
.current_dir(target_dir)
.status()?;
Ok(())
}

Expand Down

0 comments on commit 7116fd0

Please sign in to comment.