Skip to content

Commit b5a27fd

Browse files
committed
[lldb][test] Fix some 'import-std-module' tests
Some tests from 'import-std-module' used to fail on the builder https://lab.llvm.org/staging/#/builders/195/builds/4470, since libcxx is set up to be linked statically with test binaries on it. Thus, they were temporarily disabled in #112530. Here, this commit is reverted. Jitted expressions from the tests try to call __libcpp_verbose_abort function that is not present in the process image, which causes the failure. Here, this symbol is explicitly referenced from the test source files.
1 parent 6e0c074 commit b5a27fd

File tree

3 files changed

+15
-0
lines changed
  • lldb/test/API/commands/expression/import-std-module

3 files changed

+15
-0
lines changed

lldb/test/API/commands/expression/import-std-module/array/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#include <__verbose_abort>
12
#include <array>
23

4+
// Some expressons from the test need this symbol to be compiled when libcxx is
5+
// built statically.
6+
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
7+
38
struct DbgInfo {
49
int v = 4;
510
};

lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#include <__verbose_abort>
12
#include <vector>
23

4+
// Some expressons from the test need this symbol to be compiled when libcxx is
5+
// built statically.
6+
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
7+
38
struct Foo {
49
int a;
510
};

lldb/test/API/commands/expression/import-std-module/vector-of-vectors/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
#include <__verbose_abort>
12
#include <vector>
23

4+
// Some expressons from the test need this symbol to be compiled when libcxx is
5+
// built statically.
6+
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
7+
38
int main(int argc, char **argv) {
49
std::vector<std::vector<int> > a = {{1, 2, 3}, {3, 2, 1}};
510
return 0; // Set break point at this line.

0 commit comments

Comments
 (0)