diff --git a/src/lib.rs b/src/lib.rs index 0890803..9561fc8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,7 +76,10 @@ fn visit_libc(opts: &Opts, libc: &Path) { } }; maybe_fetch_ld(opts, &ver).warn("failed fetching ld"); - unstrip_libc(libc, &ver).warn("failed unstripping libc"); + + if !opts.no_unstrip_libc { + unstrip_libc(libc, &ver).warn("failed unstripping libc"); + } } /// Same as `visit_libc()`, but doesn't do anything if no libc is found diff --git a/src/opts.rs b/src/opts.rs index a6be341..37f9bba 100644 --- a/src/opts.rs +++ b/src/opts.rs @@ -75,6 +75,10 @@ pub struct Opts { #[structopt(long)] pub no_patch_bin: bool, + /// Disable unstripping the libc + #[structopt(long)] + pub no_unstrip_libc: bool, + /// Disable generating template solve script #[structopt(long)] pub no_template: bool,