Closed bh1xuw closed 4 years ago
This issue is to track how to solve circular reference link error under Linux.
MacOS(llvm-lld) is OK to handle the circular references while linking.
GCC reuqire that you put the object files and libraries in the order that they depend on each other.
ld accepts the following options:
-( archives -) --start-group archives --end-group The specified archives are searched repeatedly until no new undefined references are created.
Yet, rust won't wrap user-defined in repeated search group.
Use lld under Linux:
RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo test
Use shell wrapper: #12
lld works. never mind.
lld
This issue is to track how to solve circular reference link error under Linux.
MacOS(llvm-lld) is OK to handle the circular references while linking.
GCC reuqire that you put the object files and libraries in the order that they depend on each other.
ld accepts the following options:
Yet, rust won't wrap user-defined in repeated search group.
Option 1
Use lld under Linux:
Option 2
Use shell wrapper: #12