diff options
author | Lidi Zheng <lidiz@google.com> | 2018-11-06 15:26:07 -0800 |
---|---|---|
committer | Lidi Zheng <lidiz@google.com> | 2018-11-06 16:12:27 -0800 |
commit | 03841be6ce220c9b0d5f9f7e6c673337611c9739 (patch) | |
tree | f8fef2bb2de1b5ab6820ab6a203feefb8bce66bd | |
parent | c6b375bd9e91d19ad2d44dec15b033653d63083c (diff) |
Add background about the special condition
-rw-r--r-- | src/python/grpcio/commands.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 3cb0eb179e..dc6779740f 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -253,6 +253,12 @@ class BuildExt(build_ext.build_ext): LINK_OPTIONS = {} def build_extensions(self): + # This special conditioning is here due to difference of compiler + # behavior in gcc and clang. The clang doesn't take --stdc++11 + # flags but gcc does. Since the setuptools of Python only support + # all C or all C++ compilation, the mix of C and C++ will crash. + # *By default*, the macOS use clang and Linux use gcc, that's why + # the special condition here is checking platform. if "darwin" in sys.platform: config = os.environ.get('CONFIG', 'opt') target_path = os.path.abspath( |