On MacOS the ld version is emitted to stderr, resulting in lots of
messages in the ninja check output.
llvm-svn: 277092
if not config.gold_executable:
return False
try:
- ld_cmd = subprocess.Popen([config.gold_executable, '-v'], stdout = subprocess.PIPE)
- ld_out = ld_cmd.stdout.read().decode()
- ld_cmd.wait()
+ ld_cmd = subprocess.Popen([config.gold_executable, '-v'],
+ stdout = subprocess.PIPE,
+ stderr = subprocess.PIPE)
+ ld_out, _ = ld_cmd.communicate()
+ ld_out = ld_out.decode()
except:
return False