forked from OSchip/llvm-project
parent
ad386648b8
commit
a4f983e258
|
@ -17,7 +17,7 @@ try:
|
|||
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
||||
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
|
||||
config.llvm_build_mode = config.llvm_build_mode % lit_config.params
|
||||
except KeyError,e:
|
||||
except KeyError as e:
|
||||
key, = e.args
|
||||
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import os
|
|||
import platform
|
||||
import re
|
||||
import subprocess
|
||||
import locale
|
||||
|
||||
import lit.formats
|
||||
import lit.util
|
||||
|
@ -131,11 +132,11 @@ try:
|
|||
subprocess.Popen([os.path.join(llvm_tools_dir, 'llvm-config'),
|
||||
'--build-mode', '--assertion-mode'],
|
||||
stdout = subprocess.PIPE)
|
||||
except OSError, why:
|
||||
print "Could not find llvm-config in " + llvm_tools_dir
|
||||
except OSError as why:
|
||||
print("Could not find llvm-config in " + llvm_tools_dir)
|
||||
exit(42)
|
||||
|
||||
llvm_config_output = llvm_config_cmd.stdout.read()
|
||||
llvm_config_output = llvm_config_cmd.stdout.read().decode(locale.getdefaultlocale()[1])
|
||||
llvm_config_output_list = llvm_config_output.split("\n")
|
||||
|
||||
if re.search(r'DEBUG', llvm_config_output_list[0]):
|
||||
|
|
|
@ -14,7 +14,7 @@ config.python_executable = "@PYTHON_EXECUTABLE@"
|
|||
try:
|
||||
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
||||
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
|
||||
except KeyError,e:
|
||||
except KeyError as e:
|
||||
key, = e.args
|
||||
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
||||
|
||||
|
|
Loading…
Reference in New Issue