[compiler-rt] r354907 - [compiler-rt] Provide better llvm-lit failure when llvm-config fails.

Mitch Phillips via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 10:41:54 PST 2019


Author: hctim
Date: Tue Feb 26 10:41:54 2019
New Revision: 354907

URL: http://llvm.org/viewvc/llvm-project?rev=354907&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/test/lit.common.cfg

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=354907&r1=354906&r2=354907&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Tue Feb 26 10:41:54 2019
@@ -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')):




More information about the llvm-commits mailing list