Add a way to define relative paths in rustc-link-search #6725
Labels
A-linkage
Area: linker issues, dylib, cdylib, shared libraries, so
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Describe the problem you are trying to solve
I'm writing a project that uses
zmq
andzmq-sys
which need to be cross-compiled forarm-unknown-linux-gnueabi
.zmq-sys
doesn't compile libzmq on its own but we can specify the lib and include directories by usingLIBZMQ_LIB_DIR
andLIBZMQ_INCLUDE_DIR
. Howeverzmq
's build.rs requireszmq-sys
, which means I also need a compiled binary forx86_64-unknown-linux-gnu
target too. So I can not just use the environment variables ofzmq-sys
sinceLIBZMQ_LIB_DIR
will point to a wrong directory.I did the following workaround:
The problem with the above workaround is that all developers need to have the same absolute path to the compiled binaries.
Describe the solution you'd like
I would like to have a way to define a relative path in
rustc-link-search
.Another solution could be a way to define a environment variables per target.
The text was updated successfully, but these errors were encountered: