File tree 2 files changed +10
-9
lines changed
src/test/run-make-fulldeps/redundant-libs
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
-include ../tools.mk
2
+
3
+ # rustc will remove one of the two redundant references to foo below. Depending
4
+ # on which one gets removed, we'll get a linker error on SOME platforms (like
5
+ # Linux). On these platforms, when a library is referenced, the linker will
6
+ # only pull in the symbols needed _at that point in time_. If a later library
7
+ # depends on additional symbols from the library, they will not have been pulled
8
+ # in, and you'll get undefined symbols errors.
9
+ #
10
+ # So in this example, we need to ensure that rustc keeps the _later_ reference
11
+ # to foo, and not the former one.
2
12
RUSTC_FLAGS = \
3
13
-l static=bar \
4
14
-l foo \
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- // rustc will remove one of the two redundant references to foo below. Depending on which one gets
12
- // removed, we'll get a linker error on SOME platforms (like Linux). On these platforms, when a
13
- // library is referenced, the linker will only pull in the symbols needed _at that point in time_.
14
- // If a later library depends on additional symbols from the library, they will not have been
15
- // pulled in, and you'll get undefined symbols errors.
16
- //
17
- // So in this example, we need to ensure that rustc keeps the _later_ reference to foo, and not the
18
- // former one.
19
-
20
11
extern "C" {
21
12
fn bar ( ) ;
22
13
fn baz ( ) ;
You can’t perform that action at this time.
0 commit comments