Skip to content

Commit b91ae0d

Browse files
committed
Remove stripping functionality
1 parent aa5ab7a commit b91ae0d

2 files changed

Lines changed: 13 additions & 47 deletions

File tree

src/cargo.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,3 @@ pub(crate) fn run(
333333

334334
Ok((status, artifacts))
335335
}
336-
337-
pub(crate) fn strip(ndk_home: &Path, bin_path: &Path) -> std::process::ExitStatus {
338-
let target_strip = ndk_home.join(ndk_tool(ARCH, "llvm-strip"));
339-
340-
// log::debug!("strip: {}", &target_strip.display());
341-
342-
Command::new(target_strip)
343-
.arg(bin_path)
344-
.status()
345-
.expect("strip crashed")
346-
}

src/cli.rs

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,14 @@ use crate::{
2727

2828
#[derive(Debug, Parser)]
2929
struct ArgsEnv {
30-
/// platform (also known as API level)
31-
#[arg(long)]
32-
platform: Option<u8>,
33-
34-
/// deprecated, always true
35-
#[arg(long, default_value = "true")]
36-
#[allow(unused)]
37-
bindgen: bool,
38-
3930
/// triples for the target. Additionally, Android target names are supported: armeabi-v7a arm64-v8a x86 x86_64
4031
#[arg(short, long)]
4132
target: Target,
4233

34+
/// platform (also known as API level)
35+
#[arg(long)]
36+
platform: Option<u8>,
37+
4338
/// use PowerShell syntax
4439
#[arg(long)]
4540
powershell: bool,
@@ -51,33 +46,25 @@ struct ArgsEnv {
5146

5247
#[derive(Debug, Parser)]
5348
struct Args {
54-
/// args to be passed to cargo
55-
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
56-
cargo_args: Vec<String>,
57-
58-
/// output to a jniLibs directory in the correct sub-directories
59-
#[arg(short, long, value_name = "DIR")]
60-
output_dir: Option<PathBuf>,
49+
/// triples for the target(s). Additionally, Android target names are supported: armeabi-v7a arm64-v8a x86 x86_64
50+
#[arg(short, long)]
51+
target: Vec<Target>,
6152

6253
/// platform (also known as API level)
6354
#[arg(long)]
6455
platform: Option<u8>,
6556

66-
/// disable stripping debug symbols
67-
#[arg(long)]
68-
no_strip: bool,
57+
/// output to a jniLibs directory in the correct sub-directories
58+
#[arg(short, long, value_name = "DIR")]
59+
output_dir: Option<PathBuf>,
6960

7061
/// path to Cargo.toml
7162
#[arg(long, value_name = "PATH")]
7263
manifest_path: Option<PathBuf>,
7364

74-
/// set bindgen-specific environment variables (BINDGEN_EXTRA_CLANG_ARGS_*) when building
75-
#[arg(long)]
76-
bindgen: bool,
77-
78-
/// triples for the target(s). Additionally, Android target names are supported: armeabi-v7a arm64-v8a x86 x86_64
79-
#[arg(short, long)]
80-
target: Vec<Target>,
65+
/// args to be passed to cargo
66+
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
67+
cargo_args: Vec<String>,
8168
}
8269

8370
fn highest_version_ndk_in_path(ndk_dir: &Path) -> Option<PathBuf> {
@@ -818,16 +805,6 @@ pub fn run(args: Vec<String>) -> anyhow::Result<()> {
818805
),
819806
)
820807
.with_context(|| format!("unable to update the modification time of {dest:?}"))?;
821-
822-
if !args.no_strip {
823-
shell.verbose(|shell| {
824-
shell.status(
825-
"Stripping",
826-
format!("{}", &dunce::canonicalize(&dest).unwrap().display()),
827-
)
828-
})?;
829-
let _ = crate::cargo::strip(&ndk_home, &dest);
830-
}
831808
}
832809
}
833810
}

0 commit comments

Comments
 (0)