-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.
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).
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.