-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use environment variable to select link target #94
Conversation
8a179fd
to
5ab8f89
Compare
ping |
How do we use now if we want to link static gRPC? |
It will build and link to gRPC statically by default. |
} | ||
} | ||
|
||
fn main() { | ||
let mut cc = Build::new(); | ||
|
||
imp::build_or_link_grpc(&mut cc); | ||
if get_env("GRPCIO_SYS_USE_PKG_CONFIG").map_or(false, |s| s == "1") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seem using 1 is to build grpc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GRPCIO_SYS_USE_PKG_CONFIG=1
means use pkg-config
to search for pre-installed grpc package and link to it.
LGTM PTAL @overvenus |
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As discussed in tikv/tikv#198 and considering the solutions other native crates have chosen (sfackler/rust-openssl#653), let's use environment variable to check link target.