[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:58:59 PDT 2018
abeserminji added inline comments.
================
Comment at: SingleSource/UnitTests/C++11/CMakeLists.txt:2
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()
----------------
nemanjai wrote:
> As a PPC-Linux guy, I don't really see an issue with this change. However, I am a bit concerned about whether this is portable to other targets. Windows certainly comes to mind - I have no idea how this type of stuff works there (or if test-suite even works there).
I also had this on my mind, so I tested it for windows, and it's a similar behavior as on Mips. Without these flags it's not working well with -static flag. But I am also not sure if this can break this test on some other target.
Maybe it would be a better idea if I put these flags only for Mips target?
https://reviews.llvm.org/D52878
More information about the llvm-commits
mailing list