summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-12-18 02:22:45 -0800
committerHaibo Huang <hhb@google.com>2020-12-18 02:22:45 -0800
commitae54389e17f0f304c8c3498eebbacc61d1e98652 (patch)
treedec2a9cc604c7b5c08c9088bf8d444808d9ce320 /build.rs
parentd99e320fc67679056929fa05347d1f881f00f173 (diff)
downloadgrpcio-sys-ae54389e17f0f304c8c3498eebbacc61d1e98652.tar.gz
Upgrade rust/crates/grpcio-sys to 0.7.2platform-tools-31.0.0
Test: make Change-Id: Ic7521c73aacb4e68054f765ca1a2234e5511ee0e
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index 34732393..44e14804 100644
--- a/build.rs
+++ b/build.rs
@@ -75,7 +75,9 @@ fn build_grpc(cc: &mut cc::Build, library: &str) {
println!("cargo:rustc-link-lib=framework=CoreFoundation");
}
- if env::var("CARGO_CFG_TARGET_ENV").unwrap() == "musl" {
+ if let Some(val) = get_env("CXX") {
+ config.define("CMAKE_CXX_COMPILER", val);
+ } else if env::var("CARGO_CFG_TARGET_ENV").unwrap() == "musl" {
config.define("CMAKE_CXX_COMPILER", "g++");
}