e6072fa0c4
Previously, upstream C libraries were linked in a nondeterministic fashion because they were collected through iter_crate_data() which is a nodeterministic traversal of a hash map. When upstream rlibs had interdependencies among their native libraries (such as libfoo depending on libc), then the ordering would occasionally be wrong, causing linkage to fail. This uses the topologically sorted list of libraries to collect native libraries, so if a native library depends on libc it just needs to make sure that the rust crate depends on liblibc. |
||
---|---|---|
.. | ||
bar.c | ||
bar.rs | ||
foo.c | ||
foo.rs | ||
main.rs | ||
Makefile |