From f0199de2037543538441b2ea532f7329b6b8a6e0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 15 Jan 2016 17:20:43 -0800 Subject: if we can't use the waterfall llvm, avoid it, but warn --- check.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'check.py') diff --git a/check.py b/check.py index b5c6e888e..9e2f60863 100755 --- a/check.py +++ b/check.py @@ -112,7 +112,13 @@ def fetch_waterfall(): open(os.path.join('test', 'local-revision'), 'w').write(rev) def setup_waterfall(): - os.environ['LLVM'] = os.path.abspath(os.path.join(WATERFALL_BUILD, 'llvm-install', 'bin')) + # if we can use the waterfall llvm, do so + LLVM_DIR = os.path.abspath(os.path.join(WATERFALL_BUILD, 'llvm-install', 'bin')) + try: + subprocess.check_call([os.path.join(LLVM_DIR, 'clang'), '-v'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + os.environ['LLVM'] = LLVM_DIR + except: + warnings.append('could not run LLVM from waterfall, using emcc default') fetch_waterfall() setup_waterfall() -- cgit v1.2.3