Skip to content

Commit 32969e9

Browse files
committed
Move comment describing test case
1 parent c641a8c commit 32969e9

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/test/run-make-fulldeps/redundant-libs/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
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.
212
RUSTC_FLAGS = \
313
-l static=bar \
414
-l foo \

src/test/run-make-fulldeps/redundant-libs/main.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
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-
2011
extern "C" {
2112
fn bar();
2213
fn baz();

0 commit comments

Comments
 (0)