Skip to content

Commit

Permalink
use C++17 also for grpcio
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Feb 15, 2023
1 parent 40a5071 commit 88f6e31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipe/build-grpcio.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ set "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True"
set "GRPC_PYTHON_BUILD_WITH_CYTHON=True"
set "GRPC_PYTHON_CFLAGS=/DPB_FIELD_16BIT"

:: ensure we use C++17 (due to abseil ABI)
set "CPPFLAGS=%CPPFLAGS% /std:c++17"

:: clearing this regenerates it with cython and fixes phtread usage
del src\python\grpcio\grpc\_cython\cygrpc.cpp

Expand Down
3 changes: 3 additions & 0 deletions recipe/build-grpcio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export GRPC_PYTHON_BUILD_SYSTEM_ZLIB="True"
export GRPC_PYTHON_BUILD_WITH_CYTHON="True"
export GRPC_PYTHON_USE_PREBUILT_GRPC_CORE=""

# ensure we use C++17 (due to abseil ABI)
export CPPFLAGS="$CPPFLAGS -std=c++17"

if [[ "${target_platform}" == linux-* ]]; then
# set these so the default in setup.py are not used
# it seems that we need to link to pthread on linux or osx.
Expand Down

0 comments on commit 88f6e31

Please sign in to comment.