Author: Raphael Isemann
Date: 2020-10-13T15:07:45+02:00
New Revision: 480c440f9a3cf3434355f24217cfa430dc1cabda

URL: 
https://github.com/llvm/llvm-project/commit/480c440f9a3cf3434355f24217cfa430dc1cabda
DIFF: 
https://github.com/llvm/llvm-project/commit/480c440f9a3cf3434355f24217cfa430dc1cabda.diff

LOG: [lldb] Don't let dotest silently fall back to default SDK if the specified 
one can't be found

If the SDK name passed to dotest can't be found by `xcrun` we silently fall back
to the default SDK. This leads to rather cryptic errors being reported later on
when linking the actual test executables.

Instead just directly log and abort when this situation is encountered and
inform the user about the invalid argument.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D89053

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/dotest.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index 0da60f11a609..a98965e50c19 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -302,6 +302,11 @@ def parseOptionsAndInitTestdirs():
         configuration.sdkroot = seven.get_command_output(
             'xcrun --sdk "%s" --show-sdk-path 2> /dev/null' %
             (args.apple_sdk))
+        if not configuration.sdkroot:
+            logging.error(
+                    'No SDK found with the name %s; aborting...',
+                    args.apple_sdk)
+            sys.exit(-1)
 
     if args.arch:
         configuration.arch = args.arch


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to