We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0ab04a commit 581da42Copy full SHA for 581da42
src/cargo/core/compiler/compilation.rs
@@ -203,7 +203,13 @@ impl<'cfg> Compilation<'cfg> {
203
super::filter_dynamic_search_path(self.native_dirs.iter(), &self.root_output);
204
search_path.push(self.deps_output.clone());
205
search_path.push(self.root_output.clone());
206
- search_path.push(self.target_dylib_path.clone());
+ // For build-std, we don't want to accidentally pull in any shared
207
+ // libs from the sysroot that ships with rustc. This may not be
208
+ // required (at least I cannot craft a situation where it
209
+ // matters), but is here to be safe.
210
+ if self.config.cli_unstable().build_std.is_none() {
211
+ search_path.push(self.target_dylib_path.clone());
212
+ }
213
search_path
214
};
215
0 commit comments