File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
src/tools/run-make-support/src
tests/run-make/no-cdylib-as-rdylib Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -164,12 +164,6 @@ impl Rustc {
164
164
self
165
165
}
166
166
167
- /// Favours dynamic linking over static linking in rustc. Equivalent to `-C prefer-dynamic``.
168
- pub fn prefer_dynamic ( & mut self ) -> & mut Self {
169
- self . cmd . arg ( "-Cprefer-dynamic" ) ;
170
- self
171
- }
172
-
173
167
/// Add an extra argument to the linker invocation, via `-Clink-arg`.
174
168
pub fn link_arg ( & mut self , link_arg : & str ) -> & mut Self {
175
169
self . cmd . arg ( format ! ( "-Clink-arg={link_arg}" ) ) ;
Original file line number Diff line number Diff line change 1
1
// This test produces an rlib and a cdylib from bar.rs.
2
2
// Then, foo.rs attempts to link to the bar library.
3
- // If the test works correctly, rustc will favour the rlib and ignore the cdylib.
3
+ // If the test passes, that means rustc favored the rlib and ignored the cdylib.
4
4
// If the test fails, that is because the cdylib was picked, which does not export
5
5
// any Rust symbols.
6
6
// See https://github.com/rust-lang/rust/pull/113695
@@ -11,6 +11,6 @@ use run_make_support::{run, rustc};
11
11
12
12
fn main ( ) {
13
13
rustc ( ) . input ( "bar.rs" ) . crate_type ( "rlib" ) . crate_type ( "cdylib" ) . run ( ) ;
14
- rustc ( ) . input ( "foo.rs" ) . prefer_dynamic ( ) . run ( ) ;
15
- run ( ) ;
14
+ rustc ( ) . input ( "foo.rs" ) . arg ( "-Cprefer-dynamic" ) . run ( ) ;
15
+ run ( "foo" ) ;
16
16
}
You can’t perform that action at this time.
0 commit comments