From: Teresa Johnson Date: Fri, 29 Jul 2016 00:39:56 +0000 (+0000) Subject: Capture stderr when checking for gold version X-Git-Tag: llvmorg-4.0.0-rc1~13889 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7de70738df4c6c112df52139689254864892353c;p=platform%2Fupstream%2Fllvm.git Capture stderr when checking for gold version On MacOS the ld version is emitted to stderr, resulting in lots of messages in the ninja check output. llvm-svn: 277092 --- diff --git a/llvm/test/tools/gold/X86/v1.12/lit.local.cfg b/llvm/test/tools/gold/X86/v1.12/lit.local.cfg index 3ac6f01..7f1b613 100644 --- a/llvm/test/tools/gold/X86/v1.12/lit.local.cfg +++ b/llvm/test/tools/gold/X86/v1.12/lit.local.cfg @@ -6,9 +6,11 @@ def is_gold_v1_12_linker_available(): 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