Make check_linker_need_libatomic more robust

pull/23935/head
Esun Kim 5 years ago
parent dca24b8de5
commit 7dcba1a700
  1. 12
      setup.py

@ -171,7 +171,17 @@ def check_linker_need_libatomic():
stdout=PIPE,
stderr=PIPE)
cc_test.communicate(input=code_test)
return cc_test.returncode != 0
if cc_test.returncode == 0:
return False
# Double-check to see if -latomic actually can solve the problem.
# https://github.com/grpc/grpc/issues/22491
cc_test = subprocess.Popen(
['cc', '-x', 'c++', '-std=c++11', '-latomic', '-'],
stdin=PIPE,
stdout=PIPE,
stderr=PIPE)
cc_test.communicate(input=code_test)
return cc_test.returncode == 0
# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are

Loading…
Cancel
Save