[Lldb-commits] [lldb] 786b6db - [lldb][dotest] Add `#include <algorithm>` to libc++ detection

Jordan Rupprecht via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 11 14:06:33 PST 2019


Author: Jordan Rupprecht
Date: 2019-12-11T14:06:14-08:00
New Revision: 786b6db8e6fd87fb82f2ad3e94e20c5c9cf9c4e4

URL: https://github.com/llvm/llvm-project/commit/786b6db8e6fd87fb82f2ad3e94e20c5c9cf9c4e4
DIFF: https://github.com/llvm/llvm-project/commit/786b6db8e6fd87fb82f2ad3e94e20c5c9cf9c4e4.diff

LOG: [lldb][dotest] Add `#include <algorithm>` to libc++ detection

Summary: Speculative fix after 34ef51b5f979 broke the lldb buildbot on libc++ tests.

Reviewers: echristo, EricWF

Subscribers: ldionne, lldb-commits

Tags: #lldb

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

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 fa2b3cb15a9a..1e3df7373f00 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -856,7 +856,7 @@ def canRunLibcxxTests():
         with tempfile.NamedTemporaryFile() as f:
             cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.name, "-"]
             p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
-            _, stderr = p.communicate("int main() {}")
+            _, stderr = p.communicate("#include <algorithm>\nint main() {}")
             if not p.returncode:
                 return True, "Compiling with -stdlib=libc++ works"
             return False, "Compiling with -stdlib=libc++ fails with the error: %s" % stderr


        


More information about the lldb-commits mailing list