Closed
Description
If one passes the same -lfoo
option twice to rustc it warns redundant linker flag specified for library `foo`
and ignores the second argument. Linkers are sensitive to the order of their arguments and passing the same argument twice is common and sometimes necessary to get a program to link correctly.
In fact, rustc itself passes the linker (cleaned up a bit) -ldl -lrt -lpthread -lpthread -lgcc_s -lc -lm -lrt -lpthread -lutil -lutil
, which includes four "redundant" linker flags (at least two of which are actually redundant, to be fair).