File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,9 @@ fn bin_patched_path_from_bin(bin: &Path) -> Result<PathBuf> {
124124}
125125
126126/// Add "_patched" to the end of the binary file name if the binary got patched.
127+ /// Skip if there is no libc or if the user disabled patching.
127128pub fn bin_patched_path ( opts : & Opts ) -> Option < PathBuf > {
128- match opts. no_patch_bin {
129+ match opts. no_patch_bin || opts . libc . is_none ( ) {
129130 true => None ,
130131 false => opts
131132 . bin
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ pub fn run(opts: Opts) -> Result {
4949
5050 set_ld_exec ( & opts) . context ( SetLdExecSnafu ) ?;
5151
52- if !opts. no_patch_bin {
52+ // Skip if there is no libc.
53+ if !opts. no_patch_bin && opts. libc . is_some ( ) {
5354 patch_bin:: patch_bin ( & opts) . context ( PatchBinSnafu ) ?;
5455 }
5556
You can’t perform that action at this time.
0 commit comments