From 2c4a3f09cdb4d257c2c42eaf9bb28f4abc2dd8ea Mon Sep 17 00:00:00 2001 From: David Peixotto Date: Tue, 2 Dec 2025 17:22:01 -0800 Subject: [PATCH] [GPU][AMD] Fix lldb hipcc tests to link using libstdc++ This commit changes the test Makefile.rules to force linking with libstdc++ when building with hipcc. An upstream [change](https://github.com/llvm/llvm-project/pull/164462) modified the test link commands to add -nostdlib++ to avoid linking both the internal llvm c++ library and the external system c++ standard library. This was causing linking failures when building with hipcc because it expects to use the system libstdc++ library. --- lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index 68310eb4b63f9..9ef52ad368147 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -107,11 +107,13 @@ endif # Override CC and CXX when building a hip application. # # Use the same hipcc compiler for compiling and linking everything. +# Make sure to link to the system standard library since hipcc needs it. #---------------------------------------------------------------------- ifneq "$(strip $(HIP_SOURCES))" "" override CC := $(HIPCC) override CXX := $(HIPCC) override CC_TYPE := hip + override USE_SYSTEM_STDLIB := 1 endif #----------------------------------------------------------------------