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> {
124
124
}
125
125
126
126
/// 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.
127
128
pub fn bin_patched_path ( opts : & Opts ) -> Option < PathBuf > {
128
- match opts. no_patch_bin {
129
+ match opts. no_patch_bin || opts . libc . is_none ( ) {
129
130
true => None ,
130
131
false => opts
131
132
. bin
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ pub fn run(opts: Opts) -> Result {
49
49
50
50
set_ld_exec ( & opts) . context ( SetLdExecSnafu ) ?;
51
51
52
- if !opts. no_patch_bin {
52
+ // Skip if there is no libc.
53
+ if !opts. no_patch_bin && opts. libc . is_some ( ) {
53
54
patch_bin:: patch_bin ( & opts) . context ( PatchBinSnafu ) ?;
54
55
}
55
56
You can’t perform that action at this time.
0 commit comments