https://github.com/dzhidzhoev created https://github.com/llvm/llvm-project/pull/98701
--whole-archive and --allow-multiple-definition options has been added to linker flags of these import-std-module tests in order to make them pass with libcxx static linking enabled. Darwin has been excluded since it doesn't seem to build in this configuration. Also, some tests were switched from system stdlib to libcxx since the problem described in https://reviews.llvm.org/D139361 seems to be fixed. >From 47f541c99485e4970c4219044aae5c117e63865c Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev <vdzhidzh...@accesssoftek.com> Date: Fri, 14 Jun 2024 19:00:39 +0000 Subject: [PATCH] [lldb][test] Enable static linking with libcxx for import-std-module tests --whole-archive and --allow-multiple-definition options has been added to linker flags of these import-std-module tests in order to make them pass with libcxx static linking enabled. Darwin has been excluded since it doesn't seem to build in such configuration. Also, some tests were switched from system stdlib to libcxx since the problem described in https://reviews.llvm.org/D139361 seems to be fixed. --- .../commands/expression/import-std-module/array/Makefile | 5 +++++ .../import-std-module/deque-dbg-info-content/Makefile | 9 ++++++--- .../import-std-module/list-dbg-info-content/Makefile | 9 ++++++--- .../import-std-module/vector-dbg-info-content/Makefile | 9 ++++++--- .../import-std-module/vector-of-vectors/Makefile | 5 +++++ 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/lldb/test/API/commands/expression/import-std-module/array/Makefile b/lldb/test/API/commands/expression/import-std-module/array/Makefile index f938f7428468..b96106a55b85 100644 --- a/lldb/test/API/commands/expression/import-std-module/array/Makefile +++ b/lldb/test/API/commands/expression/import-std-module/array/Makefile @@ -1,3 +1,8 @@ USE_LIBCPP := 1 CXX_SOURCES := main.cpp + +ifneq ($(OS),Darwin) + LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition +endif + include Makefile.rules diff --git a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/Makefile b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/Makefile index 98638c56f0b9..b96106a55b85 100644 --- a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/Makefile +++ b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/Makefile @@ -1,5 +1,8 @@ -# FIXME: once the expression evaluator can handle std libraries with debug -# info, change this to USE_LIBCPP=1 -USE_SYSTEM_STDLIB := 1 +USE_LIBCPP := 1 CXX_SOURCES := main.cpp + +ifneq ($(OS),Darwin) + LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition +endif + include Makefile.rules diff --git a/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/Makefile b/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/Makefile index 98638c56f0b9..b96106a55b85 100644 --- a/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/Makefile +++ b/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/Makefile @@ -1,5 +1,8 @@ -# FIXME: once the expression evaluator can handle std libraries with debug -# info, change this to USE_LIBCPP=1 -USE_SYSTEM_STDLIB := 1 +USE_LIBCPP := 1 CXX_SOURCES := main.cpp + +ifneq ($(OS),Darwin) + LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition +endif + include Makefile.rules diff --git a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/Makefile b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/Makefile index 98638c56f0b9..b96106a55b85 100644 --- a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/Makefile +++ b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/Makefile @@ -1,5 +1,8 @@ -# FIXME: once the expression evaluator can handle std libraries with debug -# info, change this to USE_LIBCPP=1 -USE_SYSTEM_STDLIB := 1 +USE_LIBCPP := 1 CXX_SOURCES := main.cpp + +ifneq ($(OS),Darwin) + LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition +endif + include Makefile.rules diff --git a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/Makefile b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/Makefile index f938f7428468..b96106a55b85 100644 --- a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/Makefile +++ b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/Makefile @@ -1,3 +1,8 @@ USE_LIBCPP := 1 CXX_SOURCES := main.cpp + +ifneq ($(OS),Darwin) + LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition +endif + include Makefile.rules _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits