[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
Fri Oct 12 03:57:32 PDT 2018


abeserminji updated this revision to Diff 169366.
abeserminji added a comment.

Updated patch to show full context.


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.169366.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181012/04132ab9/attachment.bin>


More information about the llvm-commits mailing list