diff options
Diffstat (limited to 'community/rust/minimize-rpath.patch')
-rw-r--r-- | community/rust/minimize-rpath.patch | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch index 8d3be50cbe..1d89d7d5af 100644 --- a/community/rust/minimize-rpath.patch +++ b/community/rust/minimize-rpath.patch @@ -31,7 +31,7 @@ and skip it there. @@ -87,11 +88,13 @@ } - fn get_rpaths_relative_to_output(config: &mut RPathConfig, + fn get_rpaths_relative_to_output(config: &mut RPathConfig<'_>, - libs: &[PathBuf]) -> Vec<String> { - libs.iter().map(|a| get_rpath_relative_to_output(config, a)).collect() + libs: &[PathBuf], @@ -39,15 +39,15 @@ and skip it there. + libs.iter().filter_map(|a| get_rpath_relative_to_output(config, a, omit)).collect() } --fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String { -+fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path, +-fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path) -> String { ++fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path, + omit: &Vec<String>) -> Option<String> { // Mac doesn't appear to support $ORIGIN let prefix = if config.is_like_osx { "@loader_path" @@ -105,10 +108,16 @@ let mut output = cwd.join(&config.out_filename); - output.pop(); + output.pop(); // strip filename let output = fs::canonicalize(&output).unwrap_or(output); - let relative = path_relative_from(&lib, &output).unwrap_or_else(|| - panic!("couldn't create relative path from {:?} to {:?}", output, lib)); @@ -97,4 +97,3 @@ and skip it there. assert_eq!(res, "$ORIGIN/../lib"); } } - |