aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2021-05-17 11:02:36 +0200
committerRaphael Isemann <teemperor@gmail.com>2021-05-17 11:16:58 +0200
commit5b614eb4ea6ce047daebc0517eb4efa83123fe58 (patch)
tree9fb806c8a5c036febb66e9cfed2735dbd7f51423 /lldb/packages/Python/lldbsuite/test
parent0e7c7d461df167f141428286afb781636ac92a9e (diff)
downloadllvm-5b614eb4ea6ce047daebc0517eb4efa83123fe58.zip
llvm-5b614eb4ea6ce047daebc0517eb4efa83123fe58.tar.gz
llvm-5b614eb4ea6ce047daebc0517eb4efa83123fe58.tar.bz2
[lldb] Let dotest check for the `cassert` header instead of `algorithm` for libc++ check
This is just a dotest check to see if we can compile a simple program that uses libc++. Right now we are parsing the rather big `algorithm` header in the test program, but the test really just checks whether we can find *any* libc++ headers and link against some libc++ SO. Using the much smaller `cassert` header for checking whether we can find libc++ headers speeds up this check by a bit. After some incredibly unscientific performance testing this saves a few seconds when running the test suite on Linux (on macOS we hardcoded that libc++ is always there, so this check won't be used there and we don't save any time). Reviewed By: jankratochvil Differential Revision: https://reviews.llvm.org/D101056
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 6e5bd6b..dc46f21 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -751,7 +751,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("#include <algorithm>\nint main() {}")
+ _, stderr = p.communicate("#include <cassert>\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