cargo install does not respect LDFLAGS #3694

Open
ChrisMacNaughton opened this Issue Feb 13, 2017 · 5 comments

Comments

Projects
None yet
4 participants

When the building system has LDFLAGS set, cargo / rustc should respect the system's LDFLAGS

Owner

alexcrichton commented Feb 13, 2017

Right now Cargo respects RUSTFLAGS but that's the only env var for passing flags down. What sort of LDFLAGS are you thinking of?

Note that the exact linker that the compiler invokes isn't guaranteed to not change over time, so there's not always a valid interpretation of LDFLAGS even if it exists.

Sorry for the delay, @sergiusens would be able to go into more depth on the specifics. The goal was to get a Rust project built into a Snap with Snapcraft but the built binary wasn't using the correct libraries

where are RUSTFLAGS documented? The linker flags we want to pass on are runpath/rpath related as well as the one that sets the linker loader the binary should use.

expanding a bit on this, some issues we're having with getting this working: https://gist.github.com/ChrisMacNaughton/a81233e05995013ebb9a0c333c157b76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment