[Lldb-commits] [lldb] [lldb][test] Fix TestStdCXXDisassembly test (PR #112357)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 16 00:12:04 PDT 2024
zeroomega wrote:
We are seeing test failures on `lldb-api :: lang/cpp/stl/TestSTL.py` after this patch is landed.
```
Error when building test subject.
Build Command:
/b/s/w/ir/x/w/cipd/bin/make VPATH=/b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/stl -C /b/s/w/ir/x/w/llvm_build/lldb-test-build.noindex/lang/cpp/stl/TestSTL.test_SBType_template_aspects_dwarf -I /b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/stl -I /b/s/w/ir/x/w/llvm-llvm-project/lldb/packages/Python/lldbsuite/test/make -f /b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/stl/Makefile MAKE_DSYM=NO all ARCH=x86_64 CC=/b/s/w/ir/x/w/cipd/clang/bin/clang CC_TYPE=clang CXX=/b/s/w/ir/x/w/cipd/clang/bin/clang++ LLVM_AR=/b/s/w/ir/x/w/llvm_build/./bin/llvm-ar AR=/b/s/w/ir/x/w/llvm_build/./bin/llvm-ar OBJCOPY=/b/s/w/ir/x/w/llvm_build/./bin/llvm-objcopy STRIP=/b/s/w/ir/x/w/llvm_build/./bin/llvm-strip ARCHIVER=/b/s/w/ir/x/w/llvm_build/./bin/llvm-ar DWP=/b/s/w/ir/x/w/llvm_build/./bin/llvm-dwp CLANG_MODULE_CACHE_DIR=/b/s/w/ir/x/w/llvm_build/lldb-test-build.noindex/module-cache-clang/lldb-api LLDB_OBJ_ROOT=/b/s/w/ir/x/w/llvm_build/tools/lldb OS=Linux HOST_OS=Linux
Build Command Output:
make: Entering directory '/b/s/w/ir/x/w/llvm_build/lldb-test-build.noindex/lang/cpp/stl/TestSTL.test_SBType_template_aspects_dwarf'
/b/s/w/ir/x/w/cipd/clang/bin/clang++ -std=c++11 -g -O0 -m64 -I/b/s/w/ir/x/w/llvm-llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/b/s/w/ir/x/w/llvm_build/tools/lldb/include -I/b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/stl -I/b/s/w/ir/x/w/llvm-llvm-project/lldb/packages/Python/lldbsuite/test/make -include /b/s/w/ir/x/w/llvm-llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info -stdlib=libstdc++ --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o /b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/stl/main.cpp
/b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/lang/cpp/stl/main.cpp:1:10: fatal error: 'cstdio' file not found
1 | #include <cstdio>
| ^~~~~~~~
1 error generated.
make: *** [Makefile.rules:608: main.o] Error 1
make: Leaving directory '/b/s/w/ir/x/w/llvm_build/lldb-test-build.noindex/lang/cpp/stl/TestSTL.test_SBType_template_aspects_dwarf'
```
Looking at the clang invocation, I believe the issue is that it forced the test to be build with GNU libstdc++ , and our bots don't have any GNU toolchain installed.
Is there a reason why LLDB doesn't use LLVM's own libc++?
And if libstdc++ is not present, shouldn't the build system just disable the test that depends on it instead of blindly assume it exists?
https://github.com/llvm/llvm-project/pull/112357
More information about the lldb-commits
mailing list