-
-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
rust-lang/rust#71515 (comment) mentions that the next nightly will switch to using the self-contained lld by default instead of the system linker. Trying to do some pre-testing of this setup by manually enabling the new defaults in a project with a native dependency indicates that this causes issues with library loading (presumably something rpath related, but I've never dug into the details of how that is handled normally):
> cargo rustc -- -Clink-self-contained=+linker -Clinker-flavor=gnu-lld-cc
Compiling u2f-touch-detector v0.1.0 (/home/nemo157/sources/u2f-touch-detector)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.58s
> $CARGO_HOME/target/shared/x86_64-unknown-linux-gnu/debug/u2f-touch-detector --help
/run/user/1000/cargo-home/target/shared/x86_64-unknown-linux-gnu/debug/u2f-touch-detector: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directoryThe PR linked from the tracking issue mentions that the workaround will be to use -Zlinker-features=-lld.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request