Skip to content
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

Merged
merged 5 commits into from
Oct 8, 2017
Merged

Conversation

BusyJay
Copy link
Member

@BusyJay BusyJay commented Sep 27, 2017

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.

@overvenus
Copy link
Member

CC pingcap/kvproto#198

@BusyJay
Copy link
Member Author

BusyJay commented Sep 28, 2017

ping

@siddontang
Copy link
Contributor

How do we use now if we want to link static gRPC?

@BusyJay
Copy link
Member Author

BusyJay commented Sep 28, 2017

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") {
Copy link
Contributor

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?

Copy link
Member Author

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.

@siddontang
Copy link
Contributor

LGTM

PTAL @overvenus

@BusyJay
Copy link
Member Author

BusyJay commented Oct 6, 2017

ping

Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BusyJay BusyJay merged commit 6722853 into master Oct 8, 2017
@BusyJay BusyJay deleted the busyjay/env-build branch October 8, 2017 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants