Skip to content

659 gpr assert absl check #661

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions grpc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ fn bindgen_grpc(file_path: &Path) {
.header("grpc_wrap.cc")
.clang_arg("-xc++")
.clang_arg("-I./grpc/include")
.clang_arg("-std=c++11")
.clang_arg("-std=c++14")
.impl_debug(true)
.size_t_is_usize(true)
.disable_header_comment()
Expand Down Expand Up @@ -558,7 +558,7 @@ fn main() {

cc.cpp(true);
if !cfg!(target_env = "msvc") {
cc.flag("-std=c++11");
cc.flag("-std=c++14");
}
cc.file("grpc_wrap.cc");
cc.warnings_into_errors(true);
Expand Down
6 changes: 6 additions & 0 deletions grpc-sys/grpc_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
#define GPR_CALLTYPE
#endif

#ifndef GPR_ASSERT
#include <string_view>
#include <absl/log/absl_check.h>
#define GPR_ASSERT ABSL_CHECK
#endif

grpc_byte_buffer* string_to_byte_buffer(const char* buffer, size_t len) {
grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len);
grpc_byte_buffer* bb = grpc_raw_byte_buffer_create(&slice, 1);
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn clang_lint() {
"-Igrpc-sys/grpc/include",
"-x",
"c++",
"-std=c++11",
"-std=c++14",
]));
exec(cmd("clang-format").args(&["-i", "grpc-sys/grpc_wrap.cc"]));
}
Expand Down