[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 Nov 1 10:17:10 PDT 2018


abeserminji updated this revision to Diff 172161.
abeserminji added reviewers: MatzeB, atanasyan.
abeserminji added a comment.

Added necessary flags for Mips only.


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
@@ -10,3 +10,8 @@
 
 LDFLAGS += -lstdc++ -pthread
 include $(LEVEL)/SingleSource/Makefile.singlesrc
+
+ifeq ($(ARCH),Mips)
+# TODO
+LDFLAGS += -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
+endif
\ No newline at end of file
Index: SingleSource/UnitTests/C++11/CMakeLists.txt
===================================================================
--- SingleSource/UnitTests/C++11/CMakeLists.txt
+++ SingleSource/UnitTests/C++11/CMakeLists.txt
@@ -1,3 +1,6 @@
 list(APPEND CXXFLAGS -std=c++11 -pthread)
 list(APPEND LDFLAGS -lstdc++ -pthread)
+if("${ARCH}" STREQUAL "Mips")
+	list(APPEND LDFLAGS -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
+endif()
 llvm_singlesource()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52878.172161.patch
Type: text/x-patch
Size: 879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/f6ff0f70/attachment.bin>


More information about the llvm-commits mailing list