[PATCH] D23856: [libc++] Perform configuration checks with -nodefaultlibs
Shoaib Meenai via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 26 11:52:21 PDT 2016
smeenai added inline comments.
================
Comment at: cmake/config-ix.cmake:18
@@ +17,3 @@
+if (LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES -nodefaultlibs)
+ if (LIBCXX_HAS_C_LIB)
----------------
compnerd wrote:
> Can we not use `CMAKE_SHARED_LINKER_FLAGS` instead of `CMAKE_REQUIRED_LIBRARIES`? It is slightly misleading.
That would pollute everything building a shared library, whereas this limits it to only configuration checks. I know it's misleading, but I view it similar to how `target_link_libraries` is also used for specifying linker flags.
Speaking of pollution though, my `REQUIRED_*` changes in this file will end up affecting other projects for non-standalone builds, correct? What's the best way to limit this to be libc++-only?
https://reviews.llvm.org/D23856
More information about the cfe-commits
mailing list