[PATCH] D52878: [test-suite] Add flags for stdthreadbug.cpp when building static
Aleksandar Beserminji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 4 03:53:15 PDT 2018
abeserminji created this revision.
abeserminji added reviewers: nemanjai, mstojanovic, petarj.
Herald added subscribers: jfb, mgorny.
This patch adds necessary flags for the test stdthreadbug.cpp, so it can be compiled without error, when tests are compiled with -static flag.
Repository:
rT test-suite
https://reviews.llvm.org/D52878
Files:
SingleSource/UnitTests/C++11/CMakeLists.txt
SingleSource/UnitTests/C++11/Makefile
Index: SingleSource/UnitTests/C++11/Makefile
===================================================================
--- SingleSource/UnitTests/C++11/Makefile
+++ SingleSource/UnitTests/C++11/Makefile
@@ -8,5 +8,5 @@
PROGRAMS_TO_SKIP += stdthreadbug
endif
-LDFLAGS += -lstdc++ -pthread
+LDFLAGS += -lstdc++ -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
include $(LEVEL)/SingleSource/Makefile.singlesrc
Index: SingleSource/UnitTests/C++11/CMakeLists.txt
===================================================================
--- SingleSource/UnitTests/C++11/CMakeLists.txt
+++ SingleSource/UnitTests/C++11/CMakeLists.txt
@@ -1,3 +1,3 @@
list(APPEND CXXFLAGS -std=c++11 -pthread)
-list(APPEND LDFLAGS -lstdc++ -pthread)
+list(APPEND LDFLAGS -lstdc++ -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
llvm_singlesource()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52878.168247.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181004/5d88e6a7/attachment.bin>
More information about the llvm-commits
mailing list