Summary:
The current error message can cause confusion if llvm-config can't be
executed for reasons other than "not found". In my example, cross
compiling generated an llvm-config binary for aarch64 which couldn't be
executed natively. Instead of telling me that the error was with the
file architecture, it reports the file as not being present.
Reviewers: pcc
Subscribers: dberris, javed.absar, kristof.beyls, jdoerfert, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58647
llvm-svn: 354907
stdout = subprocess.PIPE,
env=config.environment)
except OSError:
- print("Could not find llvm-config in " + config.llvm_tools_dir)
+ print("Could not launch llvm-config in " + config.llvm_tools_dir)
+ print(" Failed with error #{0}: {1}".format(e.errno, e.strerror))
exit(42)
if re.search(r'ON', llvm_config_cmd.stdout.read().decode('ascii')):