5 # rustc will remove one of the two redundant references to foo below. Depending
6 # on which one gets removed, we'll get a linker error on SOME platforms (like
7 # Linux). On these platforms, when a library is referenced, the linker will
8 # only pull in the symbols needed _at that point in time_. If a later library
9 # depends on additional symbols from the library, they will not have been pulled
10 # in, and you'll get undefined symbols errors.
12 # So in this example, we need to ensure that rustc keeps the _later_ reference
13 # to foo, and not the former one.
21 all: $(call DYLIB,foo) $(call STATICLIB,bar) $(call STATICLIB,baz)
22 $(RUSTC) $(RUSTC_FLAGS) main.rs