Skip to content

Commit 47f541c

Browse files
committed
[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.
1 parent 76e37b1 commit 47f541c

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
USE_LIBCPP := 1
22
CXX_SOURCES := main.cpp
3+
4+
ifneq ($(OS),Darwin)
5+
LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition
6+
endif
7+
38
include Makefile.rules
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# FIXME: once the expression evaluator can handle std libraries with debug
2-
# info, change this to USE_LIBCPP=1
3-
USE_SYSTEM_STDLIB := 1
1+
USE_LIBCPP := 1
42
CXX_SOURCES := main.cpp
3+
4+
ifneq ($(OS),Darwin)
5+
LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition
6+
endif
7+
58
include Makefile.rules
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# FIXME: once the expression evaluator can handle std libraries with debug
2-
# info, change this to USE_LIBCPP=1
3-
USE_SYSTEM_STDLIB := 1
1+
USE_LIBCPP := 1
42
CXX_SOURCES := main.cpp
3+
4+
ifneq ($(OS),Darwin)
5+
LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition
6+
endif
7+
58
include Makefile.rules
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# FIXME: once the expression evaluator can handle std libraries with debug
2-
# info, change this to USE_LIBCPP=1
3-
USE_SYSTEM_STDLIB := 1
1+
USE_LIBCPP := 1
42
CXX_SOURCES := main.cpp
3+
4+
ifneq ($(OS),Darwin)
5+
LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition
6+
endif
7+
58
include Makefile.rules
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
USE_LIBCPP := 1
22
CXX_SOURCES := main.cpp
3+
4+
ifneq ($(OS),Darwin)
5+
LD_EXTRAS := -Xlinker --whole-archive -Xlinker --allow-multiple-definition
6+
endif
7+
38
include Makefile.rules

0 commit comments

Comments
 (0)