[Lldb-commits] [lldb] [lldb][test] Fix TestStdCXXDisassembly test (PR #112357)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 16 00:37:42 PDT 2024
================
@@ -1,5 +1,9 @@
CXX_SOURCES := main.cpp
-USE_SYSTEM_STDLIB := 1
+ifneq ($(OS),Darwin)
+ USE_LIBSTDCPP := 1
----------------
zeroomega wrote:
This will break every test under `lldb/test/API/lang/cpp/stl` on non darwin machines if GNU libstdc++ is not installed.
I don't think it is a correct to assume the host machine has libstdc++. Plenty of bots are set up in a way to avoid introducing GNU toolchains in a LLVM build implicitly by removing the entire GNU toolchain from the host machine. It appears the upstream LLDB bots are not set up in this way.
If libstdc++ is required to run this test (and it is the indended behavior), the correct way is to introduce LLVM cmake flag, e.g. `LLDB_STDCPP_PATH` to explicitly specify the path to the libstdc++, and disable the tests that depends on it in the build system.
But from what I see in the patch history. I believe both tests are not bound to a specific c++ lib. It just need either libc++ or libstdc++. If that is the case, the way this patch address the test failure on upstream llvm bot is wrong. It is likely the bot doesn't have libc++ but have libstdc++ but its path failed to be determined by the test runner. If that is the case, the correct way it to fix the test runner instead of forcing using libstdc++ regardless of host environment.
https://github.com/llvm/llvm-project/pull/112357
More information about the lldb-commits
mailing list