specify -stdlib=libc++ for darwin

It's not the default with older Apple clang builds
and without it c++11 features don't work on at least OS X 10.7:

 ./src/core/lib/gprpp/ref_counted.h:28:10: fatal error: 'atomic' file not found
 #include <atomic>
          ^~~~~~~~

I manually tested it on macOS 10.11 image and there was not a
regression.

This should fix the "Artifact Build MacOS (internal CI)" test failure.
pull/18116/head
Nikolai Lifanov 6 years ago
parent a916a53347
commit 829455187c
  1. 2
      setup.py

@ -159,7 +159,7 @@ if EXTRA_ENV_COMPILE_ARGS is None:
elif "linux" in sys.platform:
EXTRA_ENV_COMPILE_ARGS += ' -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
elif "darwin" in sys.platform:
EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
EXTRA_ENV_COMPILE_ARGS += ' -stdlib=libc++ -fvisibility=hidden -fno-wrapv -fno-exceptions'
EXTRA_ENV_COMPILE_ARGS += ' -DPB_FIELD_32BIT'
if EXTRA_ENV_LINK_ARGS is None:

Loading…
Cancel
Save