summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-09-23 10:55:24 -0700
committerJoel Galenson <jgalenson@google.com>2021-09-23 10:55:24 -0700
commitdacbb99fbda8e9ad2002644e461e4d1d486ae810 (patch)
treef2c32e216e2e40d571b3229448e0a5f66529e393 /build.rs
parente54821125c8f2103c1ef36c5373c7e722f67d305 (diff)
downloadgrpcio-sys-dacbb99fbda8e9ad2002644e461e4d1d486ae810.tar.gz
Upgrade rust/crates/grpcio-sys to 0.9.1+1.38.0
Test: make Change-Id: Icd666e4b66992af7fd828158f344262783e482fd
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index c7179886..7f045083 100644
--- a/build.rs
+++ b/build.rs
@@ -172,7 +172,13 @@ fn build_grpc(cc: &mut cc::Build, library: &str) {
config.define("gRPC_BUILD_CODEGEN", "false");
// We don't need to build benchmarks.
config.define("gRPC_BENCHMARK_PROVIDER", "none");
- config.define("gRPC_SSL_PROVIDER", "package");
+
+ // `package` should only be set for secure feature, otherwise cmake will always search for
+ // ssl library.
+ if cfg!(feature = "secure") {
+ config.define("gRPC_SSL_PROVIDER", "package");
+ }
+ #[cfg(feature = "secure")]
if cfg!(feature = "openssl") {
if cfg!(feature = "openssl-vendored") {
config.register_dep("openssl");
@@ -254,6 +260,7 @@ fn figure_ssl_path(build_dir: &str) {
println!("cargo:rustc-link-lib=crypto");
}
+#[cfg(feature = "secure")]
fn build_boringssl(config: &mut CmakeConfig) {
let boringssl_artifact = boringssl_src::Build::new().build();
config.define(