This option is used to avoid underlinking. It's available in LLVM's main tree, but not in a standalone build of libc++. This patch ensures the option is passed in whether libc++ is built in-tree or out-of-tree.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
libcxx/trunk/CMakeLists.txt | ||
---|---|---|
329 | Perhaps we should exclude LIBCXX_HAS_EXTERNAL_THREAD_API as well? Because there we explicitly strip off these flags. |
libcxx/trunk/CMakeLists.txt | ||
---|---|---|
329 | I agree. Could you prepare a patch for it? BTW, I really don't like duplicating code snippet from llvm. Is there any better solution for that? |
libcxx/trunk/CMakeLists.txt | ||
---|---|---|
329 | Sure, I'll do a patch. Btw, I think this configuration is better placed in HandleOutOfTreeLLVM.cmake module. I'll see if I can find a better way to do this. |
I'm starting to regret that I've committed this. It breaks horribly any pure-LLVM build, i.e. without linking to libgcc_s. It seems that the build system is completely unprepared to link to compiler-rt or libunwind when linking the shared library, and with -DLIBCXX_HAS_GCC_S_LIB=OFF, it fails due to a lot of missing symbols. I am going to revert this until we get the build system working completely.
Doesn't -DLIBCXXABI_USE_LLVM_UNWINDER=ON make it possible to build without libgcc_s? Or is this something else?
Perhaps we should exclude LIBCXX_HAS_EXTERNAL_THREAD_API as well? Because there we explicitly strip off these flags.