From 83899d1f39a3c29da18c7b0b4116ea17019d3f4a Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Tue, 26 Feb 2019 18:41:54 +0000 Subject: [PATCH] [compiler-rt] Provide better llvm-lit failure when llvm-config fails. 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 --- compiler-rt/test/lit.common.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/test/lit.common.cfg b/compiler-rt/test/lit.common.cfg index 40b377e..26e5f43 100644 --- a/compiler-rt/test/lit.common.cfg +++ b/compiler-rt/test/lit.common.cfg @@ -389,7 +389,8 @@ try: 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')): -- 2.7.4