-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from h-vetinari/bump
grpc 1.57.0
- Loading branch information
Showing
15 changed files
with
110 additions
and
110 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 59ed62d5a90cc65599854f52f92918222e23ff8c Mon Sep 17 00:00:00 2001 | ||
From 66a5eeb35da6b7b13fb66e69eb7ac9a9a02f2ecd Mon Sep 17 00:00:00 2001 | ||
From: Jonathan Helmus <[email protected]> | ||
Date: Mon, 17 Feb 2020 15:45:06 -0600 | ||
Subject: [PATCH 01/13] windows ssl lib names | ||
|
@@ -11,21 +11,21 @@ Co-Authored-By: Marius van Niekerk <[email protected]> | |
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index c654d7d1c2..4c88c792cf 100644 | ||
index 1948a4160b..820cc41d0e 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -330,10 +330,10 @@ if "win32" in sys.platform: | ||
'ws2_32', | ||
@@ -370,10 +370,10 @@ if "win32" in sys.platform: | ||
"ws2_32", | ||
) | ||
if BUILD_WITH_SYSTEM_OPENSSL: | ||
- EXTENSION_LIBRARIES += ( | ||
- 'ssl', | ||
- 'crypto', | ||
- "ssl", | ||
- "crypto", | ||
- ) | ||
+ if not "win32" in sys.platform: | ||
+ EXTENSION_LIBRARIES += ('ssl', 'crypto',) | ||
+ else: | ||
+ EXTENSION_LIBRARIES += ('libssl', 'libcrypto',) | ||
if BUILD_WITH_SYSTEM_ZLIB: | ||
EXTENSION_LIBRARIES += ('z',) | ||
EXTENSION_LIBRARIES += ("z",) | ||
if BUILD_WITH_SYSTEM_CARES: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 8762068e71fd84e91c1fc4b7c47e79ab80cd027d Mon Sep 17 00:00:00 2001 | ||
From 7600b353d5a6c41539a135852da8aefc25419e4e Mon Sep 17 00:00:00 2001 | ||
From: Mike Sarahan <[email protected]> | ||
Date: Tue, 18 Feb 2020 13:53:05 -0600 | ||
Subject: [PATCH 02/13] fix win setup cmds | ||
|
@@ -13,56 +13,56 @@ Co-Authored-By: H. Vetinari <[email protected]> | |
2 files changed, 6 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index 4c88c792cf..e2e4fd3451 100644 | ||
index 820cc41d0e..c1a669eb93 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -24,7 +24,6 @@ from distutils.unixccompiler import UnixCCompiler | ||
UnixCCompiler.src_extensions.append('.S') | ||
UnixCCompiler.src_extensions.append(".S") | ||
del UnixCCompiler | ||
|
||
-from distutils import cygwinccompiler | ||
from distutils import extension as _extension | ||
from distutils import util | ||
import os | ||
@@ -203,6 +202,9 @@ ENABLE_DOCUMENTATION_BUILD = _env_bool_value( | ||
@@ -217,6 +216,9 @@ ENABLE_DOCUMENTATION_BUILD = _env_bool_value( | ||
|
||
|
||
def check_linker_need_libatomic(): | ||
+ if sys.platform == 'win32': | ||
+ return False | ||
+ | ||
"""Test if linker on system needs libatomic.""" | ||
code_test = (b'#include <atomic>\n' + | ||
b'int main() { return std::atomic<int64_t>{}; }') | ||
@@ -247,10 +249,6 @@ if EXTRA_ENV_COMPILE_ARGS is None: | ||
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s' | ||
else: | ||
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64' | ||
code_test = ( | ||
b"#include <atomic>\n" | ||
@@ -271,10 +273,6 @@ if EXTRA_ENV_COMPILE_ARGS is None: | ||
EXTRA_ENV_COMPILE_ARGS += ( | ||
" -D_ftime=_ftime64 -D_timeb=__timeb64" | ||
) | ||
- else: | ||
- # We need to statically link the C++ Runtime, only the C runtime is | ||
- # available dynamically | ||
- EXTRA_ENV_COMPILE_ARGS += ' /MT' | ||
- EXTRA_ENV_COMPILE_ARGS += " /MT" | ||
elif "linux" in sys.platform: | ||
EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions' | ||
elif "darwin" in sys.platform: | ||
@@ -263,6 +261,7 @@ if EXTRA_ENV_LINK_ARGS is None: | ||
EXTRA_ENV_COMPILE_ARGS += ( | ||
" -fvisibility=hidden -fno-wrapv -fno-exceptions" | ||
@@ -292,6 +290,7 @@ if EXTRA_ENV_LINK_ARGS is None: | ||
if check_linker_need_libatomic(): | ||
EXTRA_ENV_LINK_ARGS += ' -latomic' | ||
EXTRA_ENV_LINK_ARGS += " -latomic" | ||
elif "win32" in sys.platform and sys.version_info < (3, 5): | ||
+ from distutils import cygwinccompiler | ||
msvcr = cygwinccompiler.get_msvcr()[0] | ||
EXTRA_ENV_LINK_ARGS += ( | ||
' -static-libgcc -static-libstdc++ -mcrtdll={msvcr}' | ||
" -static-libgcc -static-libstdc++ -mcrtdll={msvcr}" | ||
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py | ||
index 6d8228ffa0..150bd70b6c 100644 | ||
index 3739097a74..262d24abdb 100644 | ||
--- a/src/python/grpcio/commands.py | ||
+++ b/src/python/grpcio/commands.py | ||
@@ -226,6 +226,8 @@ class BuildExt(build_ext.build_ext): | ||
@@ -252,6 +252,8 @@ class BuildExt(build_ext.build_ext): | ||
"""Test if default compiler is okay with specifying c++ version | ||
when invoked in C mode. GCC is okay with this, while clang is not. | ||
""" | ||
+ if sys.platform == "win32": | ||
+ return False | ||
try: | ||
# TODO(lidiz) Remove the generated a.out for success tests. | ||
cc = os.environ.get('CC', 'cc') | ||
cc = os.environ.get("CC", "cc") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 7ec86cc8780ad9b769c1b90ec0b85985e7ef3530 Mon Sep 17 00:00:00 2001 | ||
From e09806f3cf436544fb739215a5ba6c6c6139261b Mon Sep 17 00:00:00 2001 | ||
From: Marius van Niekerk <[email protected]> | ||
Date: Mon, 13 Jun 2022 17:13:07 -0400 | ||
Subject: [PATCH 03/13] Link against grpc | ||
|
@@ -8,32 +8,32 @@ Subject: [PATCH 03/13] Link against grpc | |
1 file changed, 10 insertions(+) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index e2e4fd3451..2ba46090f7 100644 | ||
index c1a669eb93..aea3531a3a 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -171,6 +171,8 @@ BUILD_WITH_SYSTEM_ABSL = os.environ.get('GRPC_PYTHON_BUILD_SYSTEM_ABSL', False) | ||
BUILD_WITH_STATIC_LIBSTDCXX = _env_bool_value( | ||
'GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX', 'False') | ||
@@ -181,6 +181,8 @@ BUILD_WITH_STATIC_LIBSTDCXX = _env_bool_value( | ||
"GRPC_PYTHON_BUILD_WITH_STATIC_LIBSTDCXX", "False" | ||
) | ||
|
||
+BUILD_WITH_SYSTEM_GRPC_CORE = _env_bool_value('GRPC_PYTHON_BUILD_SYSTEM_GRPC_CORE', 'False') | ||
+ | ||
# For local development use only: This skips building gRPC Core and its | ||
# dependencies, including protobuf and boringssl. This allows "incremental" | ||
# compilation by first building gRPC Core using make, then building only the | ||
@@ -342,6 +344,11 @@ if BUILD_WITH_SYSTEM_RE2: | ||
if BUILD_WITH_SYSTEM_ABSL: | ||
@@ -383,6 +385,11 @@ if BUILD_WITH_SYSTEM_ABSL: | ||
EXTENSION_LIBRARIES += tuple( | ||
lib.stem[3:] for lib in pathlib.Path('/usr').glob('lib*/libabsl_*.so')) | ||
lib.stem[3:] for lib in pathlib.Path("/usr").glob("lib*/libabsl_*.so") | ||
) | ||
+if BUILD_WITH_SYSTEM_GRPC_CORE: | ||
+ EXTENSION_LIBRARIES += ('gpr', 'grpc', ) | ||
+ if "win32" in sys.platform: | ||
+ EXTENSION_LIBRARIES += ('libprotoc', 'libprotobuf', 'libprotobuf-lite', 'upb', 'address_sorting', ) | ||
+ EXTENSION_LIBRARIES += tuple(lib.stem for lib in pathlib.Path(os.environ['LIBRARY_LIB']).glob('absl_*.lib')) | ||
|
||
DEFINE_MACROS = (('_WIN32_WINNT', 0x600),) | ||
DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) | ||
asm_files = [] | ||
@@ -450,6 +457,9 @@ def cython_extensions_and_necessity(): | ||
prefix + 'libgpr.a', prefix + 'libgrpc.a' | ||
@@ -515,6 +522,9 @@ def cython_extensions_and_necessity(): | ||
prefix + "libgrpc.a", | ||
] | ||
core_c_files = [] | ||
+ elif BUILD_WITH_SYSTEM_GRPC_CORE: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From f1f45c4abb00ef7556371cc9bb3fcba56eea4f69 Mon Sep 17 00:00:00 2001 | ||
From d9dcb0db1cfa77022023a7044b46808623a5f5c6 Mon Sep 17 00:00:00 2001 | ||
From: "Uwe L. Korn" <[email protected]> | ||
Date: Fri, 11 Sep 2020 14:20:04 +0200 | ||
Subject: [PATCH 04/13] force protoc executable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 21fe72b1d0ce0536b1612ad994b345e764a27fec Mon Sep 17 00:00:00 2001 | ||
From c606e0456cecf92098889859d0a27434329dab13 Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Sat, 3 Sep 2022 19:23:15 +0200 | ||
Subject: [PATCH 05/13] switch to C++17 for grpcio | ||
|
@@ -8,35 +8,35 @@ Subject: [PATCH 05/13] switch to C++17 for grpcio | |
1 file changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index 2ba46090f7..adf826df34 100644 | ||
index aea3531a3a..ef17896b56 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -211,7 +211,7 @@ def check_linker_need_libatomic(): | ||
code_test = (b'#include <atomic>\n' + | ||
b'int main() { return std::atomic<int64_t>{}; }') | ||
cxx = shlex.split(os.environ.get('CXX', 'c++')) | ||
- cpp_test = subprocess.Popen(cxx + ['-x', 'c++', '-std=c++14', '-'], | ||
+ cpp_test = subprocess.Popen(cxx + ['-x', 'c++', '-std=c++17', '-'], | ||
stdin=PIPE, | ||
stdout=PIPE, | ||
stderr=PIPE) | ||
@@ -221,7 +221,7 @@ def check_linker_need_libatomic(): | ||
@@ -228,7 +228,7 @@ def check_linker_need_libatomic(): | ||
) | ||
cxx = shlex.split(os.environ.get("CXX", "c++")) | ||
cpp_test = subprocess.Popen( | ||
- cxx + ["-x", "c++", "-std=c++14", "-"], | ||
+ cxx + ["-x", "c++", "-std=c++17", "-"], | ||
stdin=PIPE, | ||
stdout=PIPE, | ||
stderr=PIPE, | ||
@@ -239,7 +239,7 @@ def check_linker_need_libatomic(): | ||
# Double-check to see if -latomic actually can solve the problem. | ||
# https://github.com/grpc/grpc/issues/22491 | ||
cpp_test = subprocess.Popen(cxx + | ||
- ['-x', 'c++', '-std=c++14', '-', '-latomic'], | ||
+ ['-x', 'c++', '-std=c++17', '-', '-latomic'], | ||
stdin=PIPE, | ||
stdout=PIPE, | ||
stderr=PIPE) | ||
@@ -239,8 +239,9 @@ def check_linker_need_libatomic(): | ||
EXTRA_ENV_COMPILE_ARGS = os.environ.get('GRPC_PYTHON_CFLAGS', None) | ||
EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None) | ||
cpp_test = subprocess.Popen( | ||
- cxx + ["-x", "c++", "-std=c++14", "-", "-latomic"], | ||
+ cxx + ["-x", "c++", "-std=c++17", "-", "-latomic"], | ||
stdin=PIPE, | ||
stdout=PIPE, | ||
stderr=PIPE, | ||
@@ -258,8 +258,9 @@ def check_linker_need_libatomic(): | ||
EXTRA_ENV_COMPILE_ARGS = os.environ.get("GRPC_PYTHON_CFLAGS", None) | ||
EXTRA_ENV_LINK_ARGS = os.environ.get("GRPC_PYTHON_LDFLAGS", None) | ||
if EXTRA_ENV_COMPILE_ARGS is None: | ||
- EXTRA_ENV_COMPILE_ARGS = ' -std=c++14' | ||
- EXTRA_ENV_COMPILE_ARGS = " -std=c++14" | ||
+ EXTRA_ENV_COMPILE_ARGS = ' -std=c++17' | ||
if 'win32' in sys.platform: | ||
if "win32" in sys.platform: | ||
+ EXTRA_ENV_COMPILE_ARGS = ' /std:c++17' | ||
if sys.version_info < (3, 5): | ||
EXTRA_ENV_COMPILE_ARGS += ' -D_hypot=hypot' | ||
EXTRA_ENV_COMPILE_ARGS += " -D_hypot=hypot" | ||
# We use define flags here and don't directly add to DEFINE_MACROS below to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
From 4a28dd3764314482a05d5b57103f8b74cf4ab06c Mon Sep 17 00:00:00 2001 | ||
From e565c478a802dfd5e6bc4e9659614416d5a0e70b Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Sun, 4 Sep 2022 14:34:52 +0200 | ||
Subject: [PATCH 06/13] fix abseil setup | ||
|
||
--- | ||
setup.py | 14 +++++++++++--- | ||
1 file changed, 11 insertions(+), 3 deletions(-) | ||
setup.py | 15 +++++++++++---- | ||
1 file changed, 11 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index adf826df34..dc8c6216f6 100644 | ||
index ef17896b56..1403f7b3b8 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -343,13 +343,21 @@ if BUILD_WITH_SYSTEM_CARES: | ||
@@ -383,14 +383,21 @@ if BUILD_WITH_SYSTEM_CARES: | ||
if BUILD_WITH_SYSTEM_RE2: | ||
EXTENSION_LIBRARIES += ('re2',) | ||
EXTENSION_LIBRARIES += ("re2",) | ||
if BUILD_WITH_SYSTEM_ABSL: | ||
- EXTENSION_LIBRARIES += tuple( | ||
- lib.stem[3:] for lib in pathlib.Path('/usr').glob('lib*/libabsl_*.so')) | ||
- lib.stem[3:] for lib in pathlib.Path("/usr").glob("lib*/libabsl_*.so") | ||
- ) | ||
+ if "win32" in sys.platform: | ||
+ absl_libs = ( | ||
+ 'abseil_dll', 'absl_flags', 'absl_flags_commandlineflag', 'absl_flags_commandlineflag_internal', | ||
|
@@ -34,5 +35,5 @@ index adf826df34..dc8c6216f6 100644 | |
EXTENSION_LIBRARIES += ('libprotoc', 'libprotobuf', 'libprotobuf-lite', 'upb', 'address_sorting', ) | ||
- EXTENSION_LIBRARIES += tuple(lib.stem for lib in pathlib.Path(os.environ['LIBRARY_LIB']).glob('absl_*.lib')) | ||
|
||
DEFINE_MACROS = (('_WIN32_WINNT', 0x600),) | ||
DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) | ||
asm_files = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From e9acaf62bba7d87bbd05c59083d382e3cf777d48 Mon Sep 17 00:00:00 2001 | ||
From cd6c126aafc47f492387e72be77380dcd1ec8b8f Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Tue, 23 Aug 2022 11:45:20 +0200 | ||
Subject: [PATCH 07/13] mark linkage of c-ares/re2/zlib as private | ||
|
@@ -7,14 +7,14 @@ See also: https://github.com/grpc/grpc/issues/30838 | |
|
||
Co-Authored-By: Mark Harfouche <[email protected]> | ||
--- | ||
CMakeLists.txt | 96 +++++++++++++++++++++++++++----------------------- | ||
1 file changed, 51 insertions(+), 45 deletions(-) | ||
CMakeLists.txt | 100 ++++++++++++++++++++++++++----------------------- | ||
1 file changed, 53 insertions(+), 47 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index b46a03b250..cf73078ad4 100644 | ||
index ed9e1cbda7..f5fb749ac9 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -2358,31 +2358,34 @@ target_include_directories(grpc | ||
@@ -2479,32 +2479,35 @@ target_include_directories(grpc | ||
${_gRPC_ZLIB_INCLUDE_DIR} | ||
) | ||
target_link_libraries(grpc | ||
|
@@ -25,6 +25,7 @@ index b46a03b250..cf73078ad4 100644 | |
- ${_gRPC_RE2_LIBRARIES} | ||
- ${_gRPC_UPB_LIBRARIES} | ||
- ${_gRPC_ALLTARGETS_LIBRARIES} | ||
- absl::algorithm_container | ||
- absl::cleanup | ||
- absl::flat_hash_map | ||
- absl::flat_hash_set | ||
|
@@ -52,6 +53,7 @@ index b46a03b250..cf73078ad4 100644 | |
+ PRIVATE ${_gRPC_ZLIB_LIBRARIES} | ||
+ # external dependencies that need to available at runtime | ||
+ PUBLIC ${_gRPC_SSL_LIBRARIES} | ||
+ PUBLIC absl::algorithm_container | ||
+ PUBLIC absl::cleanup | ||
+ PUBLIC absl::flat_hash_map | ||
+ PUBLIC absl::flat_hash_set | ||
|
@@ -72,7 +74,7 @@ index b46a03b250..cf73078ad4 100644 | |
endif() | ||
|
||
foreach(_hdr | ||
@@ -2993,30 +2996,33 @@ target_include_directories(grpc_unsecure | ||
@@ -3125,31 +3128,34 @@ target_include_directories(grpc_unsecure | ||
${_gRPC_ZLIB_INCLUDE_DIR} | ||
) | ||
target_link_libraries(grpc_unsecure | ||
|
@@ -83,6 +85,7 @@ index b46a03b250..cf73078ad4 100644 | |
- ${_gRPC_RE2_LIBRARIES} | ||
- ${_gRPC_UPB_LIBRARIES} | ||
- ${_gRPC_ALLTARGETS_LIBRARIES} | ||
- absl::algorithm_container | ||
- absl::cleanup | ||
- absl::flat_hash_map | ||
- absl::flat_hash_set | ||
|
@@ -108,6 +111,7 @@ index b46a03b250..cf73078ad4 100644 | |
+ PRIVATE ${_gRPC_RE2_LIBRARIES} | ||
+ PRIVATE ${_gRPC_ZLIB_LIBRARIES} | ||
+ # external dependencies that need to available at runtime | ||
+ PUBLIC absl::algorithm_container | ||
+ PUBLIC absl::cleanup | ||
+ PUBLIC absl::flat_hash_map | ||
+ PUBLIC absl::flat_hash_set | ||
|
Oops, something went wrong.