[waf] Use {str,bytes}.decode to make it compatible with Python 2/3

This commit is contained in:
Fangrui Song 2017-12-14 21:35:25 -08:00
parent 044ef0b309
commit ea5c89e956

View File

@ -201,7 +201,7 @@ def build(bld):
if bld.env['use_system_clang']:
rpath = []
output = subprocess.check_output(['clang', '-###', '-xc', '/dev/null'], stderr=subprocess.STDOUT)
output = subprocess.check_output(['clang', '-###', '-xc', '/dev/null'], stderr=subprocess.STDOUT).decode()
match = re.search(r'"-resource-dir" "([^"]*)"', output, re.M | re.I)
if match:
default_resource_directory = match.group(1)