File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
src/test/run-make-fulldeps/redundant-libs Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11-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.
212RUSTC_FLAGS = \
313 -l static=bar \
414 -l foo \
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
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-
2011extern "C" {
2112 fn bar ( ) ;
2213 fn baz ( ) ;
You can’t perform that action at this time.
0 commit comments