diff --git a/Cargo.toml b/Cargo.toml index ac91a20..eae8b49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,8 +7,6 @@ members = [ "tests", ] -exclude = ["target/*"] - [workspace.package] edition = "2021" version = "0.2.0" diff --git a/binder_ndk_sys/build.rs b/binder_ndk_sys/build.rs index 321818b..cdeea0f 100644 --- a/binder_ndk_sys/build.rs +++ b/binder_ndk_sys/build.rs @@ -17,6 +17,8 @@ rust-version = "1.67" [lib] crate-type = ["cdylib"] + +[workspace] "#; fn build_stub() -> Result<()> { @@ -42,7 +44,7 @@ fn build_stub() -> Result<()> { f.flush()?; let target = env::var("TARGET")?; - Command::new("cargo") + let s = Command::new("cargo") .arg("build") .arg("--target") .arg(&target) @@ -53,10 +55,12 @@ fn build_stub() -> Result<()> { .current_dir(&project_path) .status()?; + assert!(s.success(), "{s:?}"); + // we always use debug build for stub due to speed! println!( "cargo:rustc-link-search={}", - format!("{}/{}/{}", outdir, target, "debug") + format_args!("{}/{}/{}", outdir, target, "debug") ); println!("cargo:rustc-link-lib=binder_ndk");